cPP11 migration ?

User avatar
DinkyDyeAussie
Posts: 259
Joined: Fri Feb 10, 2012 10:39 am
Location: Australia

Re: cPP11 migration ?

Postby DinkyDyeAussie » Thu Feb 27, 2014 12:08 pm

Hahaha. Well that was a reaction! :P

So what if I don't like it. I'm only speaking my mind :) If that is an insult to your tastes then ok, I apologize.

That's still not warrant enough to excuse the fact that for the CPP11 migration, this kind of thing is what we need - code that is functional, yet transparent enough that if someone new comes along and looks at it, they know exactly what's going on without having to really try hard to understand it.
User avatar
Kyran
Posts: 499
Joined: Sat Dec 31, 2011 5:19 pm
Location: Australia
Contact:

Re: cPP11 migration ?

Postby Kyran » Thu Feb 27, 2014 7:13 pm

DinkyDyeAussie wrote:I apologize.
Are you sure you're Australian?
DinkyDyeAussie wrote:That's still not warrant enough to excuse the fact that for the CPP11 migration, this kind of thing is what we need - code that is functional, yet transparent enough that if someone new comes along and looks at it, they know exactly what's going on without having to really try hard to understand it.
Sacrifice your firstborn on the alter of Seinfeld, then we'll talk.

Image
04:27 jim4 why haven't you added wc1 support? this project sucks. i'm only going to use freecraft
05:06 jim4 finished wc1 support yet? i've been waiting for 6 years
05:10 jim4 new things scare me
User avatar
Big Daddy
Posts: 118
Joined: Sun Jan 08, 2012 11:23 pm

Re: cPP11 migration ?

Postby Big Daddy » Mon Mar 03, 2014 10:18 am

DinkyDyeAussie wrote:code that is functional, yet transparent enough that if someone new comes along and looks at it, they know exactly what's going on without having to really try hard to understand it.

This. This, right here. This should be one of the mantras of Stratagus development.
User avatar
DinkyDyeAussie
Posts: 259
Joined: Fri Feb 10, 2012 10:39 am
Location: Australia

Re: cPP11 migration ?

Postby DinkyDyeAussie » Mon Mar 03, 2014 10:27 am

There is no excuse NOT to comment while you code. Confusion creeps up on any good man smart enough to code an engine. This has always been one of my mantras.

Like you said in another post Big Daddy, it's how we learn and pass things along to the next group who want to modify the game. I've looked through the code myself and sometimes it's easy as to read, and other times it's so confusing because all the variable is, is something like "int i"...no comments either...What the heck does i do?!

Variable names are just that, and provide the initial clue to what the variables function will be! Name that variable gentlemen!



...Maybe i should go on a comment quest and just go through every line of every file and comment the code I understand... :twisted:
User avatar
Kyran
Posts: 499
Joined: Sat Dec 31, 2011 5:19 pm
Location: Australia
Contact:

Re: cPP11 migration ?

Postby Kyran » Mon Mar 03, 2014 2:13 pm

Big Daddy wrote:This should be one of the mantras of Stratagus development.
Hear hear, Big Daddy! I shall second your proposal. Code comments for all!
04:27 jim4 why haven't you added wc1 support? this project sucks. i'm only going to use freecraft
05:06 jim4 finished wc1 support yet? i've been waiting for 6 years
05:10 jim4 new things scare me
User avatar
jarod42
Posts: 101
Joined: Fri Jan 20, 2012 7:43 pm

Re: cPP11 migration ?

Postby jarod42 » Sun Mar 09, 2014 1:09 am

While I agree that most part of stratagus code should be improved,
comments are not THE solution.

- shorter functions.
- better names.

are better alternatives most of the time.
User avatar
enrohk
Posts: 3
Joined: Tue Mar 04, 2014 9:12 am
Location: Where Eagles Dare

Re: cPP11 migration ?

Postby enrohk » Tue Mar 11, 2014 6:59 am

jarod42 wrote:While I agree that most part of stratagus code should be improved,
comments are not THE solution.

- shorter functions.
- better names.

are better alternatives most of the time.
Hi !
1st sorry for my english , is very basic
First message here :P

How about make a decent wiki like ZDoom have with examples , and description on how functions works ? Oh , and have the web updated on links and all this stuff...

Im trying to make some fun project for learn purposes , and took me like 4-5 hours for finding this page :
http://stratagus.com/scripts/
No option or link in the main page linking here , and the wiki's of the page is filled with non-relevant info (i like to know what files need to start , how can make a blank game from scratch , etc... not how my friend can join a coop game :P)

I think a good info & support for actual formats(Another 1-2 hours for figure how to create images) ap can make Stratagus more easy to new users
The passion for destruction is also a creative passion.
User avatar
DinkyDyeAussie
Posts: 259
Joined: Fri Feb 10, 2012 10:39 am
Location: Australia

Re: cPP11 migration ?

Postby DinkyDyeAussie » Tue Mar 11, 2014 10:36 am

That site is for the scripting language that stratagus/stargus and wargus use. This discussion is about the actual engine code (C and C++). I too have been thinking about doing this as well. I have modified the code a bit in the engine, but it is a biiiig engine and sometimes confusion sets in as to how to do really big things.

A wiki explaining all the engine parameters sounds good, but Jarod's suggestion of shorter functions and better variable names is a better way of going about it. Once we have transposed the engine over to cpp11 and SDL2,then maybe we can think about an information pack for the engine so other developers can understand it better.

Who is online

Users browsing this forum: No registered users and 1 guest