Register - Login
Views: 99768173
Main - Memberlist - Active users - Calendar - Wiki - IRC Chat - Online users
Ranks - Rules/FAQ - Stats - Latest Posts - Color Chart - Smilies
05-02-22 04:42:07 PM
Jul - Posts by Drag
Pages: 1 2 3 4 5 6 7 8 9 10 ... 119 120 121 122 123 124 125 126 127 128 129 130 131 132
(post in restricted forum)
Drag
2640
Level: 99


Posts: 2447/2641
EXP: 9989574
For next: 10426

Since: 07-03-07


Since last post: 4.2 years
Last activity: 3.4 years

Posted on 01-01-14 09:26:59 PM, in A completely fun HTML/CSS problem (last edited by Drag at 01-01-14 09:41:07 PM) Link
I wanted to design a page layout that resembles the layout of a computer program, rather than a pretty web page. It feels like this would be important given how popular web applications are becoming.

So first, I tried laying everything out with DIVs, which turned out to be a terrible idea because they wouldn't interact with each other. If I wanted a couple of boxes on the side of the screen, they wouldn't resize to all fit, they'd just appear until the page needs to scroll, and that's bad.

So I threw that out and changed to a TABLE-based layout. This worked well enough, except for some reason, max-width is ignored, where it worked just fine for DIVs. I read on stackoverflow that the better way to size table cells is to set each one's width to what the "ideal" size would be, and the browser will compute a good layout for you. This worked well enough, so ok. Specifically, I removed body margins/padding/everything, set the main table to position: absolute, width and height to 100%, and it correctly filled the screen with the layout I wanted.

Next, I wanted to specify that I wanted certain objects to expand either in width, height, or both. For the main layout, I had a top bar, three columns, and then a bottom bar. I wanted the top and bottom bars to shrink their heights to their contents, leaving the three columns in the middle to expand as far as they could go. setting height to 100% in the three middle columns accomplished this just fine; the top and bottom bars were only as big as the content they contained, leaving the middle of the page to expand and shrink with the browser's window.

This all worked fine until it was time to come up with some actual dialog boxes and windows and stuff.

In the right column, I wanted to have a chat box, like you see on streams. It fills the entire right side, and at the bottom is an input box and a send button. HTML and CSS desperately want everything to only be the size of their containers, and a chatbox that grew in size with each new line of text is not what I wanted.

Using the same technique as the main page layout, I created the chat box; a table that expaned to fill the right column, and the cell holding the actual chat log set to height: 100%, so it expands to be as big as possible, leaving other cells to only be as big as their contents. Next, the input bar and the send button. Another layout table, one cell set to expand horizontally, with the input box also set to expand horizontally, and an adjacent cell containing the send button, only as big as necessary.

No matter what, the input box wouldn't stop overflowing to touch the send button. Similarly, the chat box extended a few pixels into the bottom bar. Why? 100% width and 100% height means "100% of your container", so they shouldn't be any bigger.

As it turns out, width and height don't take padding into account. So, the actual width and height of my boxes was 100% + its padding, and there's no way to make it not do this. Any kind of margins or padding will cause objects to overflow at 100% size, and there's nothing you can do about it, save for javascript or something. This is fine for pretty webpages and such, but to do what I was trying to do, it just won't work.

Needless to say, I feel very defeated, and this just reinforces that HTML/CSS was designed for webpages and not applications. I feel so defeated right now, I spent two days trying to figure out what was wrong. :\

____________________
2447
Drag
2640
Level: 99


Posts: 2448/2641
EXP: 9989574
For next: 10426

Since: 07-03-07


Since last post: 4.2 years
Last activity: 3.4 years

Posted on 01-01-14 09:44:12 PM, in A completely fun HTML/CSS problem (last edited by Drag at 01-01-14 09:45:17 PM) Link
Thanks for the heads up about the board filter. I completely forgot about it.

and yes, I've tried display: block, it doesn't work for everything, and it still doesn't get around the fact that I can't put any margins anywhere either. I wanted the chat box to also have 4 pixels of spacing on the top, sides, and bottom. It always overflowed over the bottom.

