My Adventure Game Engine - Making Way For Adventure Engine 2
Re: My Adventure Game Engine (NEW DEMO ON PAGE 20! 6/17/10)
I think qubodup mistook the wolf for a cat.
Good bye.
Re: My Adventure Game Engine (NEW DEMO ON PAGE 20! 6/17/10)
Or it was a joke
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: My Adventure Game Engine (NEW DEMO ON PAGE 20! 6/17/10)
Hm, no. I think I'm gonna go with Luiji's explanation. Less far-fetched.
Help us help you: attach a .love.
- Jasoco
- Inner party member
- Posts: 3727
- Joined: Mon Jun 22, 2009 9:35 am
- Location: Pennsylvania, USA
- Contact:
Re: My Adventure Game Engine (NEW DEMO ON PAGE 20! 6/17/10)
Work is coming along swimmingly...
Some changes since the last version:
Boomerangs are now independent of projectiles. And they're smarter and better. They can be fired in any direction (Straight out from the player right now, but any of 360 degrees in the future) and can be thrown at targets.
Targeting is in place. Press Z to target the closest enemy in your view. When targeting, the player will circle the enemy/target. Movement will be fixed in a future version. Right now it's Left and Right to circle and Up and Down to move closer or further from the target. I hope to make the directions work better soon.
Scenery is more prominently used. I don't think the previous version had Scenery, but this one does. Scenery will replace most of a map's data. Tiles will be used much more sparingly. Scenery will replace most decorations and in a much sooner version there will be probably 2 decoration layers at most, possibly only one if at all as they will mostly be replaced by scenery. Scenery can be anything from any image file that gets loaded as they are Quad's. Scenery can also be animated at the speed you choose. Each frame is a different Quad that is cycled through at your speed. In the future I hope to have frames that can have individual timing, or possibly random too. (Think a flickering neon sign.)
Currently Scenery is displayed in the order it is defined. In the future I hope to have a robust sorting and depth algorithm for making actors move behind and in front. It all depends on how fast table.sort and table.insert end up being when dealing with larger detailed maps.
Scenery can also be placed anywhere you want it to be instead of at a 32 pixel multiple like tiles. Flowers and grass will look much better.
A new menu backdrop looks like a softly lit white room. And shadows are cast from the logo. It's better to see in action.
I now use TrueType fonts instead of image fonts for their flexibility. They look better and are much easier to work with, since I don't have to put so much work into drawing them. The Status numbers are still images currently though. I've noticed fonts draw slowly so I want to keep less TTF drawing during action portions of the game, keeping them to dialogs and menus. Still looking for the perfect dialog font. Currently using Georgia. (BTW, is there a way to reference the OS' own included copy of Georgia or Times New Roman instead of having to include my own? I was told yes, but I don't know how. I'd rather not have to ship any fonts personally for copyright reasons since I don't own Georgia or the font I use for menus.)
All UI graphics are in one image now. UI meaning logos, backdrops, stuff belonging to the UI, as opposed to the game itself.
Some Screenshots: Note the seemingly random placement of flowers and grass instead of being confined to a tile.
Additional:
I have discovered the joy of replacing table.insert with direct definitions of array entries so I can use strings as id's.
This makes my Scenery Library much better and will probably help me with some problems I've been having with enemies and projectiles and stuff since I could give it all unique names instead of assigned unknown numbers.
My question is if it has any speed hit by using strings instead of numbers as ID's?
Some changes since the last version:
Boomerangs are now independent of projectiles. And they're smarter and better. They can be fired in any direction (Straight out from the player right now, but any of 360 degrees in the future) and can be thrown at targets.
Targeting is in place. Press Z to target the closest enemy in your view. When targeting, the player will circle the enemy/target. Movement will be fixed in a future version. Right now it's Left and Right to circle and Up and Down to move closer or further from the target. I hope to make the directions work better soon.
Scenery is more prominently used. I don't think the previous version had Scenery, but this one does. Scenery will replace most of a map's data. Tiles will be used much more sparingly. Scenery will replace most decorations and in a much sooner version there will be probably 2 decoration layers at most, possibly only one if at all as they will mostly be replaced by scenery. Scenery can be anything from any image file that gets loaded as they are Quad's. Scenery can also be animated at the speed you choose. Each frame is a different Quad that is cycled through at your speed. In the future I hope to have frames that can have individual timing, or possibly random too. (Think a flickering neon sign.)
Currently Scenery is displayed in the order it is defined. In the future I hope to have a robust sorting and depth algorithm for making actors move behind and in front. It all depends on how fast table.sort and table.insert end up being when dealing with larger detailed maps.
Scenery can also be placed anywhere you want it to be instead of at a 32 pixel multiple like tiles. Flowers and grass will look much better.
A new menu backdrop looks like a softly lit white room. And shadows are cast from the logo. It's better to see in action.
I now use TrueType fonts instead of image fonts for their flexibility. They look better and are much easier to work with, since I don't have to put so much work into drawing them. The Status numbers are still images currently though. I've noticed fonts draw slowly so I want to keep less TTF drawing during action portions of the game, keeping them to dialogs and menus. Still looking for the perfect dialog font. Currently using Georgia. (BTW, is there a way to reference the OS' own included copy of Georgia or Times New Roman instead of having to include my own? I was told yes, but I don't know how. I'd rather not have to ship any fonts personally for copyright reasons since I don't own Georgia or the font I use for menus.)
All UI graphics are in one image now. UI meaning logos, backdrops, stuff belonging to the UI, as opposed to the game itself.
Some Screenshots: Note the seemingly random placement of flowers and grass instead of being confined to a tile.
Additional:
I have discovered the joy of replacing table.insert with direct definitions of array entries so I can use strings as id's.
Code: Select all
--Instead of:
table.insert(tableName, 1, { stuff } )
--I use:
tableName["UniqueString"] = { stuff }
My question is if it has any speed hit by using strings instead of numbers as ID's?
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: My Adventure Game Engine (NEW DEMO ON PAGE 20! 6/17/10)
No, it's probably faster because table.insert is slow as hell (t[#t+1] is faster than table.insert!).
And it looks GREAT!
And it looks GREAT!
- kikito
- Inner party member
- Posts: 3153
- Joined: Sat Oct 03, 2009 5:22 pm
- Location: Madrid, Spain
- Contact:
Re: My Adventure Game Engine (NEW DEMO ON PAGE 20! 6/17/10)
Jasoco wrote:I have discovered the joy of replacing table.insert with direct definitions of array entries so I can use strings as id's.
Code: Select all
--Instead of:
table.insert(tableName, 1, { stuff } )
--I use:
tableName["UniqueString"] = { stuff }
Code: Select all
tableName.UniqueString = { stuff }
It really depends on what you do with your tables; table.insert has some cost attached to it.Jasoco wrote:My question is if it has any speed hit by using strings instead of numbers as ID's?
- If you did lots of table.inserts and now you do a lot of table.x = y, then that part is faster
- If you used ipairs() in order to parse your tables and now you use pairs(), then that part is slower
- Table.field is slightly slower than Table[1]. But it normally isn't something game-changing - and the legibility added compensates it in a lot of cases
When I write def I mean function.
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: My Adventure Game Engine (NEW DEMO ON PAGE 20! 6/17/10)
In huge quantities pairs is actually faster than ipairs.
And, I guess that he uses the [] version because he'd normally substitute the literal for a variable.
And, I guess that he uses the [] version because he'd normally substitute the literal for a variable.
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: My Adventure Game Engine (NEW DEMO ON PAGE 20! 6/17/10)
- Looks nice. Very nice.
- As for the font, there are free fonts that you can distribute with your game. For the menus, it might be interesting to know Vera Sans has a "light" variant, which may look good.
- As for table keys: table.key is faster than table["key"], because it has a bytecode short cut. An advantage of using numeric keys (of course using t[#t+1] = v rather than table.insert(t, v)) is that it makes automatic generation of enemies or whatever easier. But if you are going to have lots of "level-scripting", where you access enemies by enemyTable.largeShark or enemyTable[19], string keys are much better.
- So, where is the .love?
Help us help you: attach a .love.
- Jasoco
- Inner party member
- Posts: 3727
- Joined: Mon Jun 22, 2009 9:35 am
- Location: Pennsylvania, USA
- Contact:
Re: My Adventure Game Engine (NEW DEMO ON PAGE 20! 6/17/10)
Well, here's how it goes. I have a Scenery Object defined in the Library:
And I would place it in the map by using adding Scenery to the current world space:
I can set id to the string name of the Object instead of having to remember what number I used to use.
Code: Select all
sceneryLibrary["Flower 1"] = {i = worldTiles, q = gr.newQuad(0, 128, 16, 16, worldTiles:getWidth(), worldTiles:getHeight()), ani = false }
Code: Select all
table.insert(scenery, { x = 425, y = 335, id = "Flower 1", z = 1, sx = 1, sy = 1, ox = 8, oy = 16} )
- TechnoCat
- Inner party member
- Posts: 1611
- Joined: Thu Jul 30, 2009 12:31 am
- Location: Milwaukee, WI
- Contact:
Re: My Adventure Game Engine (NEW DEMO ON PAGE 20! 6/17/10)
That transparent gray circle-gradient background on the menu is so sexy. It looks so very pleasant to look at. Also, consider making the target icon green arrow smaller. Or maybe even just a small green triangle.
Who is online
Users browsing this forum: No registered users and 4 guests