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

Post Reply
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 »

Sometime yesterday morning i decided instead of just fucking around doing nothing being all depressed to actually do something and well,i started learning some OpenGL and began messing around and what has come out of that is this:
Test
Test
OGLTest.png (90.14 KiB) Viewed 9482 times
It's a pretty basic 32x32 tile engine with a working camera and player, it loads a 128x128 tile map. Oh and the purple square and transparent shroom was just me fooling around with Quads, they currently rotate and the shroom's transparency goes up and down and it scales up and down to :), anyways hopefully from what i've learned from this i can apply it to completely redoing my SDL level editor using OpenGL and QT.
<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 »



This is something I've been meaning to do for a long time but just didn't have the time (school, relationship bullshit,etc). Finally i have just said fucku to my SDL level editor and made a new better one in QT :) this video showcases what it can do so far and it is a lot easier to use than the old one where every time you wanted to edit a new map you would have to go into a configuration text file and edit file paths and there would be times where it simply would just not load a file and there would be all sorts of nuisances, but no more!
<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 »

Just going to drop this screenshot here.
Inventory
Inventory
Inventory.png (165.06 KiB) Viewed 9372 times
So I've finally made some passable attempt at a inventory system, so far you can pick up items by touching them then activate the menu that has a Super Mario RPG background because that game is awesome and I've been losing a lot of sleep because of it. Afterwards scroll over to the Item screen and you have a fancy hand to display which item you are selecting then either press RSHIFT or B on the 360 controller and it will 'use' that item (aka activate that items corresponding lua script). Needs a bit more work, might add a little box of text telling you what the item does. Anyways that's all i have to share today, my productivity has been seriously lacking mainly because most of my time is spent asking myself questions that i will probably never get an answer for. Nonetheless if you read this entire paragraph with my bitching and all i thank you, have a wonderful day.
<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
Mutrify
ES Beta Backer
ES Beta Backer
Posts: 10
Joined: Wed Jul 21, 2010 2:44 pm
Favorite Gaming Platforms: PC, Wii U, PS2, X360, GBA, 3DS, PS3
Programming Language of Choice: C++
Location: Norway
Contact:

Re: Simple 2D RPG Engine

Post by Mutrify »

This looks very good :) I'm looking forward to more updates ;) :worship:
Website: http://www.mutrify.com (flash games, applications and more :) )
YouTube: http://www.youtube.com/user/Mutrify (Dev videos)
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 »

Mutrify wrote:This looks very good :) I'm looking forward to more updates ;) :worship:
Why thank you :)!

Anyways, here is a somewhat huge update.

I am rewriting the entire engine.

A lot of progress has been made, it still uses SDL for rendering because i don't feel confident enough with doing something like this with OpenGL, future projects will probably utilize OpenGL as i move forward in understanding it. Nonetheless here's an update on which systems thus far have been implemented and are being worked on, and which ones i have yet to.

Implemented/Working on:
  • -GameSystem (Basicly the main system that holds the rendering,image loading,collision & input retrieving functions)
    -TileSystem
    -AudioSystem
    -LuaSystem
    -AdvLogSystem
    -DebugSystem
    -PlayerSystem
Yet To Be Implemented:
  • -Items&ObjectsSystem
    -NPCSystem (Friendly & Enemy)
    -BattleSystem
    -MenuSystem
    -TextboxSystem
    -PartySystem
    -AnimationSystem
Now you may be asking, well what was wrong with the old engine, let me tell you my good sirs/madams it was all inn a SINGLE source file all cluttered together, a lot of systems like items were just downright disgusting they wreaked of age and inexperience, one day i was pushed to the breaking point got really angry at my own incompetence and began a rewrite.