I also tried a suggestion where you set the container to position: relative, and the object to position: absolute, left: 0, right: 0, but that just flat out broke; the object in question moved to the left side of the document, and didn't resize or anything. :\

edit: Fucking filter got me again! :|

____________________
2448
Drag
2640
Level: 99


Posts: 2449/2641
EXP: 9989574
For next: 10426

Since: 07-03-07


Since last post: 4.2 years
Last activity: 3.4 years

Posted on 01-01-14 10:37:38 PM, in A completely fun HTML/CSS problem Link
I've discovered that a relatively new CSS rule, "box-sizing: border-box", will change width and height to behave exactly the way I need them in order to create the layout I want. That's pretty nice.

That is, it changes width and height to take padding and border size into account. Margins still won't work, but now that padding will, I've created a workaround.

____________________
2449
Drag
2640
Level: 99


Posts: 2450/2641
EXP: 9989574
For next: 10426

Since: 07-03-07


Since last post: 4.2 years
Last activity: 3.4 years

Posted on 01-01-14 11:20:11 PM, in A completely fun HTML/CSS problem Link
So just for fun, I added a bunch of garbage to the chat window, and I set "overflow: scroll".

The chat window stays at the correct height until the content of the chat exceeds the height of the chat window, in which case the chat window stretches the page. Of course, I haven't found the right combination of rules to prevent the chat window's height from exceeding 100% of its container, and max-height doesn't work because LOL CSS.

Ugh. What do?

____________________
2450
Drag
2640
Level: 99


Posts: 2451/2641
EXP: 9989574
For next: 10426

Since: 07-03-07


Since last post: 4.2 years
Last activity: 3.4 years

Posted on 01-01-14 11:36:46 PM, in A completely fun HTML/CSS problem Link
I can't seem to stop the table from stretching when the contents get too big, despite the fact that the element whose contents are too big is set to "overflow: auto", meaning it shouldn't stretch, but should add a scrollbar. Height: 100% correctly sets the element to fill the container when its contents are smaller, but once the contents get too big, it stretches. I can't seem to prevent this, no matter what I try. I am thoroughly perplexed.

____________________
2451
Drag
2640
Level: 99


Posts: 2452/2641
EXP: 9989574
For next: 10426

Since: 07-03-07


Since last post: 4.2 years
Last activity: 3.4 years

Posted on 01-03-14 07:09:50 AM, in A completely fun HTML/CSS problem Link
I finally figured out how to correctly do it.

I have a table cell set to 100% height, but instead of putting the chat text directly in the cell, there's a div with 100% width and height, so it stretches to the size of its container, and I give it overflow: auto, and position: relative. Inside that div, I put another div with poition: absolute, and that div contains the several lines of chat that would've otherwise stretched the layout.

The position absolute/relative was needed because when you give something position: absolute, it "floats" and takes up zero space, so that prevents the container div from expanding, and overflow: auto gives it scrollbars instead. Position: relative was needed so position: absolute would be relative to the container div and not to some other random parent on the page.

Now my only issue is that I don't know how to "anchor" the text to the bottom of the viewport, so when the page resizes, the scrolling stays attached to the bottom edge of the viewport. I don't even think it's possible without javascript, but who knows. Everything else is working, so I may just have to cut my losses on that particular feature.

____________________
2452
Drag
2640
Level: 99


Posts: 2453/2641
EXP: 9989574
For next: 10426

Since: 07-03-07


Since last post: 4.2 years
Last activity: 3.4 years

Posted on 01-03-14 06:39:21 PM, in A completely fun HTML/CSS problem Link
Putting "bottom: 0" on the chat text div will anchor it to the bottom like I want (when you resize the window, the chat text stays attached to the bottom of the chat window), but when the text overflows off the top of the div, it doesn't create a scrollbar. It seems only when content overflows off the bottom does it create a scrollable region, and anything that overflows off the top is inaccessible.

So, it looks like this is going to be one of those things I'll need to accomplish with Javascript. It's a shame because I was really hoping there'd be some way to do it with CSS so it'd be one less thing I'd need to code. :\

____________________
2453
Drag
2640
Level: 99


Posts: 2454/2641
EXP: 9989574
For next: 10426

Since: 07-03-07


Since last post: 4.2 years
Last activity: 3.4 years

Posted on 01-03-14 06:46:47 PM, in Looking for a decent C/C++ IDE (last edited by Drag at 01-03-14 06:48:52 PM) Link
Just to finally follow up on this thread, I did eventually end up going with Orwell Dev-C++, and it'd been working fine for me so far (which is about a year). The greatest advantage being I'm already familiar with Dev-C++, so I didn't need to get accustomed to anything new.

I'll consider Qt when I need to create a GUI-driven program, but I'm thinking wxWidgets, optionally combined with SDL (depending on what I'm doing) would work fine. I already code webpages in text editors, so I could probably work on a GUI the same way too.

My biggest cross-platform hurdle right now is getting a cross-compiler. Apparently, GNU doesn't make it easy because you need to manually compile G++ with the target you want, and compiling G++ is a huge hassle, last I heard (which was ages ago).

____________________
2454
Drag
2640
Level: 99


Posts: 2455/2641
EXP: 9989574
For next: 10426

Since: 07-03-07


Since last post: 4.2 years
Last activity: 3.4 years

Posted on 01-04-14 01:35:39 AM, in Looking for a decent C/C++ IDE Link
My experience was "Man, why's it so hard to find a cross compiler binary when I can easily find an ordinary compiler?" -> find an article explaining how hard it is to compile the compiler when there's a shitton of options you need to configure and the source (supposedly) has ways of poisoning itself (i.e., breaking so it'll never compile so you need a fresh copy again) if you set it up wrong. Maybe the dude who wrote the article just had bad luck or didn't know what he was doing.

Plus, I wouldn't just need the compiler, I'd also need the libraries and headers that are appropriate to the target, and I'll be honest, I have no idea where to start looking for this stuff. :\

____________________
2455
Drag
2640
Level: 99


Posts: 2456/2641
EXP: 9989574
For next: 10426

Since: 07-03-07


Since last post: 4.2 years
Last activity: 3.4 years

Posted on 01-04-14 07:48:20 AM, in Looking for a decent C/C++ IDE Link
Why do I need Cygwin? Wouldn't linux libraries and headers, along with the linux-targeting GCC/G++ work just fine, if I used the rest of the binaries that come with mingw?

I ask because everyone seems to suggest installing Cygwin, but Cygwin seems to just be so I can type "make" at a bash shell inside a windows command prompt, which seems to be completely unnecessary with mingw, or at the very least unnecessary with dev-c++.

____________________
2456
Drag
2640
Level: 99


Posts: 2457/2641
EXP: 9989574
For next: 10426

Since: 07-03-07


Since last post: 4.2 years
Last activity: 3.4 years

Posted on 01-04-14 06:26:53 PM, in Looking for a decent C/C++ IDE Link
Oh I see, if a program was built with Cygwin as the target, it links against the Cygwin dll, and this is different from mingw because a mingw-targetted program will link against native Windows libraries.

Ok, that's a little more reassuring than "HEY INSTALL CYGWIN", which seemed wayyyy unnecessary.

____________________
2457
Drag
2640
Level: 99


Posts: 2458/2641
EXP: 9989574
For next: 10426

Since: 07-03-07


Since last post: 4.2 years
Last activity: 3.4 years

Posted on 01-05-14 03:02:52 AM, in Looking for a decent C/C++ IDE Link
I thought of that, yeah. Everything I do that has any interaction with the OS is either done through whatever cross-platform library I'm using, or the C/C++ standard libs. Given the lack of platform-specific coding (on my part) in this scenario, there should be no reason for the program to fail, other than some kind of dynamic linking error, or a bug in the cross-platform library, or a flaw in the platform's implementation of the C/C++ standard libs (this seems unlikely though).

____________________
2458
(post in restricted forum)
Drag
2640
Level: 99


Posts: 2460/2641
EXP: 9989574
For next: 10426

Since: 07-03-07


Since last post: 4.2 years
Last activity: 3.4 years

