Please take 5 minutes to read a number of DarkBASIC Professional tips written in 10 or less words a piece,
10 words or so. Only a few minutes, it might save you hours. After 5 minutes, you will be a better man/woman.
If you have experience, feel free to share some of it. Post up 10 or so words per tip; don't hide it in pile of sentances.
I'll start it off.
Quoting my self
Quote: "How to fail creating your project"
*Do skip reading these tips.. '''Happy programming!'''
*Do create a game you do not want to play
*Do start another new project before finishing the last 100
*Do create something that is not interesting to develop
*Do create that nice feature that wouldn't benefit your players
*Do not concentrate on what you are doing
*Do spend all week making that which is not part of the project
*Do spend more time watching people make money on TV
*Do spend all day figuring out a problem that isn't one
*Do start programming it before installing
Matrix1 utilities
*Do everything yourself. Do reinvent the wheel.
*Do backup your work; only on your hard drive, on the same PC
Quote: "Get good!"
*Read source code. Have you written more than you've read?
*All pros practice, and practice again, and again
*Focus on the benefits; benefits first, features last
Quote: "Bugs"
*Know thy self. Watch for it!
*Use UDTS to catch typing mistakes
*Read twice, compile once.
*Log it. How else will you know what's going on?
*Log it. How else will you know what crashed it?
*Log it. How can you be so sure that the variables are what they should be?
*Everything lies on a foundation. What constitutes such an error?
*Think, how can I make errors more likely to happen; don't do it!
*Use Matrix1 Console And/Or Logs. Its just not always what it seems
Quote: "Performance"
*Time it! Bottlenecks often appear in unlikely places.
*Use limbs where you can. Objects can be expensive.
*Use multiple-shapes in limbs where you can. (A bit like static limbs in limbs)
*In 3D games, avoid 2D where possible. Consider
BBB GUI, or
Styx Flash for UI. If you really must, then use Advanced2D, ImageKit and sprites, nothing else. (Use search to find plugins).
*Use Matrix1 Nice Wait/Sleep. Give windows messages room to breath, save some battery life on the laptop...
Quote: "How to fail with DBP"
*Don't read the help files to see what's available
*Don't try any plugins to see what's already been done for you
*Don't indent your code. Make it harder to find the issue.
*Don't comment your code whatsoever. Try to forget how things work in 2 months time.
*Don't ask for help when stuck, just keep trying to waste time
*Don't backup your source code at least once a day
*Don't comment your code when making a 'help me' thread. Put us off.
*Don't post your code when making a 'help me' thread. Put us off.
*Don't indent your code when making a 'help me' thread. Put us off.
*Don't code it in easy to understand language. Make sure you can't understand it!
Quote: "If you said one of these things recently; you could be wrong"
*"I can't figure out how to do it": it's been done, look
*"I can't figure out how to do it": someone else can, ask
*"Nobody will like it": How come you're playing it then?
*"I need a faster PC": It will still take long
*"Nothing works": You're not reading code properly
*"This should work": You're not reading code properly
*"That should've worked": You're not reading code properly
*"I am 100% sure this should've worked": Why?
*"DBP can't do this, DBP can't do that": Possibly it is you who can't do it?
*"I need this feature", Do you? Do your players need it?
Quote: "Favourite tricks"
*Call Function Name "Action_" + KEYBOARD_BINDING(Scancode()){Matrix1} -
Bind keys to actions
*CONSTANT# _new Array Insert At Bottom :
Easy add array
*CONSTANT# _del Array Delete Element :
Easy delete array
*Offset Limb ObjectId, 0, x#, y#, z#
Change origin, keep position
*ToggleValue = 1-ToggleValue
Toggle value as it says on the tin
*Time = Timer() : Print (Timer() - Time) * 0.001 -
Time events in milliseconds to precise seconds
*Place Object In Group | CALL FUNCTION FOR OBJECT GROUP {Matrix1} -
Do things with groups of objects
*Select RND(RandomChoice) : Case N ... Case Default
Random select actions
MAMMAL = 2^0 (or 1): ANIMAL = 2^1 (or 2) : TWO_LEGGED 2^2 (or 4)
*I_AM_HUMAN = MAMMAL || ANIMAL || TWO_LEGGED[/b]
*I_AM_HUMAN && MAMMAL <> 0[/b] Is true
Store options in one value. Binary stuff
Quote: "Get on with it!"
You cannot create
what you don't start
The easiest way to fail
is to not try
The hardest way to fail is to
prepare well
It's not a plan, its a game, just build it
From the last point; that doesn't mean don't plan;
if you do not plan to succeed, then what have you planned for? However, a plan alone will not entertain players.