Now i'm not just going to basically clone everything in a new neat fashion, no i intend to make better versions of all the old systems, primarily the battle system,NPC system,Menu system,animation system and textbox system, those are the most disgusting areas of the old engine. After "researching" Final Fantasy's III,IV and VI with some Super Mario RPG and Chrono Trigger i have decided what kind of Battle system and Menu system i want, i want something along the lines of those games because for some reason i really like turn based combat and the way their menus work. Nonetheless that concludes this update, i apologize for making you all read so much but i like writing long and somewhat detailed descriptions to inform people of things, mainly because i myself like to know a lot of useless details and information :).
<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 »

There's something about programmers... We really like reading long texts about programming. Good luck on your rewrite (we all need). Might be a good time to start using CVS (if you're not using already).


off-topic edit
YouTube wrote:DeltaSpartanJizz liked In The Court Of The Crimson King - King Crimson [HQ Sound]
Oh yeah. Now I know why you're engine is so nice ;)
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:There's something about programmers... We really like reading long texts about programming. Good luck on your rewrite (we all need). Might be a good time to start using CVS (if you're not using already).


off-topic edit
YouTube wrote:DeltaSpartanJizz liked In The Court Of The Crimson King - King Crimson [HQ Sound]
Oh yeah. Now I know why you're engine is so nice ;)
I thank you kind sir, Nonetheless here's another unscheduled update.

So basically in just over a week i got a prototype item/object system done, I'd call that horrible progress but still, the benefit of this rewrite is it's much more clean and organized allowing for me to try new ideas that attempting in the old engines single source file would have made me want to bash my head into a wall thus i am making slow progressions, the project is taking a bit of a backseat to some emotional bullshit that has plagued me since about around 8am, Sunday, June 3rd 2012(conveniently seared and burned into my memory), so for those who actually want to see this project finish take solace this (WARNING this is going to sound extremely sad) project and music are the only things that keep me going and i am 100% intent on finishing it so one day i can place a game made with it in your hands and i hope it brings you joy. Also I want to release the toolkit for it so people can make some mods to the game or make their own :)

Anyways enough of my ranting, ladies and gentlemen, have a good morning I'll make another video as soon as i feel there is sufficient new features and things to entice you with ;)!
<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 »

Can hardly believe it's been a year since this thread was started, i must regrettably announce that i'm taking a break, i don't know how long it will be i'm sorry but i have a lot of shit to do and i just get home everyday and i'm just to depressed to get anything done, don't worry i'm not going to stop, i've come to far to do that now i am going to finish this project even if it takes me years i will finish it, i promise that and if i break that promise feel free to bitch at me and beat me for breaking it 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
eatcomics
ES Beta Backer
ES Beta Backer
Posts: 2528
Joined: Sat Mar 08, 2008 7:52 pm
Location: Illinois

Re: Simple 2D RPG Engine

Post by eatcomics »

Light-Dark wrote:Can hardly believe it's been a year since this thread was started, i must regrettably announce that i'm taking a break, i don't know how long it will be i'm sorry but i have a lot of shit to do and i just get home everyday and i'm just to depressed to get anything done, don't worry i'm not going to stop, i've come to far to do that now i am going to finish this project even if it takes me years i will finish it, i promise that and if i break that promise feel free to bitch at me and beat me for breaking it lol.
Right on man! We all have slumps, if you aren't excited and ready to work, then something needs to change. If that means taking a break, stepping back, and fixing shit, then that's what has to be done. The best thing you can do is listen to your body and mental state. Knowing yourself is the first step to improving your life ten fold. If you ever get too down or just want some kind of motivation, let us know. You're fellow programmers have your back. Also if you ever need a weekend coding buddy to chat to on skype just PM me, either here or on the moosader boards. I try to check both daily. :D best of luck
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 »