Posted on 01-07-14 10:10:39 PM, in GPL vs. permissive licenses WRT games (last edited by Drag at 01-07-14 10:12:21 PM) Link
This has become a topic of interest for me lately.

A particular example comes to mind; id Software tends to open-source their old game engines, and they do it under GPL as far as I know. This makes sense because they can't profit off their game anymore, so release the engine under something that removes the incentive to commercialize future stuff derived from it. (GPL stuff can be commercialized, but it's kinda moot because people can just grab your source code and compile it for free)

However, anyone who wants to make modifications to the engine to facilitate a new game is forced to comply with the GPL. GPL makes sense when it's a bunch of people working towards one goal, but the project forking in order to make something entirely different yet being forced to stay GPL is a bit contradictive to GPL's promise of "freedom". A particular problem would be during a project's private testing; As I understand it, GPL requires that anyone who is given a copy of the project must also be able to receive the source code. So any testers who become unhappy with the project can just grab the code and run off with it, forking it before it's even done. For a game, this seems inappropriate.

This isn't to harp on GPL; GPL is very useful in certain applications, like research-driven projects, such as emulators and resource editors (rom hacking). However, using GPL in other situations (like more personal projects, such as games) seems to be a misstep.

Instead of choosing GPL, what would happen if id Software had chosen a 2-clause BSD license? Would there be any consequences? If commercialization is an issue, couldn't you surpress it with the license? As far as I'm aware, a derivative work cannot revoke a BSD license, only add more restrictions on top.

The reason I'm interested in this topic is because it's going to determine the course of action I take with my own projects later.

____________________
2460
Drag
2640
Level: 99


Posts: 2461/2641
EXP: 9989574
For next: 10426

Since: 07-03-07


Since last post: 4.2 years
Last activity: 3.4 years

Posted on 01-08-14 01:30:35 AM, in GPL vs. permissive licenses WRT games Link
Originally posted by devin

It's not moot when you consider the license is typically only applied to code, not the rest of the game content, which is arguably most of what you were paying for in the first place.

id still sells most or all of their GPL-licensed games.

They just sell the WADs though, right?

Originally posted by devin
Probably the most relevant consequence is that modifications to their game engines would not need to have their own modified source code made public; the rather incestuous state of Doom source ports today, for example, probably would not be anything close to what it actually is under such a license.

There's really no way we can know how much the ports would or wouldn't thrive, because the ability to close the source doesn't necessarily mean everyone's going to do it. If the aim of the derivative is to just port it, it'd make more sense to leave it open source, but if someone wants to modify the engine to make an entirely new game out of it, shouldn't they be given the option to close their source?

____________________
2461
Drag
2640
Level: 99


Posts: 2462/2641
EXP: 9989574
For next: 10426

Since: 07-03-07


Since last post: 4.2 years
Last activity: 3.4 years

Posted on 01-08-14 09:49:48 PM, in GPL vs. permissive licenses WRT games Link
Originally posted by usr_share
I think that having a copyleft engine + proprietary game data is a fine option.

So any testers who become unhappy with the project can just grab the code and run off with it, forking it before it's even done. For a game, this seems inappropriate.


But such a fork will have to use all-original game data. I doubt it'll be easy for a QAer (or even a hired crew) to finish the engine and design all-new game data. The result will be even worse than Skunny Kart.

