Jedi Master
Jedi Master
Posts: 256
Joined: Tue Feb 08, 2011 9:11 pm
Allegiance:: Jedi
Location: Michigan, USA
Contact:
Jedi Master
Jedi Master
Re: My ambitious project

Post by ploplyguy »

I will love to see it once it's done. I would help out but I have no idea what program I would use to make myself even remotely useful HA! :8(:
Administrator
Administrator
Posts: 3307
Joined: Thu Dec 24, 2009 2:06 am
Allegiance:: Space Rome
Location: ON, Canada
User avatar
Administrator
Administrator
Re: My ambitious project

Post by Scott »

How's it coming along spartan? It shouldn't actually take 3 months by the way. It should take one tops. If you have a lot of other things going on I suppose it could take longer.

This and Kelevra's project has inspired me to reopen a game engine I was programming. Gunna' make it capable of running a Pong game and keep adding features until I can squeeze a top down shooter out of it.

Here's what I have so far if anyone's interested:

Code: Select all

#include "SDL/SDL.h"
#include "SDL/SDL_image.h"
#include <string>
#include <fstream>

const int SCREEN_WIDTH = 640;
const int SCREEN_HEIGHT = 480;
const int SCREEN_BPP = 32;

SDL_Surface *image = NULL;
SDL_Surface *screen = NULL;

SDL_Event event;

SDL_Surface *load_image(std::string filename)
{
    SDL_Surface *loadedImage = NULL;
    SDL_Surface *optimizedImage = NULL;

    loadedImage = IMG_Load(filename.c_str());

    if (loadedImage != NULL)
    {
        optimizedImage = SDL_DisplayFormat(loadedImage);

        SDL_FreeSurface(loadedImage);
    }

    return optimizedImage;
}

void apply_surface( int x, int y, SDL_Surface* source, SDL_Surface* destination )
{
    SDL_Rect offset;

    offset.x = x;
    offset.y = y;

    SDL_BlitSurface( source, NULL, destination, &offset );
}

bool init()
{
    if (SDL_Init(SDL_INIT_EVERYTHING) == -1)
    return false;

    screen = SDL_SetVideoMode(SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_BPP, SDL_SWSURFACE);

    if (screen == NULL)
    return false;

    SDL_WM_SetCaption("Game Engine Test", NULL);

    return true;
}

bool load_files()
{
    image = load_image("first.png");

    if (image == NULL)
    return false;

    return true;
}

void clean_up()
{
    SDL_FreeSurface(image);

    SDL_Quit();
}

int main(int argc, char* args[])
{
    std::fstream statuslog;
    statuslog.open ("statuslog.txt", std::fstream::out);
    statuslog << "Opening log...\n";
    statuslog.close();

    bool quit = false;

    statuslog.open ("statuslog.txt", std::fstream::out);
    statuslog << "Beginning statuslog...\n";
    statuslog.close();

    if (init() == false)
    return 1;

    statuslog.open ("statuslog.txt", std::fstream::out);
    statuslog << "System has been intialized\n";
    statuslog.close();

    if (load_files() == false)
    return 1;

    statuslog.open ("statuslog.txt", std::fstream::out);
    statuslog << "Files have been loaded\n";
    statuslog.close();

    apply_surface(0, 0, image, screen);

    statuslog.open ("statuslog.txt", std::fstream::out);
    statuslog << "Surface has been applied\n";
    statuslog.close();

    if (SDL_Flip(screen) == -1)
    return 1;

    statuslog.open ("statuslog.txt", std::fstream::out);
    statuslog << "Screen has been flipped\n";
    statuslog.close();

    while (quit == false)
    {
        while (SDL_PollEvent(&event))
        {
            if (event.type == SDL_QUIT)
            quit = true;
        }
    }

    statuslog.open ("statuslog.txt", std::fstream::out);
    statuslog << "The process has been completed successfully\n";
    statuslog.close();

    clean_up();

    return 0;
}
Unfortunately all this does is open up a window and display one graphic (not animated). As you can see I have some work ahead of me. Luckily once the engine is done the actual designing is much easier.

EDIT:

I also have some debugging parts in there if anyone is actually looking through it.
Image
Moderator
Moderator
Posts: 1584
Joined: Mon Jan 17, 2011 5:13 pm
Allegiance:: Jedi
Location: Italy
Contact:
User avatar
Moderator
Moderator
Re: My ambitious project

Post by spartan64 »

Here are one of my first games I made on GameMaker.
http://www.youtube.com/watch?v=JTm_6njHV2E
I will show you more soon.
YouTube - BF3Enthusiast
Twitter - spartacus128
Jedi Master
Jedi Master
Posts: 315
Joined: Thu Oct 28, 2010 4:21 pm
Allegiance:: Jedi
Location: Indiana, US
Jedi Master
Jedi Master
Re: My ambitious project

Post by GeneralChaz9 »

I would help, but I wont have any clue what to do!

Have ypu guys thought about making some sort of simple Battlefront game? Even if its a top down shooter? "Star Wars Battlefront: Rogue Squadron!" xD
Gaming is a way to show someone you ARE better than them :P
PSN:GeneralChaz9
Administrator
Administrator
Posts: 3307
Joined: Thu Dec 24, 2009 2:06 am
Allegiance:: Space Rome
Location: ON, Canada
User avatar
Administrator
Administrator
Re: My ambitious project

Post by Scott »

GeneralChaz9 wrote:I would help, but I wont have any clue what to do!

