Jump to content

Water Again - Help


Guest Red Ocktober
 Share

Recommended Posts

That's saying that if you never release the product then you don't have to do anything, but if you do release it then it has to be under the GPL. And that's specifically talking about modified versions of the GPL code.

 

Here's the most relevant section that I could find from http://www.fsf.org/licensing/licenses/gpl-faq.html

 

I'd like to incorporate GPL-covered software in my proprietary system. Can I do this?

 

You cannot incorporate GPL-covered software in a proprietary system. The goal of the GPL is to grant everyone the freedom to copy, redistribute, understand, and modify a program. If you could incorporate GPL-covered software into a non-free system, it would have the effect of making the GPL-covered software non-free too.

A system incorporating a GPL-covered program is an extended version of that program. The GPL says that any extended version of the program must be released under the GPL if it is released at all. This is for two reasons: to make sure that users who get the software get the freedom they should have, and to encourage people to give back improvements that they make.

 

However, in many cases you can distribute the GPL-covered software alongside your proprietary system. To do this validly, you must make sure that the free and non-free programs communicate at arms length, that they are not combined in a way that would make them effectively a single program.

 

The difference between this and “incorporating” the GPL-covered software is partly a matter of substance and partly form. The substantive part is this: if the two programs are combined so that they become effectively two parts of one program, then you can't treat them as two separate programs. So the GPL has to cover the whole thing.

 

If the two programs remain well separated, like the compiler and the kernel, or like an editor and a shell, then you can treat them as two separate programs—but you have to do it properly. The issue is simply one of form: how you describe what you are doing. Why do we care about this? Because we want to make sure the users clearly understand the free status of the GPL-covered software in the collection.

 

If people were to distribute GPL-covered software calling it “part of” a system that users know is partly proprietary, users might be uncertain of their rights regarding the GPL-covered software. But if they know that what they have received is a free program plus another program, side by side, their rights will be clear.

 

Basically you can do whatever you want with GPL code as long as you don't distribute your program. So if I wrote a cool game for my daughter to play, then I wouldn't have to release source code at all. But as soon as I wanted to give it to someone else, if my program incorporated GPL code, then I'd have to release my code under GPL or compatible license as well, which means giving them access to source code and ensuring they have the ability to make modifications and are allowed to freely redistribute it. Clearly this won't work for commercial software.

 

LGPL on the other hand only requires that you release any changes you make to the LGPL library, but as long as you are dynamically linking w/ the LGPL library, you don't have to release your own source code.

 

So, if you made a separate program that did the FFT calculations and wrote them out to a text file, and your program read from the text file to get the data and display it, then you could use FFTW and just release your little program that wrote the file under the GPL while keeping the main portion of your program proprietary. But if you actually included any FFTW code or statically linked to FFTW, then your whole program would have to be released under GPL.

Windows 7 x64 - Q6700 @ 2.66GHz - 4GB RAM - 8800 GTX

ZBrush - Blender

Link to comment
Share on other sites

And yes, you are totally allowed to charge whatever you want for your program...but the person you sell it to is under no obligation to keep it secret, must be given access to the source code of the program, and is entitled to give it away to other people.

Windows 7 x64 - Q6700 @ 2.66GHz - 4GB RAM - 8800 GTX

ZBrush - Blender

Link to comment
Share on other sites

But what if my whole program has no source code? If it's like LE, just calling binaries. How can I release source which does not exist? Also game code will be sourceless soon, when I get gamelib compiled as a DLL. Then the whole game is just a series of parameters in text files, with some occasional high level commands like: LoadGame, StartGame, etc...

Ryzen 9 RX 6800M ■ 16GB XF8 Windows 11 ■
Ultra ■ LE 2.53DWS 5.6  Reaper ■ C/C++ C# ■ Fortran 2008 ■ Story ■
■ Homepage: https://canardia.com ■

Link to comment
Share on other sites

If it's sourceless then how are you integrating GPL'd code? But, the main idea behind the GPL is that users of your software have the right to see how it works, make changes to it, and distribute the changes. If they can't do so w/o the LE headers, then you would need to distribute those, which you are not allowed to do.

 

I really don't think LE is compatible w/ GPL code. I'd stay away from it and look for MIT/BSD/other open source license that allows commercial reuse of code. LGPL would also work as long as you dynamically link instead of statically link.

