Subscribe to gabehabe's on-topic ramblings        RSS Feed

Simplest Game Ever?

Icon 1 Comments
Well, I wanted to make something that anyone can make a game with.

I think I've done it.

The engine still isn't complete, but I've tidied up the main code a little.

Perhaps a little too much.

#include "game.h"

int main(int argc, char *argv[]) {
    game *_game = new game();

    return EXIT_SUCCESS;

This doesn't account for the "data entry" type bits of creating a game using the engine, ie, creating a map.

Though that's still pretty simple.

    map* m1 = new map(1, this->_screen);
    m1->add_object(new object(this->_screen, ".\\img\\tile1.png", 30, 30, 25, 25));
    m1->add_object(new object(this->_screen, ".\\img\\tile1.png", 10, 250, 25, 5));
    m1->add_object(new object(this->_screen, ".\\img\\tile2.png", 180, 150, 25, 25, NOTHING, &found_potion));

1 Comments On This Entry

Page 1 of 1


14 May 2009 - 01:10 PM
It's pretty convoluted if you ask me. Write functions and systems that handle all the dot slashes, pointers and stuff. Also, I don't even use pointers for images, sprites, maps and the like. I use numbers. All of the hefty memory systems are handled in the engine to greatly increase stability. I use macros for shortcuts. For example CENTER_POS would be whatever a vector would be if it means the center of the screen regardless of resolution and shape.
Page 1 of 1

July 2018

15 16 1718192021

Request A Topic!

Want me to blog about something? Perhaps a language? A piece of software? A specific topic? Let me know! Even guests can post here on my blog!

If you would like to request a topic, please post a comment here and I'll get on it right away! smile.gif

Search My Blog

0 user(s) viewing

0 Guests
0 member(s)
0 anonymous member(s)

gabehabe's off-topic ramblings

Follow me on Twitter!
lol, my other blog died a horrible lonely death. Ah well.

Smiley of the [however often I change it]

IPB Image

Contact Me

e-mail: [email protected]

Google Talk: [email protected]
MSN: [email protected]
Yahoo: gabehabe (rarely used)
AIM: gabehabe (rarely used)

Skype: gabehabe

Want me to work for you? [click]