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
TechnoCat
Inner party member
Posts: 1611
Joined: Thu Jul 30, 2009 12:31 am
Location: Denver, CO
Contact:

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

Post by TechnoCat »

Picture 2010-06-11 08_19_27.png
Picture 2010-06-11 08_19_27.png (42.53 KiB) Viewed 3040 times
User avatar
Jasoco
Inner party member
Posts: 3725
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

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

Post by Jasoco »

Oh, by the way, if you ran any of my demos before, DELETE THE PREFERENCE FILES first. That error is because I had Physics turned off before and it saved a config file with Physics set to false. Now it uses them so it sets it to true. My mistake. Just delete the config file.
User avatar
TechnoCat
Inner party member
Posts: 1611
Joined: Thu Jul 30, 2009 12:31 am
Location: Denver, CO
Contact:

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

Post by TechnoCat »

I couldn't get it to run until I took it out of the love file.
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 18! 6/10/10)

Post by thelinx »

I tested the demo, and :awesome:
User avatar
Chucknorrisaurrus
Prole
Posts: 23
Joined: Mon Jun 07, 2010 1:00 am

Re: My Zelda style adventure engine (DEMO NOW AVAILABLE)

Post by Chucknorrisaurrus »

@ Jasoco,

What's the method behind creating the map and creating collision detection with certain tiles?
User avatar
Jasoco
Inner party member
Posts: 3725
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

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

Post by Jasoco »

What do you mean?

My map currently uses a bunch of grids, i.e. multidimensional arrays, to store all the data.
Collision's: . for none, x for wall, w for low wall (i.e. a tile projectiles can move over)
Tiles come in 5 layers currently. The base layer, two lower decorational layers and two upper. With the player, NPC's, switches and other objects between the lower and upper layers.

Though I plan on totally revamping the thing. Ripping out decoration layers and replacing all decorations with what I will call "scenery". Hopefully I can get a method that saves a few frames and allows for easier map, or "stage" construction. The collision map will remain though for now at least.

Collisions are checked against the player's (Or other object's) x, y, x+31 and y+31 divided by 32 floored coordinates to the collision map. You can look at the code and find the "collision()" function for more info. I need to redo that though because of the problem mentioned above where Robin got stuck in the trees. The game "n" uses a method where it not only stores the collision values for each tile, but for its neighboring tiles as well all in the same grid space. If I use that method I should be able to fix that problem. Hopefully.

Either way, there is a long road ahead, and the progress depends on how much free time I get and how far Löve advances in the next few years and whether or not I can get a story in my head worthy of Cave Story recognition.
User avatar
Chucknorrisaurrus
Prole
Posts: 23
Joined: Mon Jun 07, 2010 1:00 am

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

Post by Chucknorrisaurrus »

[ten minutes later] :ultrashocked: :ultrashocked: :ultrashocked:

I get the gist of what you're saying, but I"m going to have to learn how to make multidimensional arrays, which are either a table of some sort or something else that is probably obvious but I cannot currently understand because I have completely burnt myself out by looking through your code.

Speaking of which, I went digging through your code for collision(), but I never found it. What file is it on?
User avatar
Luiji
Party member
Posts: 396
Joined: Mon May 17, 2010 6:59 pm

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

Post by Luiji »

One way to do multidimensional arrays is to make a table containing tables.
Good bye.
User avatar
Jasoco
Inner party member
Posts: 3725
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

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

Post by Jasoco »

It's easy. You just have to do each dimension one at a time.

Code: Select all

array = {}
for x=1,100 do
  array[x] = {}
  for y=1,100 do
    array[x][y] = whatever
  end
end
You could probably keep going and make 3 dimensional arrays if you want. (One for the X, One for the Y and one for each tile type. I didn't think of this when I created the game so I have multiple two dimensional arrays instead of one three dimensional one.) I guess the only limit is the memory.

Actually, it's called checkCollision() sorry. It is in the engine.lua file.
User avatar
Chucknorrisaurrus
Prole
Posts: 23
Joined: Mon Jun 07, 2010 1:00 am

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

Post by Chucknorrisaurrus »

Oh, I see, what this is doing is making a virtual field that is 100 blocks across and 100 blocks high, which you can use to fill in with strings or integers which can then be used to trigger events and such. This language is already teaching me more than any other language has! Thanks, I'm going to go try to make a sandbox.
Post Reply

Who is online

Users browsing this forum: No registered users and 45 guests