Windows 7 x64 - Q6700 @ 2.66GHz - 4GB RAM - 8800 GTX

ZBrush - Blender

Link to comment
Share on other sites

You can use the #include command to include the GPLed code. Then you just tell your game dll to call those functions via callbacks. Users can use the GPLed headers freely, they just need to buy LE, or code a similar engine themselves.

So they could still use the GPLed code, but the part which does things which the GPLed code does not do, like rendering, is not part of the code.

 

There's also GPL v3, which has some better thought out rules.

Ryzen 9 RX 6800M ■ 16GB XF8 Windows 11 ■
Ultra ■ LE 2.53DWS 5.6  Reaper ■ C/C++ C# ■ Fortran 2008 ■ Story ■
■ Homepage: https://canardia.com ■

Link to comment
Share on other sites

Right, so you're incorporating the GPL code via the #include statement, which places all your code under the GPL, and you're required to comply with the terms. Which I am not sure is possible w/ LE since you can't distribute LE source code. There's an exception in there for operating system binaries, so you don't have to include the source to Windows components (which you don't have), but LE wouldn't fall under that category AFAIK.

 

Many GPL projects use a dual licensing scheme (like FFTW, ExtJS, etc), where you can use it under the GPL for free, or contact them for a price to use it under a different license. I think FFTW is the best code available for FFT calculation, and they do offer a non-GPL license, but you'd have to contact them for pricing.

 

If you wanted to release a free game using Ogre3D, then you could use any GPL code you want because you can include a link to the Ogre3D source and your code. And you could even sell the game, but it's effectively charging for distribution since anyone who bought it would be free to give it away, or sell it (charge for distribution), etc.

Windows 7 x64 - Q6700 @ 2.66GHz - 4GB RAM - 8800 GTX

ZBrush - Blender

Link to comment
Share on other sites

GPL, only means you must release the source of the product UNDER the GPL, not the source to your game... read it guys. It says nothing about the source of the product you are working on, only the source of the product you used from the GPL..(And ONLY if you modified the code of that product. IF you do not modify the code, then you don't have to release anything)

AMD Phenom II x6 1100T - 16GB RAM - ATI 5870 HD - OCZ Vertex 2 60GB SSD

76561197984667096.png

Link to comment
Share on other sites

depends on the GPL, they added a piece for Tivo recently. I am no expert, but I remember the part about Tivo and their code not being GPL, and there was something added to prevent that, which is where this would fall I would think.

Link to comment
Share on other sites

From http://articles.sitepoint.com/article/public-license-explained

 

The GPL is an attempt to enforce an economic bargain between licensors and licensees. Licensors under the GPL open their source code and distribute their software freely to all who agree to do the same for their own derivative works. If a licensee creates a derivative work by modifying the original GPL-licensed program, or embeds the GPL-licensed program within his or her own program, the resulting work must also be licensed under the GPL. If there are no modifications to the GPL-licensed program, and it is not embedded within a proprietary program, the terms of the GPL simply don't apply to the licensee's software.

 

Statically linking against GPL code would be embedding, which places your code under the GPL as well.

 

From the GPLv2:

 

2. You may modify your copy or copies of the Program or any portion

of it, thus forming a work based on the Program, and copy and

distribute such modifications or work under the terms of Section 1

above, provided that you also meet all of these conditions:

 

...

 

:) You must cause any work that you distribute or publish, that in

whole or in part contains or is derived from the Program or any

part thereof, to be licensed as a whole at no charge to all third

parties under the terms of this License.

 

...

 

These requirements apply to the modified work as a whole. If

identifiable sections of that work are not derived from the Program,

and can be reasonably considered independent and separate works in

themselves, then this License, and its terms, do not apply to those

sections when you distribute them as separate works. But when you

distribute the same sections as part of a whole which is a work based

on the Program, the distribution of the whole must be on the terms of

this License, whose permissions for other licensees extend to the

entire whole, and thus to each and every part regardless of who wrote it.

 

Thus, it is not the intent of this section to claim rights or contest

your rights to work written entirely by you; rather, the intent is to

exercise the right to control the distribution of derivative or

collective works based on the Program.

 

In addition, mere aggregation of another work not based on the Program

with the Program (or with a work based on the Program) on a volume of

a storage or distribution medium does not bring the other work under

the scope of this License.

 

The important part is:

 

"But when you distribute the same sections as part of a whole which is a work based

