Blade Brothers Engine: Creating my first 2D Game Engine

Anything related in any way to game development as a whole is welcome here. Tell us about your game, grace us with your project, show us your new YouTube video, etc.

Moderator: PC Supremacists

User avatar
lotios611
Chaos Rift Regular
Chaos Rift Regular
Posts: 160
Joined: Sun Jun 14, 2009 12:05 pm
Current Project: Game engine for the PC, PSP, and maybe more.
Favorite Gaming Platforms: Gameboy Micro
Programming Language of Choice: C++

Re: Blade Brothers Engine: Creating my first 2D Game Engine

Post by lotios611 »

Live-Dimension wrote:What's inflexible about it? you have drop-in OpenGL any-time, I believe it's made upon OGL. You have access to shaders. You wouldn't be doing much more if you did it in 2D OGL. You can always use bass if you really need to instead of the audio, but from what I've seen its good enough.
I've never looked into it that much, I guess I don't like it much because I'm used to SDL. With this much talk about it though, I might switch.
"Why geeks like computers: unzip, strip, touch, finger, grep, mount, fsck, more, yes, fsck, fsck, fsck, umount, sleep." - Unknown
User avatar
LeonBlade
Chaos Rift Demigod
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

Post by LeonBlade »





There's no place like ~/
User avatar
LeonBlade
Chaos Rift Demigod
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

Post by LeonBlade »

New video still processing, let me know what you think.
And let me know what I should do with the entity collision.
There's no place like ~/
User avatar
eatcomics
ES Beta Backer
ES Beta Backer
Posts: 2528
Joined: Sat Mar 08, 2008 7:52 pm
Location: Illinois

Re: Blade Brothers Engine: Creating my first 2D Game Engine

Post by eatcomics »

For the entity collision/second layer collision, just check if your y is lower than the other entities y, if it is, draw yourself over it :D It may take a little more code than simply drawing the top first, but you can figure it out I'm sure :D
Image
User avatar
LeonBlade
Chaos Rift Demigod
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

Post by LeonBlade »

eatcomics wrote:For the entity collision/second layer collision, just check if your y is lower than the other entities y, if it is, draw yourself over it :D It may take a little more code than simply drawing the top first, but you can figure it out I'm sure :D
Haha, I actually fixed all the problems in this video already ;)
And yes, I did sorting based on Y position.
All entities are stored in a vector that stores entity pointers.
So I used this to sort them...

Code: Select all

Entity::EntityControl.SortEntities();

...

struct EntitySort
{
	bool operator() (Entity* entity1, Entity* entity2) 
	{
		return (entity1->position.y < entity2->position.y);
	}
} SortY;

...

void Entity::SortEntities()
{
	std::sort(Entity::EntityStack.begin(), Entity::EntityStack.end(), SortY);
}
There's no place like ~/
User avatar
LeonBlade
Chaos Rift Demigod
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

Post by LeonBlade »


Now, with map editor :)
I'll be posting my entity collision issues at a later time.
I'm about to tackle a HUGE feature in the editor that I'm going to leave a surprise for now ;)

However, I will say that I want to enhance the UI a bit, because it's a bit bland and very weak at the moment.
And I'd like to change how the map scrolls a bit better as well, and I'll probably make the editor bigger as well.

Let me know what you think.
There's no place like ~/
User avatar
dandymcgee
ES Beta Backer
ES Beta Backer
Posts: 4709
Joined: Tue Apr 29, 2008 3:24 pm
Current Project: https://github.com/dbechrd/RicoTech
Favorite Gaming Platforms: NES, Sega Genesis, PS2, PC
Programming Language of Choice: C
Location: San Francisco
Contact:

Re: Blade Brothers Engine: Creating my first 2D Game Engine

Post by dandymcgee »

That editor looks slick.
Falco Girgis wrote:It is imperative that I can broadcast my narcissistic commit strings to the Twitter! Tweet Tweet, bitches! :twisted:
User avatar
LeonBlade
Chaos Rift Demigod
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

Post by LeonBlade »

Thanks, I'd like to make it look better though :roll:
There's no place like ~/
User avatar
eatcomics
ES Beta Backer
ES Beta Backer
Posts: 2528
Joined: Sat Mar 08, 2008 7:52 pm
Location: Illinois

Re: Blade Brothers Engine: Creating my first 2D Game Engine

Post by eatcomics »

Cool :D
Image
User avatar
LeonBlade
Chaos Rift Demigod
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

Post by LeonBlade »

Thank you :)

I'll give a hint to what I want to add in the editor.
It has something to do with the tiles...
Last edited by LeonBlade on Wed Jun 01, 2011 8:37 am, edited 1 time in total.
There's no place like ~/
User avatar
Bakkon
Chaos Rift Junior
Chaos Rift Junior
Posts: 384
Joined: Wed May 20, 2009 2:38 pm
Programming Language of Choice: C++
Location: Indiana

Re: Blade Brothers Engine: Creating my first 2D Game Engine

Post by Bakkon »

For collision of things like entities and trees, you could try having their collision bounds be a circle at their base. Then if you walk into something offset a bit, you can have your character slightly slide over to be able to get around the object, ala Zelda: Link to the Past.
LeonBlade wrote: I'll give a hint to what I want to add in the editor.
It has something to do with the tiles, and algorithms... fucking complex ones too...
Selecting multiple units of the tile sheet? :P
User avatar
cypher1554R
Chaos Rift Demigod
Chaos Rift Demigod
Posts: 1124
Joined: Sun Jun 22, 2008 5:06 pm

Re: Blade Brothers Engine: Creating my first 2D Game Engine

Post by cypher1554R »

LeonBlade wrote:Let me know what you think.
Your editor looks like an editor, which means you're on a good path. :) Keep it up!
User avatar
LeonBlade
Chaos Rift Demigod
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

Post by LeonBlade »

Bakkon wrote:For collision of things like entities and trees, you could try having their collision bounds be a circle at their base. Then if you walk into something offset a bit, you can have your character slightly slide over to be able to get around the object, ala Zelda: Link to the Past.
LeonBlade wrote: I'll give a hint to what I want to add in the editor.
It has something to do with the tiles, and algorithms... fucking complex ones too...
Selecting multiple units of the tile sheet? :P
No, that's easy ;)
There's no place like ~/
User avatar
GroundUpEngine
Chaos Rift Devotee
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

Post by GroundUpEngine »

cypher1554R wrote:Your editor looks like an editor
:lol: ;)
User avatar
LeonBlade
Chaos Rift Demigod
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

Post by LeonBlade »


No audio, lets see if you can figure it out ;)
There's no place like ~/
Post Reply