## The Crawler of Dungeons™ [!RENAMED! AND !REBORN!]

Show off your games, demos and other (playable) creations.
Davidobot
Party member
Posts: 1148
Joined: Sat Mar 31, 2012 5:18 am
Location: Game-Dev. Land
Contact:

### Re: Dungeon Crawler

coffee wrote:
Davidobot wrote:
veethree wrote:This is good so far. I like the smooth player movement. If you plan on doing bigger levels i'd suggest using tiled, it's a general purpose tile map editor. There's a lib that can import the files from tiled. You can get it here.
Thanks but I prefer *for now* to make the levels manualy
I also think it's better for learning do your own engine than obey "tiled" rules (even that is a flexible engine).
I did quickly and dirtly a change to how your treat levels. I think its a better way. (you don't need to do that level checking and you auto load levels now). Sorry if I mess with something and didn't notice and of course it's only a quick sugestion. A lot can still be improved.
Thank you I will use your modifications.
My library:
LovelyMoon

Check out my current project:
Raycaster

Oh hey, I have a website now!

Davidobot
Party member
Posts: 1148
Joined: Sat Mar 31, 2012 5:18 am
Location: Game-Dev. Land
Contact:

### Re: Dungeon Crawler

Did anyone figure out why "decheck" is not being drawn?
My library:
LovelyMoon

Check out my current project:
Raycaster

Oh hey, I have a website now!

coffee
Party member
Posts: 1206
Joined: Wed Nov 02, 2011 9:07 pm

### Re: Dungeon Crawler

Davidobot wrote: Thank you I will use your modifications.
No problem. What's important is that you understand the modifications and why it's actually better now.
1 - You stop checking every frame loading level or even checking if a level is load.
2 - Now it "cleverly" add +1/-1 to level and don't have to detect each different level exit.
3 - You were treating/calling levels as game_scenes. you better re-implement game_scenes for "real" state changes. I accidentally remove that naming when introducing level var.
Did anyone figure out why "decheck" is not being drawn?
Did I do that?

Davidobot
Party member
Posts: 1148
Joined: Sat Mar 31, 2012 5:18 am
Location: Game-Dev. Land
Contact:

### Re: Dungeon Crawler

coffee wrote:
Davidobot wrote:
Did anyone figure out why "decheck" is not being drawn?
Did I do that?
No, read the changelist if anyone did it, it was me.
My library:
LovelyMoon

Check out my current project:
Raycaster

Oh hey, I have a website now!

coffee
Party member
Posts: 1206
Joined: Wed Nov 02, 2011 9:07 pm

### Re: Dungeon Crawler

Davidobot wrote: No, read the changelist if anyone did it, it was me.
As I said I could have messed with something. changelog don't mention "decheck". I will check it in your code.

Davidobot
Party member
Posts: 1148
Joined: Sat Mar 31, 2012 5:18 am
Location: Game-Dev. Land
Contact:

### Re: Dungeon Crawler

Davidobot wrote: Add stairs that lead you down a level( For some reason they are not printed)
My library:
LovelyMoon

Check out my current project:
Raycaster

Oh hey, I have a website now!

coffee
Party member
Posts: 1206
Joined: Wed Nov 02, 2011 9:07 pm

### Re: Dungeon Crawler

Davidobot wrote:
Davidobot wrote: Add stairs that lead you down a level( For some reason they are not printed)
OMG you were doing 3 more cycles for printing. Do at least only one. (But you could do print in another way that not this one.)

Code: Select all

    for y=1, #map do --draws the map
for x=1, #map[y] do
if map[y][x] == 1 then
love.graphics.draw(wall, x * 32 , y * 32)
end
if map[y][x] == 2 then
love.graphics.draw(checkpoint, x * 32 , y * 32 )
end
if map[y][x] == 3 then
love.graphics.draw(decheck, x * 32 , y * 32 )
end
end
end

I also did this

Code: Select all

checkpoint= love.graphics.newImage("graphics/stairs_up.png") --2 (on map)
decheck= love.graphics.newImage("graphics/stairs_down.png") --3 (on map)
and got a different tile for down stairs. All is working now.

Davidobot
Party member
Posts: 1148
Joined: Sat Mar 31, 2012 5:18 am
Location: Game-Dev. Land
Contact:

### Re: Dungeon Crawler

coffee wrote:
Davidobot wrote:
Davidobot wrote: Add stairs that lead you down a level( For some reason they are not printed)
OMG you were doing 3 more cycles for printing. Do at least only one. (But you could do print in another way that not this one.)

Code: Select all

    for y=1, #map do --draws the map
for x=1, #map[y] do
if map[y][x] == 1 then
love.graphics.draw(wall, x * 32 , y * 32)
end
if map[y][x] == 2 then
love.graphics.draw(checkpoint, x * 32 , y * 32 )
end
if map[y][x] == 3 then
love.graphics.draw(decheck, x * 32 , y * 32 )
end
end
end

I also did this

Code: Select all

checkpoint= love.graphics.newImage("graphics/stairs_up.png") --2 (on map)
decheck= love.graphics.newImage("graphics/stairs_down.png") --3 (on map)
and got a different tile for down stairs. All is working now.
K, thx. I think it was caused because it was overwritten by something
My library:
LovelyMoon

Check out my current project:
Raycaster

Oh hey, I have a website now!

coffee
Party member
Posts: 1206
Joined: Wed Nov 02, 2011 9:07 pm

### Re: Dungeon Crawler

Davidobot wrote: K, thx. I think it was caused because it was overwritten by something
Ok, I think things are going well. Last advice. You should now work in "tile" aspect to don't do that ugly triple check in draw. So, you must work now in something that reroutes your map values to your tile gfx:

Code: Select all

    for y=1, #map do --draws the map
for x=1, #map[y] do
if map[y][x] > 0 then love.graphics.draw(tile[map[y][x]], y * 32 , x * 32) end
end
end

Code: Select all

    tile[1] = wall
tile[2] = checkpoint
tile[3] = decheck
or

Code: Select all

tile ={ wall, checkpoint, decheck }
I hope you got this concept. It's vital.

coffee
Party member
Posts: 1206
Joined: Wed Nov 02, 2011 9:07 pm

### Re: Dungeon Crawler

direction = 1