My Adventure Game Engine - Making Way For Adventure Engine 2

Showcase your libraries, tools and other projects that help your fellow love users.
User avatar
Luiji
Party member
Posts: 396
Joined: Mon May 17, 2010 6:59 pm

Re: My Adventure Game Engine (NEW DEMO ON PAGE 20! 6/17/10)

Post by Luiji »

I think qubodup mistook the wolf for a cat.
Good bye.
User avatar
thelinx
The Strongest
Posts: 857
Joined: Fri Sep 26, 2008 3:56 pm
Location: Sweden

Re: My Adventure Game Engine (NEW DEMO ON PAGE 20! 6/17/10)

Post by thelinx »

Or it was a joke
User avatar
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)

Post by Robin »

Hm, no. I think I'm gonna go with Luiji's explanation. Less far-fetched.
Help us help you: attach a .love.
User avatar
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)

Post by Jasoco »

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:
Menu
Menu
Screen shot 2010-06-26 at 10.06.01 AM.jpg (54.59 KiB) Viewed 1687 times
Gameplay
Gameplay
Screen shot 2010-06-26 at 10.08.05 AM.jpg (111.93 KiB) Viewed 1687 times
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 }
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?
User avatar
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)

Post by bartbes »

No, it's probably faster because table.insert is slow as hell (t[#t+1] is faster than table.insert!).
And it looks GREAT!
User avatar
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)

Post by kikito »

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 }
Notice that you can also do this, which is slightly better (4 characters less to parse)

Code: Select all

tableName.UniqueString = { stuff }
The only catch is that UniqueString must be a valid identifier then (only letters, numbers or underscore, the first char must be a letter or underscore)
Jasoco wrote:My question is if it has any speed hit by using strings instead of numbers as ID's?
It really depends on what you do with your tables; table.insert has some cost attached to it.
  • 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.
User avatar
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)

Post by bartbes »

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.
User avatar
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)

Post by Robin »

  1. Looks nice. Very nice.
  2. 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.
  3. 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.
  4. So, where is the .love? :3
Help us help you: attach a .love.
User avatar
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)

Post by Jasoco »

Well, here's how it goes. I have a Scenery Object defined in the Library:

Code: Select all

sceneryLibrary["Flower 1"] = {i = worldTiles, q = gr.newQuad(0, 128, 16, 16, worldTiles:getWidth(), worldTiles:getHeight()), ani = false }
And I would place it in the map by using adding Scenery to the current world space:

Code: Select all

table.insert(scenery, { x = 425, y = 335, id = "Flower 1", z = 1, sx = 1, sy = 1, ox = 8, oy = 16} )
I can set id to the string name of the Object instead of having to remember what number I used to use.
User avatar
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)

Post by TechnoCat »

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

Who is online

Users browsing this forum: No registered users and 4 guests