2D RPG 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
Falco Girgis
Elysian Shadows Team
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: Simple 2D RPG Engine

Post by Falco Girgis »

You should really post an .elf, so that those of us with BBAs and coder's cables can test the executable.

Are you far enough along to have considered render order and depth buffering for things like fences and trees, to give tiles the illusion of height/depth?

Anyway, looking great! Keep us updated!
User avatar
lalacomun
VS Setup Wizard
VS Setup Wizard
Posts: 114
Joined: Wed Dec 28, 2011 10:18 pm
Favorite Gaming Platforms: psx, nintendo ds, gameboy advance, xbox 360, ps2
Programming Language of Choice: C++
Location: Argentina
Contact:

Re: Simple 2D RPG Engine

Post by lalacomun »

Falco Girgis wrote:You should really post an .elf, so that those of us with BBAs and coder's cables can test the executable.

Are you far enough along to have considered render order and depth buffering for things like fences and trees, to give tiles the illusion of height/depth?

Anyway, looking great! Keep us updated!
He posted a .cdi for the Dreamcast in case you missed it, here it is:

https://www.dropbox.com/s/9nuwvc03us43hji/Engine.cdi
Image
User avatar
Light-Dark
Dreamcast Developer
Dreamcast Developer
Posts: 307
Joined: Sun Mar 13, 2011 7:57 pm
Current Project: 2D RPG & NES Platformer
Favorite Gaming Platforms: NES,SNES,N64,Genesis,Dreamcast,PC,Xbox360
Programming Language of Choice: C/++
Location: Canada

Re: Simple 2D RPG Engine

Post by Light-Dark »

lalacomun wrote:
Falco Girgis wrote:You should really post an .elf, so that those of us with BBAs and coder's cables can test the executable.

Are you far enough along to have considered render order and depth buffering for things like fences and trees, to give tiles the illusion of height/depth?

Anyway, looking great! Keep us updated!
He posted a .cdi for the Dreamcast in case you missed it, here it is:

https://www.dropbox.com/s/9nuwvc03us43hji/Engine.cdi
Regarding that CDI I would not recommend it! has some bugs in it :/ and I'm working on acquiring a coders cable or BBA so I can resume testing( reached the limits with emulation, it really sucks). I don't think I'm ready to add something like that quite yet but I think I'll do a little bit of experimenting on the side with render order and depth buffering. Right now I'm planning out the conversation system and animation system because before the rewrite the conversation system was very limited and completely linear and the animation was just very messy and all over the place and in my opinion disgusting, so I want to get it right this time. And thank you I will!
<tpw_rules> LightDark: java is a consequence of inverse moore's law: every 18 months, the average program will be twice as slow. therefore, computers always run at the same percevied speed. java's invention was a monumental step
Image
User avatar
Falco Girgis
Elysian Shadows Team
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: Simple 2D RPG Engine

Post by Falco Girgis »

lalacomun wrote:
Falco Girgis wrote:You should really post an .elf, so that those of us with BBAs and coder's cables can test the executable.

Are you far enough along to have considered render order and depth buffering for things like fences and trees, to give tiles the illusion of height/depth?

Anyway, looking great! Keep us updated!
He posted a .cdi for the Dreamcast in case you missed it, here it is:

https://www.dropbox.com/s/9nuwvc03us43hji/Engine.cdi
I know... and I requested an .elf. Ain't nobody got time to burn CDs every time they want to test something on real hardware... :mrgreen:
User avatar
Light-Dark
Dreamcast Developer
Dreamcast Developer
Posts: 307
Joined: Sun Mar 13, 2011 7:57 pm
Current Project: 2D RPG & NES Platformer
Favorite Gaming Platforms: NES,SNES,N64,Genesis,Dreamcast,PC,Xbox360
Programming Language of Choice: C/++
Location: Canada

Re: Simple 2D RPG Engine

Post by Light-Dark »



Tile animation is here! It employs a decently flexible system to animate tiles I thought up while playing Ocarina of Time earlier today. Next up is the dialogue system!

Also while I'm here I don't think I've really talked much about where I want to take the game itself in terms of story and aesthetics. I was thinking of making it a Cold War based RPG,I mean we got the Allies who are the good guys and we got the Soviets who are seen as the "evil empire". The politics of that era just fascinate me and it's the perfect setup for a classic final fantasy esque storyline. I dunno we'll see how things pan out! I wish you all a good day and I thank you for continuing to follow this thread :)
<tpw_rules> LightDark: java is a consequence of inverse moore's law: every 18 months, the average program will be twice as slow. therefore, computers always run at the same percevied speed. java's invention was a monumental step
Image
K-Bal
ES Beta Backer
ES Beta Backer
Posts: 701
Joined: Sun Mar 15, 2009 3:21 pm
Location: Germany, Aachen
Contact:

Re: Simple 2D RPG Engine

Post by K-Bal »

Looks good!

I think your game idea might be more interesting if you don't prematurely categorize the opposing parties in good and evil.
User avatar
Light-Dark
Dreamcast Developer
Dreamcast Developer
Posts: 307
Joined: Sun Mar 13, 2011 7:57 pm
Current Project: 2D RPG & NES Platformer
Favorite Gaming Platforms: NES,SNES,N64,Genesis,Dreamcast,PC,Xbox360
Programming Language of Choice: C/++
Location: Canada

Re: Simple 2D RPG Engine

Post by Light-Dark »

K-Bal wrote:Looks good!

I think your game idea might be more interesting if you don't prematurely categorize the opposing parties in good and evil.
Yeah I'm certainly no writer :P, I was referencing something said by Reagan. Also I made a twitter account because it seems to the the hip and trendy thing to do! https://twitter.com/LightDark80
<tpw_rules> LightDark: java is a consequence of inverse moore's law: every 18 months, the average program will be twice as slow. therefore, computers always run at the same percevied speed. java's invention was a monumental step
Image
User avatar
Light-Dark
Dreamcast Developer
Dreamcast Developer
Posts: 307
Joined: Sun Mar 13, 2011 7:57 pm
Current Project: 2D RPG & NES Platformer
Favorite Gaming Platforms: NES,SNES,N64,Genesis,Dreamcast,PC,Xbox360
Programming Language of Choice: C/++
Location: Canada

Re: Simple 2D RPG Engine

Post by Light-Dark »



Started on a depth system and added uniform zoom!
<tpw_rules> LightDark: java is a consequence of inverse moore's law: every 18 months, the average program will be twice as slow. therefore, computers always run at the same percevied speed. java's invention was a monumental step
Image
User avatar
bbguimaraes
Chaos Rift Junior
Chaos Rift Junior
Posts: 294
Joined: Wed Apr 11, 2012 4:34 pm
Programming Language of Choice: c++
Location: Brazil
Contact:

Re: Simple 2D RPG Engine

Post by bbguimaraes »

Interesting. That "LoadLevel" was really impressive. Is it me or zooming on the textures is GL_LINEAR on some but GL_NEAREST on others?
User avatar
Light-Dark
Dreamcast Developer
Dreamcast Developer
Posts: 307
Joined: Sun Mar 13, 2011 7:57 pm
Current Project: 2D RPG & NES Platformer
Favorite Gaming Platforms: NES,SNES,N64,Genesis,Dreamcast,PC,Xbox360
Programming Language of Choice: C/++
Location: Canada

Re: Simple 2D RPG Engine

Post by Light-Dark »

bbguimaraes wrote:Interesting. That "LoadLevel" was really impressive. Is it me or zooming on the textures is GL_LINEAR on some but GL_NEAREST on others?
In that video it should all be GL_LINEAR, however I think you just solved my problem with the lines in between tiles by trying GL_NEAREST :lol:
<tpw_rules> LightDark: java is a consequence of inverse moore's law: every 18 months, the average program will be twice as slow. therefore, computers always run at the same percevied speed. java's invention was a monumental step
Image
User avatar
Light-Dark
Dreamcast Developer
Dreamcast Developer
Posts: 307
Joined: Sun Mar 13, 2011 7:57 pm
Current Project: 2D RPG & NES Platformer
Favorite Gaming Platforms: NES,SNES,N64,Genesis,Dreamcast,PC,Xbox360
Programming Language of Choice: C/++
Location: Canada

Re: Simple 2D RPG Engine

Post by Light-Dark »

So I refined the depth and collision systems to work together and...


Behold! Not only does this engine support 2 Tile layers, but now up to 8 depth levels per tile!
<tpw_rules> LightDark: java is a consequence of inverse moore's law: every 18 months, the average program will be twice as slow. therefore, computers always run at the same percevied speed. java's invention was a monumental step
Image
User avatar
Falco Girgis
Elysian Shadows Team
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: Simple 2D RPG Engine

Post by Falco Girgis »

Looks sexy as shit! I especially liked that Lua function to elevate his ass.

How are you handling transitioning the player's depth? For example, when you walk up the ladder, and your depth becomes 1 (or whatever) to put you above the bridge (when you were below it)?

Are you also handling the z-ordering of standalone entities/characters as well? Or is this just for tiles?

Your camera might be having some zoom/scaling issues. XD
User avatar
Light-Dark
Dreamcast Developer
Dreamcast Developer
Posts: 307
Joined: Sun Mar 13, 2011 7:57 pm
Current Project: 2D RPG & NES Platformer
Favorite Gaming Platforms: NES,SNES,N64,Genesis,Dreamcast,PC,Xbox360
Programming Language of Choice: C/++
Location: Canada

Re: Simple 2D RPG Engine

Post by Light-Dark »

Falco Girgis wrote:Looks sexy as shit! I especially liked that Lua function to elevate his ass.

How are you handling transitioning the player's depth? For example, when you walk up the ladder, and your depth becomes 1 (or whatever) to put you above the bridge (when you were below it)?

Are you also handling the z-ordering of standalone entities/characters as well? Or is this just for tiles?

Your camera might be having some zoom/scaling issues. XD
Thanks! And to hopefully answer your questions: I handle all my warping/transitions through lua however this gets tedious so I'm working on putting in place some sort of warping system to sort that matter out. Yes I'm planning on handling the Z-ordering of NPC's and other characters when I finally implement them. My main hold up being that I want to get the conversation/text box system out of the way now, I've been putting it off for to long now. And yeah the camera is still a work in progress :lol:
<tpw_rules> LightDark: java is a consequence of inverse moore's law: every 18 months, the average program will be twice as slow. therefore, computers always run at the same percevied speed. java's invention was a monumental step
Image
User avatar
Falco Girgis
Elysian Shadows Team
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: Simple 2D RPG Engine

Post by Falco Girgis »

Light-Dark wrote:I handle all my warping/transitions through lua however this gets tedious so I'm working on putting in place some sort of warping system to sort that matter out.
That's cool, but what does that look like at a lower level? Is there a bounding box at the bottom of the steps where Lua is promoting the player's depth when he collides with that box?
Light-Dark wrote: And yeah the camera is still a work in progress :lol:
Post your camera transform operations. I can help.
User avatar
Light-Dark
Dreamcast Developer
Dreamcast Developer
Posts: 307
Joined: Sun Mar 13, 2011 7:57 pm
Current Project: 2D RPG & NES Platformer
Favorite Gaming Platforms: NES,SNES,N64,Genesis,Dreamcast,PC,Xbox360
Programming Language of Choice: C/++
Location: Canada

Re: Simple 2D RPG Engine

Post by Light-Dark »

Falco Girgis wrote:
Light-Dark wrote:I handle all my warping/transitions through lua however this gets tedious so I'm working on putting in place some sort of warping system to sort that matter out.
That's cool, but what does that look like at a lower level? Is there a bounding box at the bottom of the steps where Lua is promoting the player's depth when he collides with that box?
Light-Dark wrote: And yeah the camera is still a work in progress :lol:
Post your camera transform operations. I can help.
Basically it's doing a bounding box collision detection between the player and the specified tile, if the player is colliding with the lower tile it shifts the depth value down in lua, however if the player is colliding with the upper tile it shifts the depth value up. To keep from creating unnecessary issues I have the players x and y 'snapped' to multiples of 32x32 so the player won't be colliding with both at the same time. This system serves as a place holder for the moment.

And this is how camera zooming/rotating is currently handled:
void GameSystem::Camera_Transform(const float scale,const float rotation)
{
    UniformScaleVal = scale;
    camera.w = SCREEN_WIDTH * (1/scale);
    camera.h = SCREEN_HEIGHT * (1/scale);
    glScalef(scale,scale,1);
    
    glTranslatef(camera.w/2,camera.h/2,0);
    glRotatef(rotation,0,0,1);
    glTranslatef(-camera.w/2,-camera.h/2,0);
    
}
<tpw_rules> LightDark: java is a consequence of inverse moore's law: every 18 months, the average program will be twice as slow. therefore, computers always run at the same percevied speed. java's invention was a monumental step
Image
Post Reply