However, later on I'll be doing some sort of map file structure in a language like YAML as K-Bal suggested.
Currently now I'm just trying to get back in the flow of coding that I was in a week ago or so.
I plan on currently just reading in a line and then exploding the line with the blank space character as the delimiter and then getting the correct tile from the tilesheet and adding that sprite to a SDL_Surface called map and then when I render it I'll just render the entire surface to the screen.
I'll keep you updated within the next hour or so.
Right now I'm going to get something else to eat maybe and something to drink.
Re: Blade Brothers Engine: Creating my first 2D Game Engine
Posted: Sun Feb 21, 2010 11:20 pm
by LeonBlade
Sorry for the lack of quality at first, it's still processing
Re: Blade Brothers Engine: Creating my first 2D Game Engine
Posted: Thu Mar 11, 2010 5:22 pm
by LeonBlade
Hey everyone!
Sorry I haven't updated much in a while, been kinda busy
So here is my documentation on my map file format (I figured doing it in binary is 10 times easier).
Click here to download it and check it out!
Let me know what you think, what I should chance etc.
Click here and you can download the test map.
In a few minutes I'll write some C++ to parse the map file (just some command line stuff).
So check back in a little bit, and again let me know what you think!
Re: Blade Brothers Engine: Creating my first 2D Game Engine
Posted: Fri Mar 12, 2010 5:57 pm
by Falco Girgis
Oh shit, that's XCode. I had no idea you were a Mac user, dude.
Great video, btw. I subbed, 5 starred, and favorited.
Re: Blade Brothers Engine: Creating my first 2D Game Engine
Posted: Fri Mar 12, 2010 6:12 pm
by LeonBlade
GyroVorbis wrote:Oh shit, that's XCode. I had no idea you were a Mac user, dude.
Great video, btw. I subbed, 5 starred, and favorited.
Haha, yep
And thanks, I hope to be making some new videos soon once I work out the map stuff.
Re: Blade Brothers Engine: Creating my first 2D Game Engine
Posted: Fri Mar 12, 2010 8:12 pm
by quickshot14
Very cool stuff i didnt get to quite watch all of it i'll probley do that latter tonight, was funny thou cause when I heard you talking it almost sounded how I sound just deeper....lol odd anywayz subed keep up the great work!
Re: Blade Brothers Engine: Creating my first 2D Game Engine
void BBEGame::EventLoop(void)
{
SDL_Event event;
// Game loop
while ( SDL_PollEvent(&event) )
{
switch (event.type)
{
// When you want to handle user events
case SDL_USEREVENT:
HandleUserEvents(&event);
break;
// When you want to respond to user input
case SDL_KEYUP:
HandleKeyDown(&event);
break;
// When SDL is quit
case SDL_QUIT:
done = true;
break;
case SDL_MOUSEMOTION:
//HandleMouseMove(&event);
break;
case SDL_MOUSEBUTTONDOWN:
HandleMouseDown(&event);
break;
case SDL_MOUSEBUTTONUP:
HandleMouseUp(&event);
break;
default:
break;
}
}
}
If I put that in the GameLoop it runs relatively smooth, however doing it like this is SLOW and very unresponsive.
Does anyone have a possible explanation as to why this is happening
Re: Blade Brothers Engine: Creating my first 2D Game Engine
Posted: Sat Mar 13, 2010 8:04 pm
by GroundUpEngine
Dun use case statement they slow as hell for Input stuff, use if statements instead ->