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

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

Re: Dungeon Crawler

Post by Davidobot » Wed Apr 04, 2012 12:09 pm

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!

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

Re: Dungeon Crawler

Post by Davidobot » Wed Apr 04, 2012 12:14 pm

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

Post by coffee » Wed Apr 04, 2012 12:21 pm

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?

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

Re: Dungeon Crawler

Post by Davidobot » Wed Apr 04, 2012 12:25 pm

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

Post by coffee » Wed Apr 04, 2012 12:30 pm

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.

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

Re: Dungeon Crawler

Post by Davidobot » Wed Apr 04, 2012 12:32 pm

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

Post by coffee » Wed Apr 04, 2012 12:40 pm

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.

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

Re: Dungeon Crawler

Post by Davidobot » Wed Apr 04, 2012 12:43 pm

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

Post by coffee » Wed Apr 04, 2012 1:40 pm

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
and put at load

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

Post by coffee » Wed Apr 04, 2012 2:20 pm

Your new uploaded file is missing a "," after

Code: Select all

direction = 1
You must check files before upload, :)

EDITED: You have a major level change problem (player can land in walled terrain) because you change level but don't let player move to the stairs. If you return true in both level checks all is much better that way.

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests