How do you _really_, i.e. in a good/best way, create games? - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

How do you _really_, i.e. in a good/best way, create games?

I'm working on several projects right now, one tile based RPG and one 2D shoot'em up and so on... and I always come to a point where I feel that I can't proceed because it is to much!



I want to set this straight and carry on coding, does anyone know any very good game developing steps explination or what you should call it ?



cheers, pelle


Comments

  • : I'm working on several projects right now, one tile based RPG and one 2D shoot'em up and so on... and I always come to a point where I feel that I can't proceed because it is to much!

    :

    : I want to set this straight and carry on coding, does anyone know any very good game developing steps explination or what you should call it ?



    The best way is to write down the entire plan, the entire story, and all the algorithms beforehand on PAPER. Don't type it, it doesn't work, you have to WRITE it down for it to stick.



    Then the rest is easy, all you do is match your code to what you have planned. You also know how much more left to do.



    Also remember that it is not a feature in your program until you have actually implemented it, so don't promise features until you have it in your plan.



    -Xotor-




  • : I'm working on several projects right now, one tile based RPG and one 2D shoot'em up and so on... and I always come to a point where I feel that I can't proceed because it is to much!

    :

    : I want to set this straight and carry on coding, does anyone know any very good game developing steps explination or what you should call it ?

    :

    : cheers, pelle



    Here's some code, cut and pasted from a game structure tutorial I recently started writing.



    It's not complete, but worth checking out. Once

    you have a general game structure defined, you

    can just edit it for a specific game, since

    the steps apply to any game.



    // GENERAL GAME VARIABLES



    int WIDTH = 500, HEIGHT = 300; // Screen size



    int NumImgs = 6; // Num of images

    Image Img[NumImgs]; // Images

    int LOADING = 0, SHIP = 1, STARS = 2, // Name each element

    PLANET = 3, LAND = 4, BULLET = 5,

    ENEMY = 6;

    int i;



    // SPRITE ARRAY VARIABLES



    int NumBs = 5, NumEs = 5, NumBkgOs = 3; // Num of bullets, enemies, bkg objects

    // Optional...

    int MaxBs = 5, MaxEs = 5, MaxBkgOs = 3; // How many may be visible at once

    int VisBs[], VisEs[], VisBkgOs[]; // Which elements are visible



    // SPRITE ARRAYS



    Sprite S;

    Sprite Bs[NumBs];

    Sprite Es[NumEs];

    Sprite BkgOs[NumBkgOs];



    /* To access individual Sprites from the arrays



    for (i = 0; i < NumBs; i++) // Scroll through the array

    if (Bs[i].Visible) // Test visibility

    Bs[i].Move(); // Take action */



    FUNCTIONS



    void Init()

    {

    1. Load images and display a status bar

    2. Reset()

    }



    void Reset()

    {

    1. Restore sprite life, location, num of visible enemies, score, current stage, etc.

    2. Display an animation sequence or logo

    3. Draw title screen while no keypress

    }



    GAME LOOP



    1. Death or game over? if (Sprite.Life == 0) if (Sprite.Lives == 0) Reset(); else Sprite.Lives—–;

    2. Check player, enemy, bullet collision

    3. Respond to input

    4. Move (change coordinates) Sprites based on input, speed (how many pixels to move), angle (direction it‘s heading, trig required). Update Sprite speed according to velocity (how often speed changes)... This is optional.

    5. See which Sprites are visible (on screen)..

    if (Sprites[i].OnScreen()) Sprites.Visible = 1;

    6. Draw visible Sprites to double buffer. Copy double buffer

    7. Pause



    In an event driven API, such as Java or C/C++/Win32, call an Update() function that repeats steps 1, 2, and 5, if neccessary. Input, drawing and animation can take place in the corresponding event methods.



    Have fun.




Sign In or Register to comment.