I believe that's only true if the game's content and assets are separated from the binary and loaded in at runtime. If you took your assets and ran them through some kind of "binary -> char array" converter, and embedded those arrays into the project as source code, then your assets would become GPL as well. Fortunately, you'd only need to do this if you wanted your game to be a single standalone binary file, so for PC games, this isn't a gamestopper. However, this would be necessary for porting your game to an embedded system that doesn't have a filesystem, so the port would be impossible without you giving up rights to your content. I'm not saying this is a likely scenario (it would've been maybe 5-10 years ago), but this is a case where GPL would be detrimental.

Originally posted by Kak64
I'm not sure about this. If this would be a game based on GPL code and the end result would be a GPL game, the developers should wait to release the source code until the final version.

That doesn't mean they couldn't release the source code of a prototype, but that doesn't seem a good idea unless for some specific reasons.

The take-and-run risk in the OP still stands though; You need to test the game, and you probably need a group of testers to test it too. Under the terms of the GPL, the source code must be provided to anyone who wants it, even for private testing builds, and in turn, they are free to do what they want with it, including forking the project and redistributing it. It doesn't matter whether the build is intended to be private or not.

Depending on what the project is like, this may or may not be a problem. If the content is separated from the code, like usr_share suggested, then this probably wouldn't cause problems, because the content isn't covered under GPL, and thus, the tester doesn't have permission to redistribute it. However, if the game needed to be completely static for whatever reason (meaning, the content is embedded into the source/binary), then the content is unfortunately GPL as well, and the tester is free to do what they want.

Originally posted by chekwob
Doom isn't strictly GPL-only. The doom source code was originally released under the "Doom Source License" which does allow keeping the source closed. The GPL license only came after the source for one of the ports was lost to a harddrive failure.

I don't quite understand how this works. The original Doom authors must've rereleased their source code under the GPL, because otherwise, a GPL version of the engine could not exist because the DSL is incompatible with it. So if this is the case, that would explain why the wiki says the source is dual-licensed. Since the DSL version and the GPL version of the source are identical, you get to choose which license you want to use.




Ok, so what I have so far is, GPL introduces a restriction where, if you want your game's assets to be static, the assets must become GPL'd, which isn't something most people necessarily want. It seems like this would be less of a problem as time goes on, but there's always going to be that one case where it'd be really nice to be able to have a static binary. This wouldn't be a problem at all under a non-copyleft license, and you might be able to squeak by if it was LGPL.

____________________
2462
Drag
2640
Level: 99


Posts: 2463/2641
EXP: 9989574
For next: 10426

Since: 07-03-07


Since last post: 4.2 years
Last activity: 3.4 years

Posted on 01-10-14 05:43:03 AM, in GPL vs. permissive licenses WRT games Link
Inuyasha's situation was exactly what motivated me to discuss this with other people and eventually make this thread. (I hope you don't mind...)

Even if I did release some code that I wanted to stay open source, this is the situation I'd like to avoid happening to other people that want to use it, which would drive me away from GPL and copyleft in general.

And well... SDL switched from LGPL to zlib, and as far as I can tell, there were zero complaints, the decision actually being praised. Static linking was indeed one of the benefits to the switch as, apparently, static linking under LGPL is actually impossible with closed source projects.

I was trying to think of why you'd want to use GPL in the first place, and it seems (like I've probably said over and over) that it's only good for projects that are research-based, like emulators. There's not much personal gain to not having a closed source emulator, because the goal isn't to add new features, but to get more accurate to the original article, and that's something that would really benefit from a bunch of people pooling information together the way GPL forces you to. Besides, there's not much to be kept secret since it's reverse engineering. Being able to look at the source code for GPL'd (or copylefted) emulators has helped me on more than one occasion.

So why does GPL occasionally get used for game engines and the like? The Doom source seems to have been released as GPL in 1999, so maybe 15 years ago, there wasn't an example like Inuyasha's to motivate a different decision?

____________________
2463
Drag
2640
Level: 99


Posts: 2464/2641
EXP: 9989574
For next: 10426

Since: 07-03-07


Since last post: 4.2 years
Last activity: 3.4 years

Posted on 01-10-14 07:33:16 AM, in GPL vs. permissive licenses WRT games Link
Originally posted by devin
The GPL gets used for game engines because they are typically not made open-source until years after any pre-release theft scenario becomes irrelevant to the original developers - and, realistically, because commercial software developers probably do not want to give others the ability to make money on derivative software without releasing the source in kind, as licenses such as BSD and MIT allow.


If commercial software developers don't want to give others the ability to make money on derivative software, couldn't they take a permissive license and add a "selling is not permitted" clause? The original Doom license made it clear that they only wanted their source code used educationally, with absolutely no commercial exploitation. It's probably easier just to use GPL in that case, so it makes sense. However, if a developer specifically wanted to avoid a copyleft license, GPL wouldn't be an option, so a modified license would be the way to go.

Originally posted by devin
Besides which, internal/private builds of GPL-licensed software do not need to be distributed in source code form to anybody until the software is made available to the public (if/when it is released to the public at all).


