Page 1 of 1

Let me explain things for you.

PostPosted: Thu May 28, 2009 4:10 am
by Hblade
Note
I might not be as good as DST at explaining things, but I am going to give this a try. I'm going to explain a little bit about the code. This is mainly for beginners who just started using GE, because I can't teach the pros anything yet.

When making a game
Always make sure your spelling and caps are right, because you don't wan't to set there and have a game with the character saying "how r u?", you want it to say "How are you?" It makes it look more professional. If you don't know how to spell a word, use google to spell check it for you.

Clean Code
I seem to use messy code myself, but if your having people work with you on a game, it's best to have good clean code, that way people can read it better. Also comment the code to tell what that area of code does. You don't wan't your code looking like this.
Code: Select all
if (mal == 1)
{
         dostuff;
         dostuff;
         if (this == 1)
         {
                  Myfunction = 1;
         }
}

You would wan't it to look more like this.
Code: Select all
if (mal=1 && this=0) // if the variable mal is equal to 1, and this is equal to 0.
{
         dostuff; // Does this function.
         dostuff; // Does this function.
}
else
{
         Myfunction = 1; // Myfunction is equal to 1.
}

You might not have seen much of a difference, but if your using allot of code or if your sharing files with someone else, it's always good to keep the code clean.

Actor Names
It's always good to have the names of the actors in a order that people can understand. When I first started Game Editor, I named my actors something really mixed up, such as "UNefuenfuenwsdgrrrgg" for example. You should have your actors names something like, say if your the player, name him player, or character, or something that resembles that actor.

Re: Let me explain things for you.

PostPosted: Thu May 28, 2009 6:30 am
by Fuzzy
You did very good explaining an important topic. Helping people is a good thing to do, and it just got you a point from me.

Re: Let me explain things for you.

PostPosted: Thu May 28, 2009 2:50 pm
by Hblade
Thanks :D.

Re: Let me explain things for you.

PostPosted: Mon Jun 01, 2009 2:03 am
by BlarghNRawr
to add to the naming actors part i might add that it helps me if..
hmm..
example:
if you have say a bunch of "buttons" set to different actors, name them with a common name first, followed by their individual names:

say you have 3 buttons. a start button, an finish button, and a continue button

instead of naming them StartButton, FinishButton, and ContinueButton.

name them ButtonStart, ButtonFinish, and ButtonContinue
then they will all be right after each other in the actor list and makes it much more easy to follow. :)



Also
to make things easier for you, you can make a text actor with a change in visibility state or destroyactor on the creation of that actor. (basically so you can only see them in the editor) you can then use these text actors as helpers with making the game. Use them so you can easily find the coordinents of certain screens (ex.: start screen = 120,375) or to remember how large a stage is created with tiles (Battle Stage 1 = 140Tiles x 179Tiles)

i use these to help plan out my games a little more. (and i probably explained those VERY confusingly :lol: )