eatcomics wrote: Right on man! We all have slumps, if you aren't excited and ready to work, then something needs to change. If that means taking a break, stepping back, and fixing shit, then that's what has to be done. The best thing you can do is listen to your body and mental state. Knowing yourself is the first step to improving your life ten fold. If you ever get too down or just want some kind of motivation, let us know. You're fellow programmers have your back. Also if you ever need a weekend coding buddy to chat to on skype just PM me, either here or on the moosader boards. I try to check both daily. :D best of luck
Thank you man, that means quite a bit :), Nonetheless I present all those who have been following this project with a gift I guess! https://www.dropbox.com/s/tg4hbryi07wkbg9/Engine.zip, It's the latest build of the old Engine, you can mess around with lua there is a script in the documentation folder detailing it. Also if you want to make your own maps the engine runs on a 128x128 tile grid, each tile is 32x32 and the map files just contain tile type numbers in 16-bit(short) unsigned integers! I haven't included the source code just yet because I'm sure it would make people vomit at how disgusting it is and it is a very bad example, however I plan on releasing the new engine's source after I finish a game with it.

On the topic of the new engine, I will mention some of the tiny updates made in the past 3 months, they are:
-Collision layer/Collision box map
-Basic NPC system setup
-Re-implemented 360 controller input
-A few little optimizations here and there
-More comments(I'm lazy when it comes to documenting my stuff, I don't need documentation since I remember what everything i write does but that will not suffice if I release it to the public)
<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
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: Simple 2D RPG Engine

Post by dandymcgee »

Light-Dark wrote: -More comments(I'm lazy when it comes to documenting my stuff, I don't need documentation since I remember what everything i write does but that will not suffice if I release it to the public)
Or if you take a long break and come back to it. I often return to old projects at work and am constantly thanking myself for having commented them so well.
Falco Girgis wrote:It is imperative that I can broadcast my narcissistic commit strings to the Twitter! Tweet Tweet, bitches! :twisted:
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 »

dandymcgee wrote:
Light-Dark wrote: -More comments(I'm lazy when it comes to documenting my stuff, I don't need documentation since I remember what everything i write does but that will not suffice if I release it to the public)
Or if you take a long break and come back to it. I often return to old projects at work and am constantly thanking myself for having commented them so well.
Good point, I think I shall put some more time into documenting my code.
<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
MarauderIIC
Respected Programmer
Respected Programmer
Posts: 3406
Joined: Sat Jul 10, 2004 3:05 pm
Location: Maryland, USA

Re: Simple 2D RPG Engine

Post by MarauderIIC »

Yeah my general rule is "if you come back in two years from never seeing it will the comments make sense". As opposed to the other standard of "if someone new comes to the project that's never seen it will the comments make sense" because that tends to make things a bit too verbose =)
I realized the moment I fell into the fissure that the book would not be destroyed as I had planned.
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: Simple 2D RPG Engine

Post by dandymcgee »

MarauderIIC wrote:As opposed to the other standard of "if someone new comes to the project that's never seen it will the comments make sense" because that tends to make things a bit too verbose =)
Well the comments should still make sense, but they shouldn't repeat what the code says:
//If data collection is empty set the empty flag to true
if(dataCollection.IsEmpty()) {
	empty = true;
}
Better code:
//Set empty flag
empty = dataCollection.IsEmpty();
Falco Girgis wrote:It is imperative that I can broadcast my narcissistic commit strings to the Twitter! Tweet Tweet, bitches! :twisted:
User avatar
wtetzner
Chaos Rift Regular
Chaos Rift Regular
Posts: 159
Joined: Wed Feb 18, 2009 6:43 pm
Current Project: waterbear, GBA game + editor
Favorite Gaming Platforms: Game Boy Advance
Programming Language of Choice: OCaml
Location: TX
Contact:

Re: Simple 2D RPG Engine

Post by wtetzner »

dandymcgee wrote: Better code:
//Set empty flag
empty = dataCollection.IsEmpty();
Even this seems like a pointless comment to me. You're still just repeating what the code says. The comment should say why you're doing it.
// Cache empty state, because IsEmpty is expensive to call.
empty = dataCollection.IsEmpty();
The novice realizes that the difference between code and data is trivial. The expert realizes that all code is data. And the true master realizes that all data is code.
Post Reply