Have ypu guys thought about making some sort of simple Battlefront game? Even if its a top down shooter? "Star Wars Battlefront: Rogue Squadron!" xD
I'll keep that in mind when I get my engine up to snuff'.
Image
Jedi Council Member
Jedi Council Member
Posts: 570
Joined: Tue Apr 06, 2010 2:33 am
Allegiance:: what.
Location: щ(゚Д゚щ)
User avatar
Jedi Council Member
Jedi Council Member
Re: My ambitious project

Post by Kelevra »

Administrator
Administrator
Posts: 3307
Joined: Thu Dec 24, 2009 2:06 am
Allegiance:: Space Rome
Location: ON, Canada
User avatar
Administrator
Administrator
Re: My ambitious project

Post by Scott »

Kelevra wrote:Way ahead of you.
Loading .pngs on dial-up makes me sad :(

Oh, and challenge accepted.
Attachments:
1307930363520.jpg
1307930363520.jpg (13.41 KiB) Viewed 419 times
Image
Moderator
Moderator
Posts: 1584
Joined: Mon Jan 17, 2011 5:13 pm
Allegiance:: Jedi
Location: Italy
Contact:
User avatar
Moderator
Moderator
Re: My ambitious project

Post by spartan64 »

Ok... this is what iv'e done so far: http://i1136.photobucket.com/albums/n48 ... 97/234.png
Had to define all the routes and their positions. About 80 lines of code.

Next thing... defining regions.
YouTube - BF3Enthusiast
Twitter - spartacus128
Administrator
Administrator
Posts: 3307
Joined: Thu Dec 24, 2009 2:06 am
Allegiance:: Space Rome
Location: ON, Canada
User avatar
Administrator
Administrator
Re: My ambitious project

Post by Scott »

The .pngs!

You guys may be beating me. Here's a screen from my recent award winning title entitled, Press an Arrow.

http://i54.tinypic.com/mbk08p.jpg

228 lines of code... :8(:

I'll be throwing together my first game tonight which is Tic-Tac-Toe. After that I'll keep adding features to the engine to make various other titles till I can make games I actually want to play.

AI is the hardest to program. Maybe I'll just make it two player...
Image
Moderator
Moderator
Posts: 1584
Joined: Mon Jan 17, 2011 5:13 pm
Allegiance:: Jedi
Location: Italy
Contact:
User avatar
Moderator
Moderator
You can now tell the occupation of planets and regions whether they're neutral, player or computer.

I'm going at a pretty fast pace and I'll might finish this sooner than I originally thought.
But I still have lots.... lots to do...
235.png
235.png (455.72 KiB) Viewed 405 times
I know... the graphics look ugly... ps, I'm not an artist.
YouTube - BF3Enthusiast
Twitter - spartacus128
Administrator
Administrator
Posts: 3307
Joined: Thu Dec 24, 2009 2:06 am
Allegiance:: Space Rome
Location: ON, Canada
User avatar
Administrator
Administrator
spartan64 wrote:I know... the graphics look ugly... ps, I'm not an artist.
Prepare to feel better then! All my graphics and sound are just test worthy. I'd never want to have anyone see them. So here they are.

v1.0 is finished.

EDIT: Here's that .dll: zlib1.dll Just copy it into the same folder the .exe and all the other files are. Hopefully there are no more required!

Just unzip the folder and run the .exe. I didn't leave anything out. You'll see all the files including some debugging text files. If you read them you should see a list of different steps I was watching. You may find it interesting...I dunno'.

I'm undecided whether or not I'll continue on it. I probably will add a bit more. I'm going to do either Duck Hunt or Pong next (probably Pong). I've done event handling, image and sound loading, buttons, and mouse control so with Pong I plan on learning timing, motion, collision, and animation.
Image
Jedi Council Member
Jedi Council Member
Posts: 570
Joined: Tue Apr 06, 2010 2:33 am
Allegiance:: what.
Location: щ(゚Д゚щ)
User avatar
Jedi Council Member
Jedi Council Member
Update! Courtesy of our graphics guy (Work still in progress):

Image
Rebel Academy

Image
Imperial Advanced Weapons Facility
Image
Administrator
Administrator
Posts: 3307
Joined: Thu Dec 24, 2009 2:06 am
Allegiance:: Space Rome
Location: ON, Canada
User avatar
Administrator
Administrator
Thank you for using .jpgs!

Does he do everything from scratch or work on an existing model and build on it? They look very organic to the actual game's visuals. I commend him and am very jealous considering my non-existent artistic ability.

EDIT:

Oh, and look at my previous post for the required .dll I neglected to upload.
Image
Jedi Council Member
Jedi Council Member
Posts: 570
Joined: Tue Apr 06, 2010 2:33 am
Allegiance:: what.
Location: щ(゚Д゚щ)
User avatar
Jedi Council Member
Jedi Council Member
Yeah, those are basically a bunch of the game's default models ripped apart and smashed together. That's how he works best, and it's great. All of the buildings I make are built from scratch.
Image
Administrator
Administrator
Posts: 3307
Joined: Thu Dec 24, 2009 2:06 am
Allegiance:: Space Rome
Location: ON, Canada
User avatar
Administrator
Administrator
I was just thinking, how cool of a blog would this be? Three different types of game development: GameMaker (design heavy), SDL (programing heavy), and modding (graphics heavy).

Just an interesting thought. If anyone of you are actually interested it could go somewhere. Anyway, time to learn mapping and linked lists...
Image
Post Reply