Page 5 of 19

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

Posted: Wed Mar 17, 2010 5:42 pm
by GroundUpEngine
I like the design, simple but effective ;)

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

Posted: Wed Mar 17, 2010 10:42 pm
by LeonBlade
This thing is frustrating... well... sort of...
The thing with doing this in SDL is that it's a pain in the fucking ass because I have no UI controls to give me ease of use...

I COULD do it in SDL entirely and have a fuck load of extra work that I don't want to do.
Basically have have the tilesheet on the right like described and the controls at the top.

Buttons will move the tilesheet up and down (because it doesn't all fit on the damn screen.
Then I'll need to keep track of how much I've scrolled so I know which tile I'm referencing based on the cursor position
of the tile.

UNLESS, I instead decide to attach an event on to each tile sprite that will react to you clicking it inside it's own "box" and then returning information back so that I can change tile information.
Then it doesn't matter where I am scroll wise, because all the tile clicking is done on each individual sprite and returned back from that click function.

That would make things easier in a way, but then I'd have to either extend the sprite class or make another class that inherits from the Sprite class to get the clicking in place. And adding a class JUST for the level editor seems pointless for the actual engine.

So I was thinking... should I instead make my map editor in another language?
As stupid as this sounds to most I'm sure, I was thinking about making it in Adobe AIR.

What do you all think about this?

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

Posted: Thu Mar 18, 2010 6:18 am
by Live-Dimension
I'd render the map in SDL, and use some sort of widget system for map editor UI.

IE, look at Marcel's editor, or most other "professional" editors.

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

Posted: Thu Mar 18, 2010 6:21 am
by LeonBlade
Live-Dimension wrote:I'd render the map in SDL, and use some sort of widget system for map editor UI.

IE, look at Marcel's editor, or most other "professional" editors.
That's what I was thinking, but I wasn't sure.
I'll have to have some other way of displaying the tilesheet that isn't with SDL.

I'll take a look into it more after I wake up.

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

Posted: Thu Mar 18, 2010 2:01 pm
by quickshot14
LeonBlade wrote:
Live-Dimension wrote:I'd render the map in SDL, and use some sort of widget system for map editor UI.

IE, look at Marcel's editor, or most other "professional" editors.
That's what I was thinking, but I wasn't sure.
I'll have to have some other way of displaying the tilesheet that isn't with SDL.

I'll take a look into it more after I wake up.

Thats kind of the approch I was looking at with my vb.net project I already have a small barley function editor in place, right now it just can load and save map information files, but what I have in the back of my mind is essincly using
the standard vb.net, like i already started, to do most elments of the editor and for the acutal map display, use managed directx to draw that all out so it looks basicly like it should in the acutal game. So yeah totaly makes sense and is
a good way to go and should hopefully make your job of creating it a little easier if not a lot easier.

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

Posted: Sun Mar 21, 2010 10:20 pm
by LeonBlade
I really don't know what I'm going to do... I could port everything to OpenGL instead and try to start from there... what do you think?
The map editor is just starting to become a huge pain in the ass, my existing code for my SDL project is way to complicated to edit and change shit with so... what do you think?

I think I'll just start learning OpenGL for 2D, plus it's better than SDL and I'll be able to go through and rewrite everything in a namespace.
What do you all think?

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

Posted: Mon Mar 22, 2010 12:49 pm
by Milch
I did the same thing on my engine.
This gave me the chance to rewrite everything to make it more modular and add a bunch of new features ( like implementing AngelScript ).
So do it!

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

Posted: Mon Mar 22, 2010 9:53 pm
by eatcomics
LeonBlade wrote:I really don't know what I'm going to do... I could port everything to OpenGL instead and try to start from there... what do you think?
The map editor is just starting to become a huge pain in the ass, my existing code for my SDL project is way to complicated to edit and change shit with so... what do you think?

I think I'll just start learning OpenGL for 2D, plus it's better than SDL and I'll be able to go through and rewrite everything in a namespace.
What do you all think?
I'd say it depends. If you do OGL you're still gonna have to deal with SDL, or SFML. If you want like rotation and lighting and stuff, then yeah go for it. But if you don't I'd say go with SDL... I think it would be easier that way. I'd say just restructure your stuff with an editor in mind. What problems are you having with the editor?

I don't see why you need something besides SDL for displaying tilesheets? And you don't necessarily need a UI system, maybe just some simple functions for creating buttons and lists or something. Maybe something for windows, but really I think if you're having problems in SDL you're going to have lots of problems in OGL, then where will you go?

Although I have to say, I'm really enjoying OpenGL and you should definitely try some OGL before you really decide.

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

Posted: Mon Mar 22, 2010 10:10 pm
by GroundUpEngine
LeonBlade wrote:I really don't know what I'm going to do... I could port everything to OpenGL instead and try to start from there... what do you think?
The map editor is just starting to become a huge pain in the ass, my existing code for my SDL project is way to complicated to edit and change shit with so... what do you think?

I think I'll just start learning OpenGL for 2D, plus it's better than SDL and I'll be able to go through and rewrite everything in a namespace.
What do you all think?
You don't have to port or rewrite in another language, just make a GUI and Keyboard/Mouse Input class in your engine and do the Rendering with SDL...
If a map works in your editor(engine as core) then it will work in your game(engine as core), don't over complicate things ;)

p.s. GUI can be used in a game, not just for an editor or tool

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

Posted: Tue Mar 23, 2010 3:21 am
by LeonBlade
Sorry, I was dealing with a lot of issues and my head wasn't straight when I first started tackling these problems.
I'm going to continue doing this map editor in SDL like I originally planned.

I plan on making the input class that will handle Mouse and Keyboard events.
The sprites will each have their own bounding box in which if you click in you can activate a click function.

I wanted to have a separate panel for the tilesheet, but because of how I'm doing this, that is out of the question.
My plans are to just make the size of the window wider to fit the tilesheet and tools on the right like I planned on before.

Each tile will return it's tile ID when you click it so that I can set the currently used tile as the one I selected.

Because the full tileset isn't gonna fit on the damn screen, I'll add some UI elements that will allow you to scroll up/down to select tiles that can't be displayed.

Oh, and I want to use ColorKey to set a certain color to be transparent... except... I can't get that to work...
So, I'm just using a regular PNG with transparency instead :roll:

In fact, now that I think of it, I'm going to create a whole UI class that can handle a few things like...
  • Button
  • Alert boxes
  • Input boxes
  • List views
  • Various pre-built dialogs like open and save map
...and some others in the future.

All UI elements will inherit from sprites, and have their own properties to them that makes them unique such as clicking for buttons and being able to type in input boxes etc.

I don't know if I'll work on this tonight while it's fresh in my head or not, it's 4:21 AM right now :lol:
I'm going to grab a Mountain Dew... we'll see what happens.

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

Posted: Tue Mar 23, 2010 4:38 am
by LeonBlade
Alright, I had a problem with the function pointers but I fixed that...
I converted my whole project to a BBE namespace instead of having BBEClass for every file name :lol:

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

Posted: Tue Mar 23, 2010 4:56 am
by GroundUpEngine
LeonBlade wrote: The error I'm getting is, that 'Button' has not been declared what on earth is this shit?
I must be doing something wrong, can someone assist me?
Wrap both the class declaration and the class function declarations with your namespace bro ;)

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

Posted: Tue Mar 23, 2010 5:09 am
by LeonBlade
GroundUpEngine wrote:
LeonBlade wrote: The error I'm getting is, that 'Button' has not been declared what on earth is this shit?
I must be doing something wrong, can someone assist me?
Wrap both the class declaration and the class function declarations with your namespace bro ;)
Ahh! Thank you!!! :)

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

Posted: Wed Mar 24, 2010 6:11 am
by MrDeathNote
LeonBlade wrote: Oh, and I want to use ColorKey to set a certain color to be transparent... except... I can't get that to work...
So, I'm just using a regular PNG with transparency instead :roll:
What code where you using for the ColorKey?

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

Posted: Wed Mar 24, 2010 8:51 am
by LeonBlade
MrDeathNote wrote:
LeonBlade wrote: Oh, and I want to use ColorKey to set a certain color to be transparent... except... I can't get that to work...
So, I'm just using a regular PNG with transparency instead :roll:
What code where you using for the ColorKey?
I just was about to get you or someone else to help me out, but I got it working.
Only problem is, I have to use BMP files in order for it to work right... what the fuck is this shit?