on the Program, the distribution of the whole must be on the terms of

this License, whose permissions for other licensees extend to the

entire whole, and thus to each and every part regardless of who wrote it."

 

By including GPL'd code, it is now "part of the whole", and your application is "a work based on the Program". Which means that the "whole", your game in this case, must be released under the GPL. Once your under the GPL, then you have to provide access to the source under section 3.

 

3. You may copy and distribute the Program (or a work based on it,

under Section 2) in object code or executable form under the terms of

Sections 1 and 2 above provided that you also do one of the following:

 

a) Accompany it with the complete corresponding machine-readable

source code, which must be distributed under the terms of Sections

1 and 2 above on a medium customarily used for software interchange; or,

 

B) Accompany it with a written offer, valid for at least three

years, to give any third party, for a charge no more than your

cost of physically performing source distribution, a complete

machine-readable copy of the corresponding source code, to be

distributed under the terms of Sections 1 and 2 above on a medium

customarily used for software interchange; or,

 

c) Accompany it with the information you received as to the offer

to distribute corresponding source code. (This alternative is

allowed only for noncommercial distribution and only if you

received the program in object code or executable form with such

an offer, in accord with Subsection b above.)

 

The source code for a work means the preferred form of the work for

making modifications to it. For an executable work, complete source

code means all the source code for all modules it contains, plus any

associated interface definition files, plus the scripts used to

control compilation and installation of the executable. However, as a

special exception, the source code distributed need not include

anything that is normally distributed (in either source or binary

form) with the major components (compiler, kernel, and so on) of the

operating system on which the executable runs, unless that component

itself accompanies the executable.

 

Because you have to include "any associated interface definition files", which, I believe, would include the LE headers since LE isn't considered a "major component of the operating system", you really can't GPL your code, thus can't statically link against or include GPL code in your program because you don't have the right to distribute the LE headers.

 

Dynamically linking is a little more complicated, but in general the consensus seems to be that if your game relies on interaction with that DLL then the DLL would be considered a part of your program. The LGPL was specifically created for this case. Libraries under the LGPL can be linked to dynamically w/o imposing any restrictions on your code.

 

My recommendation, don't use GPL'd code w/ LeadWerks. LGPL/BSD/MIT licenses are fine, but the GPL isn't compatible w/ the LE license *as far as I can tell*.

 

depends on the GPL, they added a piece for Tivo recently. I am no expert, but I remember the part about Tivo and their code not being GPL, and there was something added to prevent that, which is where this would fall I would think.

 

The Tivo related portion was in response to how Tivo did stuff. They released the code as required by the GPL, but they had an encryption key on the hardware so that even if you modified the source and recompiled, there was no way to upload your modified version on to the Tivo, making the source kind of useless. So they were technically in compliance with the GPL but grossly violated the spirit of it. GPLv3 added language to address this case.

Windows 7 x64 - Q6700 @ 2.66GHz - 4GB RAM - 8800 GTX

ZBrush - Blender

Link to comment
Share on other sites

The water tutorial will work for this. You just replace the mesh I created in that tutorial with this wavy one, using your vertex shader and my fragment shader.

 

I am looking for someone to hire to implement FFT-based waves in the engine. I don't want to spend the time researching it myself, and it makes more sense to find someone who already has that specialized knowledge. However, for your purposes, sine waves might be sufficient.

 

I am trying to get in contact with this guy, but all I have is his YouTube account:

 

Looks similar to the demo from this site:

Aquatica Engine

Link to comment
Share on other sites

The easiest way I can think of resolving the waves with the terrain would be to take the terrain heightmap and find the boundary of the sea level along it then scale the image to 2 or 3 times the original size and shrink this gradually while having the waves along the boundary which would simulate them moving to the shoreline.

 

The problems with this are the large texture sizes needed and the number of buffers you need for numerous waves although this is probably resolvable through some clever shaders or some baked animation texture and that it wouldn't work very well for bays.

 

EDIT: Actually since you always need a centre of enlargement this would just create waves all flowing towards the centre of enlargement. so t's not that great.

Edited by Ending Credits

AMD Phenom 9850 (X4 2.5GHz) | 1066MHz CL5 GEIL Black Dragon (800MHz) | Powercolor ATI 4870 1GB | DFI 790FXB-M2RSH | 24" 1920x1200 | Windows Vista 64-bit Ultimate

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...