I had no idea that private builds of GPL'd software was possible, but it seems like they're implying institutional use, versus giving copies of the private build to individuals for testing. At what point does "giving a private build to someone" constitute as distribution? I guess written contracts would be involved.

Originally posted by devin
(Note that I do not endorse the GPL; I personally prefer the MIT license for reasons already mentioned in this thread. I consider developer freedom slightly more important than end-user freedom when it comes to governing usage of software.)


While we're on the subject, I prefer zlib because all I really want is integrity, which it grants but is still fair to other developers. I don't prefer the GPL, but I still appreciate it.

____________________
2464
Drag
2640
Level: 99


Posts: 2465/2641
EXP: 9989574
For next: 10426

Since: 07-03-07


Since last post: 4.2 years
Last activity: 3.4 years

Posted on 01-10-14 04:11:22 PM, in GPL vs. permissive licenses WRT games Link
Originally posted by devin
Otherwise, adding a non-commercial clause to a permissive license is possible, but has downsides, one of which is that the modified license is no longer compatible with the GPL or virtually any other useful FOSS license, which limits the ability of the source code to be used in projects other than the one it was originally a part of.

It's true that it would no longer be compatible with the GPL, but you should still be able to link to LGPL libraries and the like under dynamic linking, because LGPL allows code of any license to link to it. In fact, wouldn't a non-commercial clause only affect licenses which contain a "do not restrict the permissions granted by this license" clause? A license giving you permission to do something doesn't mean you must do it, unless the license says the permission cannot be revoked, which I think only happens in copylefts and sharealikes.

Originally posted by devin
On top of that, a simple clause that forbids commercial exploitation completely would be in the worst interests of developers like id Software because it would immediately eliminate a huge portion of their revenue - remember, they're not just selling the game content, they're still including the software that goes with it, and this is especially important for things like the recent iOS and Xbox Live ports of Doom (and any other re-releases of their games onto a given platform) where telling the user to simply download or build a separate engine binary is either extremely impractical or not really possible.

The copyright holder still has control over the source code. Source code they released to the public under a hypothetical non-commercial license would not allow any commercialization, but as long as they're not using a derivative version of the public code, they could port it themselves, or license it to a third party who'll port it, and still be able to commercially exploit it, since they're not using the publicly-licensed code. The only downside would be that any improvements that have been made to the public version of the code would need to be reimplemented either by themselves or the licensee.

Originally posted by devin
They could, of course, limit commercial exploitation to the original copyright holder, but that just opens the door to a big pain in the ass regarding intellectual property rights (what happens if the copyright is transferred to someone else, or if the original copyright holder simply ceases to exist?)

Yeah, I wouldn't recommend this. The code would become orphaned if the copyright holder disappeared.

Originally posted by devin
It's a little ambiguous regarding non-commercial/corporate software, but I take the interpretation that whether or not it consitutes "distribution" relies on the fairly obvious distinction between an individual or group and the general public. If the people you intend to be able to use your build can be broadly summarized as "pretty much everybody" (in other words, the eponymous general public), it's time to fork over the source; otherwise, don't worry about it.

Ok, so if the project is under GPL, and you give a private build to someone for testing purposes, but the project is not currently public, you don't need to give the source code on demand of the recipiants of the private build? Does this mean that people can only demand the source code for public releases of the GPL'd project, and not just arbitrary builds, such as the current private one?

If so, this sounds like something that all GPL users should be made aware of. The fact that this important bit of information is buried in a GIANT FAQ (with lots of conflicting information on this subject) seems unfair.

____________________
2465
Pages: 1 2 3 4 5 6 7 8 9 10 ... 119 120 121 122 123 124 125 126 127 128 129 130 131 132
Jul - Posts by Drag


Rusted Logic

Acmlmboard - commit 47be4dc [2021-08-23]
©2000-2022 Acmlm, Xkeeper, Kaito Sinclaire, et al.

23 database queries, 33 query cache hits.
Query execution time: 0.098564 seconds
Script execution time: 0.051351 seconds
Total render time: 0.149915 seconds