Blade Brothers Engine: Creating my first 2D Game Engine
Moderator: PC Supremacists
- LeonBlade
- Chaos Rift Demigod
- Posts: 1314
- Joined: Thu Jan 22, 2009 12:22 am
- Current Project: Trying to make my first engine in C++ using OGL
- Favorite Gaming Platforms: PS3
- Programming Language of Choice: C++
- Location: Blossvale, NY
Re: Blade Brothers Engine: Creating my first 2D Game Engine
Sorry I haven't done much, I've been sick lately and haven't had the energy to start work again.
I will soon.
I will soon.
There's no place like ~/
- LeonBlade
- Chaos Rift Demigod
- Posts: 1314
- Joined: Thu Jan 22, 2009 12:22 am
- Current Project: Trying to make my first engine in C++ using OGL
- Favorite Gaming Platforms: PS3
- Programming Language of Choice: C++
- Location: Blossvale, NY
Re: Blade Brothers Engine: Creating my first 2D Game Engine
Alright now I'm working on my BBEMap class which will load in a .map file which currently is just this:
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.
Code: Select all
0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0
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.
There's no place like ~/
- LeonBlade
- Chaos Rift Demigod
- Posts: 1314
- Joined: Thu Jan 22, 2009 12:22 am
- Current Project: Trying to make my first engine in C++ using OGL
- Favorite Gaming Platforms: PS3
- Programming Language of Choice: C++
- Location: Blossvale, NY
Re: Blade Brothers Engine: Creating my first 2D Game Engine
Sorry for the lack of quality at first, it's still processing
http://www.youtube.com/watch?v=j7pFkLQs7Pw
http://www.youtube.com/watch?v=j7pFkLQs7Pw
There's no place like ~/
- LeonBlade
- Chaos Rift Demigod
- Posts: 1314
- Joined: Thu Jan 22, 2009 12:22 am
- Current Project: Trying to make my first engine in C++ using OGL
- Favorite Gaming Platforms: PS3
- Programming Language of Choice: C++
- Location: Blossvale, NY
Re: Blade Brothers Engine: Creating my first 2D Game Engine
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!
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!
There's no place like ~/
- Falco Girgis
- Elysian Shadows Team
- Posts: 10294
- Joined: Thu May 20, 2004 2:04 pm
- Current Project: Elysian Shadows
- Favorite Gaming Platforms: Dreamcast, SNES, NES
- Programming Language of Choice: C/++
- Location: Studio Vorbis, AL
- Contact:
Re: Blade Brothers Engine: Creating my first 2D Game Engine
Oh shit, that's XCode. I had no idea you were a Mac user, dude.
Great video, btw. I subbed, 5 starred, and favorited.
Great video, btw. I subbed, 5 starred, and favorited.
- LeonBlade
- Chaos Rift Demigod
- Posts: 1314
- Joined: Thu Jan 22, 2009 12:22 am
- Current Project: Trying to make my first engine in C++ using OGL
- Favorite Gaming Platforms: PS3
- Programming Language of Choice: C++
- Location: Blossvale, NY
Re: Blade Brothers Engine: Creating my first 2D Game Engine
Haha, yepGyroVorbis 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.
And thanks, I hope to be making some new videos soon once I work out the map stuff.
There's no place like ~/
-
- Chaos Rift Newbie
- Posts: 31
- Joined: Thu Mar 11, 2010 2:51 am
- Current Project: VB.NET Direct X Game Engine (Working Title)
- Favorite Gaming Platforms: PC
- Programming Language of Choice: VB.NET (for now)
- Location: Nebreska, USA
- Contact:
Re: Blade Brothers Engine: Creating my first 2D Game Engine
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!
Amatuer Game Design/Programmer & College Student (Kaplan University: Associate of Applied Sceince in Information Technology: Application Devleopment)
Know Programming Languages & Considered Levels Of Programming in them: Basic(DOS) - 10%, VB(Legacy) - 15%, VB.NET - 55%, C/C++ - 1%, C# - 1%, LUA - 25%, Java - 0%, COBOL - 0%
________________________________________________
Current Game Development/Programming Projects:
VB.NET Direct X Game Engine (Working Title) - (Lanugage: VB.NET | Released Type/Status: Open Soruce / Unreleased)
________________________________________________
Quicks14Blog (My Gaming Related Blog Page) - My Youtube Channel Page
Know Programming Languages & Considered Levels Of Programming in them: Basic(DOS) - 10%, VB(Legacy) - 15%, VB.NET - 55%, C/C++ - 1%, C# - 1%, LUA - 25%, Java - 0%, COBOL - 0%
________________________________________________
Current Game Development/Programming Projects:
VB.NET Direct X Game Engine (Working Title) - (Lanugage: VB.NET | Released Type/Status: Open Soruce / Unreleased)
________________________________________________
Quicks14Blog (My Gaming Related Blog Page) - My Youtube Channel Page
- LeonBlade
- Chaos Rift Demigod
- Posts: 1314
- Joined: Thu Jan 22, 2009 12:22 am
- Current Project: Trying to make my first engine in C++ using OGL
- Favorite Gaming Platforms: PS3
- Programming Language of Choice: C++
- Location: Blossvale, NY
Re: Blade Brothers Engine: Creating my first 2D Game Engine
http://www.youtube.com/watch?v=hzXEqPJHCJY
Thanks again for those that helped out, I'll be posting very soon once I get actual tiles down
There's no place like ~/
Re: Blade Brothers Engine: Creating my first 2D Game Engine
Great! Can't wait to see it in the engine! I just love seeing other people's game dev videos
- GroundUpEngine
- Chaos Rift Devotee
- Posts: 835
- Joined: Sun Nov 08, 2009 2:01 pm
- Current Project: mixture
- Favorite Gaming Platforms: PC
- Programming Language of Choice: C++
- Location: UK
Re: Blade Brothers Engine: Creating my first 2D Game Engine
aha same! I wanna see these maps in action
- LeonBlade
- Chaos Rift Demigod
- Posts: 1314
- Joined: Thu Jan 22, 2009 12:22 am
- Current Project: Trying to make my first engine in C++ using OGL
- Favorite Gaming Platforms: PS3
- Programming Language of Choice: C++
- Location: Blossvale, NY
Re: Blade Brothers Engine: Creating my first 2D Game Engine
http://www.youtube.com/watch?v=tOldic2brhw
I'm pretty excited for this.
It's not much, but it's something
There's no place like ~/
- LeonBlade
- Chaos Rift Demigod
- Posts: 1314
- Joined: Thu Jan 22, 2009 12:22 am
- Current Project: Trying to make my first engine in C++ using OGL
- Favorite Gaming Platforms: PS3
- Programming Language of Choice: C++
- Location: Blossvale, NY
Re: Blade Brothers Engine: Creating my first 2D Game Engine
Oh god... I'm running into some problems.
The Events are slow as SHIT and nothing is instant.
Here is what my event look like:
Here is my mouse move:
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
The Events are slow as SHIT and nothing is instant.
Here is what my event look like:
Code: Select all
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;
}
}
}
Code: Select all
void BBEGame::HandleMouseMove(SDL_Event *event)
{
//SDL_GetMouseState(&mouseX, &mouseY);
mouseX = event->motion.x;
mouseY = event->motion.y;
int rx = (mouseX % 32);
int ry = (mouseY % 32);
BBEPoint ps;
ps.x = mouseX - rx;
ps.y = mouseY - ry;
myCursor.Move(ps, false);
}
Does anyone have a possible explanation as to why this is happening
There's no place like ~/
- GroundUpEngine
- Chaos Rift Devotee
- Posts: 835
- Joined: Sun Nov 08, 2009 2:01 pm
- Current Project: mixture
- Favorite Gaming Platforms: PC
- Programming Language of Choice: C++
- Location: UK
Re: Blade Brothers Engine: Creating my first 2D Game Engine
Dun use case statement they slow as hell for Input stuff, use if statements instead ->
Code: Select all
SDL_Event event;
void handle()
{
if( event.type == SDL_QUIT )
{
quit = true;
}
//same for mouse stuff
}
..
while( quit == false )
{
if( SDL_PollEvent( &event ) )
{
handle();
}
}
- LeonBlade
- Chaos Rift Demigod
- Posts: 1314
- Joined: Thu Jan 22, 2009 12:22 am
- Current Project: Trying to make my first engine in C++ using OGL
- Favorite Gaming Platforms: PS3
- Programming Language of Choice: C++
- Location: Blossvale, NY
Re: Blade Brothers Engine: Creating my first 2D Game Engine
Code: Select all
// Event-related functions
void BBEGame::EventLoop(void)
{
SDL_Event event;
// Game loop
while ( SDL_PollEvent(&event) )
{
if (event.type == SDL_USEREVENT) {
HandleUserEvents(&event);
}
if (event.type == SDL_KEYUP) {
HandleKeyDown(&event);
}
if (event.type == SDL_QUIT) {
done = true;
}
if (event.type == SDL_MOUSEMOTION) {
HandleMouseMove(&event);
}
if (event.type == SDL_MOUSEBUTTONDOWN) {
HandleMouseDown(&event);
}
if (event.type == SDL_MOUSEBUTTONUP) {
HandleMouseUp(&event);
}
}
}
There's no place like ~/