My Adventure Game Engine - Making Way For Adventure Engine 2
Posted: Thu Aug 06, 2009 4:46 am
NEW DEMO AVAILABLE ON PAGE 27
Go to page 27 to download the demo.
viewtopic.php?f=5&t=888&start=260
THE INSIDE STORY OF THE ROAD TO DEVELOPMENT:
While it is not ready for public consumption, I thought it was ready enough to show off. OMG SO MUCH TEXT! Read it all, it's good stuff.
First a little history. I have dreamed of creating a Zelda style game since high school when I took a graph paper pad and would draw tile based worlds and plan out scripts and how it would play. But I didn't have the means. None of the languages I knew were fast enough and I didn't know enough about programming to create a working engine, so I put the idea on hold for a decade.
Last year I discovered DOSBox, an app for OS X that emulates DOS at full speed or faster on my Intel Mac. I promptly found an old copy of QuickBASIC 4.5 and started work on an RPG engine designed to mimic games like the old Dragon Warrior or Final Fantasy games with battles mimicking Earthbound. While it was fast as long as I upped the cycles I quickly ran out of RAM since QuickBASIC was designed for old computers who never had more than 1MB of RAM so the program had an artificial memory ceiling. Boo! I had to find a replacement language quick!
The day before I found out I was losing my job I started work on a version of my engine that ran in Safari using its superfast JavaScript engine and took advantage of CSS and HTML5 features like the Canvas element that allowed drawing of shapes and images onto a "canvas" in an HTML page much the same way LÖVE does it. I quickly discovered that the JS engine was so fast, I could switch to live-action Zelda style encounters instead of turn-based. At first I also had scrolling maps but quickly went back to screen based maps when it turned out to be way too slow on large maps. (Moving a giant canvas, actually multiple giant canvases, every frame was taxing)
One day, a few months ago, I was cruising iDevGames' blog when I stumbled upon an article for Löve. What a crazy random happenstance! Had I not decided to look at that blog I would have missed this amazing engine. As soon as I downloaded it and examined all the wonderful examples and discovered how easy it was to create in Lua, I was hooked. I promptly started work on a Lua version of my engine I had written and rewritten twice already.
Right now it is a game engine without a direction. But that will develop in time. The final game WILL NOT be a Zelda fangame. And it probably won't even resemble Zelda. Hell, there is no roadmap for the game development. Right now all work is being concentrated on the engine stability and features so I can do things if I choose to. The player uses a sword and has a boomerang and bombs and arrows, but that could become a gun or rocks or a bat at some point. Who knows what I will create? I'm no Pixel, I could never come up with a compelling Cave Story. And I didn't create Knytt Stories, nor am I going to try to. I really don't know what this will be when it is all done say 5-10 years from now. Remember, Cave Story took 5 years and one person. Bob's Game also took 5 years and one crazy-ass person who completely went about it all wrong. I am also one man, and I also plan on taking 5 years on and off to create a game. Probably.
Do I have an idea for a setting? Well, I was always thinking of modern times. Not many games like this take place in modern times. With modern technologies. I want to create a world with modern settings, cities with buildings, not villages with huts. I hope to create a huge sprawling world with many sections. Even though I want to make the game free as in Cave Story free, I want it to be good enough that some publisher sees it and says "Hey, that could work well on the Wii/360/PS3". But you don't get to that point by being cocky or rushing things. Braid took a few years before someone said it was Xbox 360 material. Cave Story came out years ago and is just now being ported to the Wii. There are tons of indie games out there, but only a handful are good enough to be remembered as "Yeah, I loved that game."
I will not provide the code at this time, but would be happy to answer any questions about how I do things I do. Without further do and adieu and ado and all that, here is a list of features...
FEATURES THUS FAR:
Rolling Health Display
What does this mean? Well, think the Mother/Earthbound series. Not many games use this system, which is terrible because it's such a cool idea. Basically think of it this way. Say you have 50HP and an enemy hits you for 51HP. Obviously you now have -1HP, i.e. you're dead.. right? Not necessarily. In EarthBound, the rolling HP counter was used so if you are in a battle, you still have time to heal yourself (or your companions) before you die. The slower your counter, the more time you have. Your character does not actually die until the counter reaches the new HP. So you can get hit and have -1HP (Well, let's just say 0), but your counter is still slowly (or quickly) counting down to 0. And with special items or armor that slow the counter, you can live for a while before having to quickly heal yourself. I am thinking of taking advantage of this by having health recovering special moves or items you can cary and use before you are down to 0.
Mapping System
Smoothly scrolling maps can be virtually any size and up to 5 layers (One main layer and four object detail layers.) at any time. Also in place is support for animated tiles like water.
Dialog System
Text dialogs pop up onto screen animated, then text types itself out onto the screen. You can press the action button to speed it up if you are impatient. Future plans call for "talk bubble callouts" where it will look like the character is saying it, like in the Mario & Luigi games, rather than just a plain box with text. (My JS game engine had this feature)
Scripting System
Currently in place is a rudimentary scripting system. This is my current focus. Without a good scripting system, a game is useless. So the Script system must be perfect. Currently there are three commands; Dialog, Warp (For changing to another map) and Give Money.
Enemies
Currently in place are enemies shamelessly copied from Zelda. Octorocks (Three kinds) spit rocks, Moblin's run around shooting arrows, and goddamned bats bounce around the playfield occasionally stopping and getting in your way. The enemies are categorized into two groups, simple and advanced. Simple enemies have minimal frames of animation, like bats who don't have left, right and back profiles, just a front. While advanced enemies have wide ranges of attacks and animation frames. Not in place yet is a Boss system. Bosses will be a project for the future and due to their complexity and scripting I will be working on them for a while. To start I plan on once again duplicating Zelda enemies (Like the dragon in level 1 who has a simple walk up and down and shoot three fireballs occasionally style attack pattern.) until I get the hang of it and create my own bosses.
Droppable Items
Enemies will drop items ranging from money to arrows and bombs and health and other things. What more can I say?
Live Action Battle
This ain't no turn-based RPG. It's a real-time Zelda style adventure engine with on-screen battles using a wide array of weapons. (All currently shamelessly ripped from Zelda)
Explosions
I call them that, but they're really a fancy name for temporary animations that can be spawned at any time. For instance, destroy an enemy and it explodes in a puff of smoke.
Projectiles
Projectiles are anything that is created, thrown across the screen, then destroyed when it's run its course. Like weapons from both the player and enemies.
Weapons
What kind of weapons are currently in the engine? First off a sword. Or if you want, a close range melee weapon. Secondly, arrows. For long range attacks. A boomerang is next for stunning the enemy. It has two modes, one stuns and returns, another goes twice as far and keeps going through enemies to hurt them all in a row. And lastly so far, bombs. Bombs are a projectile with a 0 movement speed and a timer. When they "go off" they hurt all enemies in their range. When an enemy is hit, it flies back. Same happens if an enemy hits your player.
Weather
Currently rain with lightning. You can also set fog instead. The ferocity of the rain can ge adjusted if need be. Lightning looks really cool. Set the darkness of the sky as well. This might be used if I decide to create a time-based game where night and day comes and goes and different things happen at different times.
Simple Lighting Effects
Lighting effects like a lantern the player carries. (Think Link to the Past with the lantern in the dark basement of the castle.) In its simplest form it consists of a mask that has a cutout of a transparent area, with blackness surrounding it, which is drawn centered on the player, then the empty space is filled in by transparent black rectangles totalling maybe 5 different objects being drawn at once at the very least. This is how Zelda does it. This is done with no hit to the framerate at all.
Strafing
You know what strafing is. It lets you face one direction while moving around dodging enemy fire while keeping your character facing toward the target. Hold the left Shift key to move around while facing in one direction. Great for boss fights. 3D Zeldas have this, but 2D ones do not. Why? Seems they could benefit from this feature.
An Inventory Screen
Well, a useless inventory screen with no purpose right now. But it has neat floating rotating icon placeholders for whatever I decide to put there though I will probably rip the whole damn thing out and start over eventually.
Multiple Resolution Choices
Okay, right now there's two. Switchable by pressing M. You can play in 4:3 640x480 or 16:10 800x500. I prefer the widescreen view. It looks much nicer and gives more room to see. Plus when I press F to go fullscreen it takes up the whole screen if stretched. Very nice features. In the final product these will be placed in an Options screen at startup.
MAP EDITOR:
Yes, a working Map Editor in LÖVE both loads and saves maps. Currently does not deal with animations yet. I will implement that soon once I figure out how animated tiles are going to be finalized. I worked all last night on a map editor in JavaScript and CSS that ran in Safari because I thought it would be easier to code for. But it wasn't. The JavaScript version is buggier than hell. So today I decided to throw it all out and create an editor in Lua/Löve. Man, it was so much easier. And less buggy. And FASTER. Sheesh. So I have a working map creation system.
FUTURE DEVELOPMENT:
Enemy/Object Lock-on
Zelda, anyone? This would allow me to press a key (Probably Z) to lock onto the closest enemy. (Or switch to the next enemy in range) And while locked on, all weapons would fire in their direction and the player can move around the enemy in a circle. Cannot do this yet because the player currently only has four directions to face and only fires in four directions. Eventually I will allow full 360º turning. If all goes well.
More Script Commands
Plans include enemy, NPC and player movement, creation of enemies and/or bosses, items, whatever wherever, weather control, time control (If I go that route), pretty much anything that can be done will be able to be automated. Also control the camera, panning, locking to player or another character, all that will be done.
Levels
No, not like RPG levels, more like floors. For example, in Zelda: Link to the Past and Awakening and all other 2D Zeldas since, Link is able to traverse from one floor to another on the same screen allowing for neat things such as bridges Link can walk under or over. The use of stairs or a cliff you jump off of provides a transition from one level to the next. This could be easy to implement, but will not be until I have finalized some things first.
AND NOW SOME SCREENSHOTS:
This is what you really want, right? Screenshots of what I have so far. Note that all graphics are PLACEHOLDERS for development and will change. I am borrowing sprites from various games such as Zelda, Final Fantasy 4 and Earthbound, Dragon Warrior, whatever, I forget, it doesn't matter. These shots are just to show the concept of the engine.
1) The original QuickBASIC engine:
This version used special palette swaps to be able to use colors DOS didn't normally show in 16-color CGA screen mode 7 which was required for the ability to do flicker-free animation. This version led the way to the next version...
2) The previous JavaScript/CSS/HTML5 engine:
Utilizing 640x480 pixels of screen space and the graphics from the previous version bumped up (The trees and grass use the same color values as the trees and grass in Link to the Past.) this version ran pretty spiffy fast, but was still limited by your processor and Safari's will to go fast. This wouldn't do, but it looked like it would have to, until Löve came along...
3) General gameplay:
You see the Debug text on the left, and under enemies and projectiles. You also get to see NPC's and enemies in action.
4) Lighting and Weather:
In this shot, the player has a lantern and it is raining. (And lightning at random intervals) The lantern will be different when it is done, but for now this is awesome.
5) Scripts and Dialogs
A sample script I created shows a dialog box, gives the player 1000 monies, transports him to another map, spawns in enemies and shows another dialog. In this shot you see the beginning of the script displaying a dialog.
6) The Editor:
The last shot shows the editor as it stands right now. Point and click in your face interface. Saves and loads maps. As you can see, since animations aren't supported yet, it just shows black in the water area.
Not shown: The inventory menu and weapons. Sorry. Forgot. Maybe later.
Eventually I will post a video. When it is ready enough to show off.
Go to page 27 to download the demo.
viewtopic.php?f=5&t=888&start=260
THE INSIDE STORY OF THE ROAD TO DEVELOPMENT:
While it is not ready for public consumption, I thought it was ready enough to show off. OMG SO MUCH TEXT! Read it all, it's good stuff.
First a little history. I have dreamed of creating a Zelda style game since high school when I took a graph paper pad and would draw tile based worlds and plan out scripts and how it would play. But I didn't have the means. None of the languages I knew were fast enough and I didn't know enough about programming to create a working engine, so I put the idea on hold for a decade.
Last year I discovered DOSBox, an app for OS X that emulates DOS at full speed or faster on my Intel Mac. I promptly found an old copy of QuickBASIC 4.5 and started work on an RPG engine designed to mimic games like the old Dragon Warrior or Final Fantasy games with battles mimicking Earthbound. While it was fast as long as I upped the cycles I quickly ran out of RAM since QuickBASIC was designed for old computers who never had more than 1MB of RAM so the program had an artificial memory ceiling. Boo! I had to find a replacement language quick!
The day before I found out I was losing my job I started work on a version of my engine that ran in Safari using its superfast JavaScript engine and took advantage of CSS and HTML5 features like the Canvas element that allowed drawing of shapes and images onto a "canvas" in an HTML page much the same way LÖVE does it. I quickly discovered that the JS engine was so fast, I could switch to live-action Zelda style encounters instead of turn-based. At first I also had scrolling maps but quickly went back to screen based maps when it turned out to be way too slow on large maps. (Moving a giant canvas, actually multiple giant canvases, every frame was taxing)
One day, a few months ago, I was cruising iDevGames' blog when I stumbled upon an article for Löve. What a crazy random happenstance! Had I not decided to look at that blog I would have missed this amazing engine. As soon as I downloaded it and examined all the wonderful examples and discovered how easy it was to create in Lua, I was hooked. I promptly started work on a Lua version of my engine I had written and rewritten twice already.
Right now it is a game engine without a direction. But that will develop in time. The final game WILL NOT be a Zelda fangame. And it probably won't even resemble Zelda. Hell, there is no roadmap for the game development. Right now all work is being concentrated on the engine stability and features so I can do things if I choose to. The player uses a sword and has a boomerang and bombs and arrows, but that could become a gun or rocks or a bat at some point. Who knows what I will create? I'm no Pixel, I could never come up with a compelling Cave Story. And I didn't create Knytt Stories, nor am I going to try to. I really don't know what this will be when it is all done say 5-10 years from now. Remember, Cave Story took 5 years and one person. Bob's Game also took 5 years and one crazy-ass person who completely went about it all wrong. I am also one man, and I also plan on taking 5 years on and off to create a game. Probably.
Do I have an idea for a setting? Well, I was always thinking of modern times. Not many games like this take place in modern times. With modern technologies. I want to create a world with modern settings, cities with buildings, not villages with huts. I hope to create a huge sprawling world with many sections. Even though I want to make the game free as in Cave Story free, I want it to be good enough that some publisher sees it and says "Hey, that could work well on the Wii/360/PS3". But you don't get to that point by being cocky or rushing things. Braid took a few years before someone said it was Xbox 360 material. Cave Story came out years ago and is just now being ported to the Wii. There are tons of indie games out there, but only a handful are good enough to be remembered as "Yeah, I loved that game."
I will not provide the code at this time, but would be happy to answer any questions about how I do things I do. Without further do and adieu and ado and all that, here is a list of features...
FEATURES THUS FAR:
Rolling Health Display
What does this mean? Well, think the Mother/Earthbound series. Not many games use this system, which is terrible because it's such a cool idea. Basically think of it this way. Say you have 50HP and an enemy hits you for 51HP. Obviously you now have -1HP, i.e. you're dead.. right? Not necessarily. In EarthBound, the rolling HP counter was used so if you are in a battle, you still have time to heal yourself (or your companions) before you die. The slower your counter, the more time you have. Your character does not actually die until the counter reaches the new HP. So you can get hit and have -1HP (Well, let's just say 0), but your counter is still slowly (or quickly) counting down to 0. And with special items or armor that slow the counter, you can live for a while before having to quickly heal yourself. I am thinking of taking advantage of this by having health recovering special moves or items you can cary and use before you are down to 0.
Mapping System
Smoothly scrolling maps can be virtually any size and up to 5 layers (One main layer and four object detail layers.) at any time. Also in place is support for animated tiles like water.
Dialog System
Text dialogs pop up onto screen animated, then text types itself out onto the screen. You can press the action button to speed it up if you are impatient. Future plans call for "talk bubble callouts" where it will look like the character is saying it, like in the Mario & Luigi games, rather than just a plain box with text. (My JS game engine had this feature)
Scripting System
Currently in place is a rudimentary scripting system. This is my current focus. Without a good scripting system, a game is useless. So the Script system must be perfect. Currently there are three commands; Dialog, Warp (For changing to another map) and Give Money.
Enemies
Currently in place are enemies shamelessly copied from Zelda. Octorocks (Three kinds) spit rocks, Moblin's run around shooting arrows, and goddamned bats bounce around the playfield occasionally stopping and getting in your way. The enemies are categorized into two groups, simple and advanced. Simple enemies have minimal frames of animation, like bats who don't have left, right and back profiles, just a front. While advanced enemies have wide ranges of attacks and animation frames. Not in place yet is a Boss system. Bosses will be a project for the future and due to their complexity and scripting I will be working on them for a while. To start I plan on once again duplicating Zelda enemies (Like the dragon in level 1 who has a simple walk up and down and shoot three fireballs occasionally style attack pattern.) until I get the hang of it and create my own bosses.
Droppable Items
Enemies will drop items ranging from money to arrows and bombs and health and other things. What more can I say?
Live Action Battle
This ain't no turn-based RPG. It's a real-time Zelda style adventure engine with on-screen battles using a wide array of weapons. (All currently shamelessly ripped from Zelda)
Explosions
I call them that, but they're really a fancy name for temporary animations that can be spawned at any time. For instance, destroy an enemy and it explodes in a puff of smoke.
Projectiles
Projectiles are anything that is created, thrown across the screen, then destroyed when it's run its course. Like weapons from both the player and enemies.
Weapons
What kind of weapons are currently in the engine? First off a sword. Or if you want, a close range melee weapon. Secondly, arrows. For long range attacks. A boomerang is next for stunning the enemy. It has two modes, one stuns and returns, another goes twice as far and keeps going through enemies to hurt them all in a row. And lastly so far, bombs. Bombs are a projectile with a 0 movement speed and a timer. When they "go off" they hurt all enemies in their range. When an enemy is hit, it flies back. Same happens if an enemy hits your player.
Weather
Currently rain with lightning. You can also set fog instead. The ferocity of the rain can ge adjusted if need be. Lightning looks really cool. Set the darkness of the sky as well. This might be used if I decide to create a time-based game where night and day comes and goes and different things happen at different times.
Simple Lighting Effects
Lighting effects like a lantern the player carries. (Think Link to the Past with the lantern in the dark basement of the castle.) In its simplest form it consists of a mask that has a cutout of a transparent area, with blackness surrounding it, which is drawn centered on the player, then the empty space is filled in by transparent black rectangles totalling maybe 5 different objects being drawn at once at the very least. This is how Zelda does it. This is done with no hit to the framerate at all.
Strafing
You know what strafing is. It lets you face one direction while moving around dodging enemy fire while keeping your character facing toward the target. Hold the left Shift key to move around while facing in one direction. Great for boss fights. 3D Zeldas have this, but 2D ones do not. Why? Seems they could benefit from this feature.
An Inventory Screen
Well, a useless inventory screen with no purpose right now. But it has neat floating rotating icon placeholders for whatever I decide to put there though I will probably rip the whole damn thing out and start over eventually.
Multiple Resolution Choices
Okay, right now there's two. Switchable by pressing M. You can play in 4:3 640x480 or 16:10 800x500. I prefer the widescreen view. It looks much nicer and gives more room to see. Plus when I press F to go fullscreen it takes up the whole screen if stretched. Very nice features. In the final product these will be placed in an Options screen at startup.
MAP EDITOR:
Yes, a working Map Editor in LÖVE both loads and saves maps. Currently does not deal with animations yet. I will implement that soon once I figure out how animated tiles are going to be finalized. I worked all last night on a map editor in JavaScript and CSS that ran in Safari because I thought it would be easier to code for. But it wasn't. The JavaScript version is buggier than hell. So today I decided to throw it all out and create an editor in Lua/Löve. Man, it was so much easier. And less buggy. And FASTER. Sheesh. So I have a working map creation system.
FUTURE DEVELOPMENT:
Enemy/Object Lock-on
Zelda, anyone? This would allow me to press a key (Probably Z) to lock onto the closest enemy. (Or switch to the next enemy in range) And while locked on, all weapons would fire in their direction and the player can move around the enemy in a circle. Cannot do this yet because the player currently only has four directions to face and only fires in four directions. Eventually I will allow full 360º turning. If all goes well.
More Script Commands
Plans include enemy, NPC and player movement, creation of enemies and/or bosses, items, whatever wherever, weather control, time control (If I go that route), pretty much anything that can be done will be able to be automated. Also control the camera, panning, locking to player or another character, all that will be done.
Levels
No, not like RPG levels, more like floors. For example, in Zelda: Link to the Past and Awakening and all other 2D Zeldas since, Link is able to traverse from one floor to another on the same screen allowing for neat things such as bridges Link can walk under or over. The use of stairs or a cliff you jump off of provides a transition from one level to the next. This could be easy to implement, but will not be until I have finalized some things first.
AND NOW SOME SCREENSHOTS:
This is what you really want, right? Screenshots of what I have so far. Note that all graphics are PLACEHOLDERS for development and will change. I am borrowing sprites from various games such as Zelda, Final Fantasy 4 and Earthbound, Dragon Warrior, whatever, I forget, it doesn't matter. These shots are just to show the concept of the engine.
1) The original QuickBASIC engine:
This version used special palette swaps to be able to use colors DOS didn't normally show in 16-color CGA screen mode 7 which was required for the ability to do flicker-free animation. This version led the way to the next version...
2) The previous JavaScript/CSS/HTML5 engine:
Utilizing 640x480 pixels of screen space and the graphics from the previous version bumped up (The trees and grass use the same color values as the trees and grass in Link to the Past.) this version ran pretty spiffy fast, but was still limited by your processor and Safari's will to go fast. This wouldn't do, but it looked like it would have to, until Löve came along...
3) General gameplay:
You see the Debug text on the left, and under enemies and projectiles. You also get to see NPC's and enemies in action.
4) Lighting and Weather:
In this shot, the player has a lantern and it is raining. (And lightning at random intervals) The lantern will be different when it is done, but for now this is awesome.
5) Scripts and Dialogs
A sample script I created shows a dialog box, gives the player 1000 monies, transports him to another map, spawns in enemies and shows another dialog. In this shot you see the beginning of the script displaying a dialog.
6) The Editor:
The last shot shows the editor as it stands right now. Point and click in your face interface. Saves and loads maps. As you can see, since animations aren't supported yet, it just shows black in the water area.
Not shown: The inventory menu and weapons. Sorry. Forgot. Maybe later.
Eventually I will post a video. When it is ready enough to show off.