• Advertisement
Sign in to follow this  

Code style

This topic is 4430 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello, Here is my problem: A few month ago i worked on a well-known commercial great game engine. I really like this work and of course this engine. Now, I am founding my own society and I am working on our own house game engine. Note that we want to sell this engine. I am not a plagior (not sure of the english word, read thief instead) but I automaticaly use the code style of the great engine. You know like variables write style, globals variables write style, functions style, projects style... (some variables have the same name and the same utility) Understand me, I know that in front of the justice, it will be no problem (I hope) because the codes are really different. But the problem is i don't want bad publicity, i don't want justice problem etc. Is there a problem or is it just .. nothing ? (note that 99.99999% of the code is different) [Edited by - Woodchuck on January 5, 2006 6:36:08 AM]

Share this post


Link to post
Share on other sites
Advertisement
i cant imagine anyone being annoyed if you use there coding sytle( i think you would find the opposite to occur more frequently ).

by coding style you mean( examlpe )

//this
int main( int argc, char **argv )
{
if( somethingTrue() )
{
doSomethingElse( 0, "foo", &bar );
}
}

// as opposed to
int main(int argc,char **argv) {
if (something_true ())
do_something_else (0,"foo",&bar);
}

Share this post


Link to post
Share on other sites
I believe you can run into problems if you copied a large part of the interface (class signatures) of an existing design.
Apart from that, the style of how you set your braces and spaces is entirely your matter.

Share this post


Link to post
Share on other sites
Quote:
Original post by rip-off
i cant imagine anyone being annoyed if you use there coding sytle( i think you would find the opposite to occur more frequently ).

by coding style you mean( examlpe )
*** Source Snippet Removed ***


Exactly. Thank you for the answer.

Quote:
Original post by Konfusius
I believe you can run into problems if you copied a large part of the interface (class signatures) of an existing design.
Apart from that, the style of how you set your braces and spaces is entirely your matter.


Ok, thank you. That's what i think too, but i preferre have some external opinions to know if i must be worried about this purpose.

Share this post


Link to post
Share on other sites
Doing things the same way is to be expected - some of it won't even be deliberate if you worked on the other engine a long time. There are areas where this is a problem but normally your contract with a company should cover this - are you still working there at the same time as writing this new engine?

And what guiding principles will your new society run on? [wink]

Share this post


Link to post
Share on other sites
Quote:
Original post by d000hg
Doing things the same way is to be expected - some of it won't even be deliberate if you worked on the other engine a long time. There are areas where this is a problem but normally your contract with a company should cover this - are you still working there at the same time as writing this new engine?

And what guiding principles will your new society run on? [wink]


I do not work any more on the engine. And when i said I worked on it, I would have say I worked with it.

Quote:
Original post by d000hg
And what guiding principles will your new society run on?


We don't want that any kind of people does some link of this style and we don't want copy any kind of code\interface\design...

I just want the style because I like it.

EDIT: but note that by doing the same things (game engine) with the same style make appear some little resemblances (not sure of the word sorry) like same variable name for the same variable utility (but not the same class signature), some same project name, same file names, just little things like that. I do not copy anythings.

I want to know if i must be worried about that.

Share this post


Link to post
Share on other sites
What!? There is no patent about braces, identation and variable/function names!?
Oh boy, i'm gonna get that one! [grin]

Share this post


Link to post
Share on other sites
Well, they would have to show maybe that you stole "trade secrets"... However I don't believe class interfaces and such are really such a strong argument. Unless you are ripping code out of their engine, I'm pretty certain that you're fine.

What kind of non-compete or non-disclosure agreement did you / do you have with them? Not that I think an NDA would really protect against this stuff - they're mostly ideas or conventions, and reusing good ideas is... well, a good idea.

IANAL.

Share this post


Link to post
Share on other sites
Well, if I think of all that people that have learned not only a programming language but also a programming style from reading their first book about that language ... That works really fine for good as well as for bad styles ;-)

Share this post


Link to post
Share on other sites
Quote:
Original post by RDragon1
Well, they would have to show maybe that you stole "trade secrets"... However I don't believe class interfaces and such are really such a strong argument. Unless you are ripping code out of their engine, I'm pretty certain that you're fine.


Ok cool ^^

Quote:
Original post by RDragon1
What kind of non-compete or non-disclosure agreement did you / do you have with them? Not that I think an NDA would really protect against this stuff - they're mostly ideas or conventions, and reusing good ideas is... well, a good idea.

IANAL.


A simple NDA I think.

Quote:
Original post by haegarr
Well, if I think of all that people that have learned not only a programming language but also a programming style from reading their first book about that language ... That works really fine for good as well as for bad styles ;-)


Yes you are right. But I just was thinking that people that sell an x00000$ (x>0) engine may be more agressive that a book author that deliberately give his code... ;)

Anyway, thank you a lot guys.

Share this post


Link to post
Share on other sites
Consult an IP (intellectual property) lawyer, if you really have concerns.

Share this post


Link to post
Share on other sites
> I automaticaly use the code style of the great engine.
> You know like variables write style, globals variables
> write style, functions style, projects style...

Your former company will worry about you stealing algorithms and data structures far more than about your coding style. Coding style has no market value. But algorithms and data structures can be assumed to be "trade secrets", depending on the employment contract or NDA you have signed. And it also depends on which algorithms and which data structures are at stake; some are more critical than others.

> Now, I am founding my own society and I am working on
> our own house game engine. Note that we want to sell
> this engine.

Your former employer will worry about you competing with them directly or indirectly. You should reread your employment contract; most firms will add employment contract clauses that prevent you from starting or joining a similar business within some time frame from your departure.

> ... but note that by doing the same things (game engine)
> with the same style make appear some little resemblances
> (not sure of the word sorry) like same variable name
> for the same variable utility

Case at hand. A long time ago, I have been called to trial as an 'expert witness' to examine a case whereby newly formed company A stole source code from company B. It turned out that company A did stole source code and tried to camouflage the code by renaming variables and such. I was told very explicitely by the judge and the prosecutor to look solely at algorithms and data structures; substance was on trial and form was to be overlooked. Law procedures might be different in France, but I assume the concepts apply here.

-cb

Share this post


Link to post
Share on other sites
Quote:
Original post by RDragon1
Consult an IP (intellectual property) lawyer, if you really have concerns.


That's what I planed but while waiting, I wanted to know the opinion of gamedev programmers ^^

Share this post


Link to post
Share on other sites
Quote:
Original post by RDragon1
Realistically, the opinion of gamedev programmers is of no use to you...


Yes I know but it's just for palpate, to see what it raise...

Maybe you would have say "No no you are mad, it's crazy..." or somethings like that...

Since I just copy the code style, It seems I will not have problems. I will validate this, but for now, I will not stop all the develepment.

Share this post


Link to post
Share on other sites
Seriously, the code style you've seen on that engine must be used by another million people. I'm pretty sure they didn't just invent a new revolutionary code style that no one else has thought of before.

I say, just use that code style and don't worry about it. If you ever have to worry (highly unlikeable), use your IDE or 3rd party software to change the code style to something else.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement