Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Generic character, item and magic structure advice

Author
Message
Bulsatar
13
Years of Service
User Offline
Joined: 19th Apr 2011
Location:
Posted: 13th Jul 2011 04:23
Hello Everyone,

I have an idea for a rpg and I have started to develop some of the structures needed for the game. I would greatly appreciate a fresh set of eyes to see if I missed any obvious omissions in my structures. I am unsure of how this will all fall out so I have tried to keep things kinda general. If anything is unclear, please ask and I will try to explain my train of thought.



Thanks for the help, always appreciated
Mr Bigglesworth
16
Years of Service
User Offline
Joined: 4th Mar 2008
Location:
Posted: 14th Jul 2011 07:14
Well, data structures in your game are up to what the game is based on and needs.

But if you want some of my advice, the value for "False" in the "Boolean" UDT should be 0 instead of -1, but that is still up to you
TheComet
17
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 19th Jul 2011 18:35
The conventional way for using constants is defining it as a constant:



It's also much cleaner to have all of the = in the same row, makes it easier to read. Same goes for things like UDTs:



The compiler doesn't care how many spaces you have between commands, so you are able to do that. Also get in the habit of defining variables at the top of your program. Nothing is worse than using variables that aren't defined:



And keep everything commented as much as possible. Good commenting is half of the code.

TheComet

Login to post a reply

Server time is: 2024-11-27 21:38:56
Your offset time is: 2024-11-27 21:38:56