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

Show off your games, demos and other (playable) creations.
User avatar
Davidobot
Party member
Posts: 1226
Joined: Sat Mar 31, 2012 5:18 am
Location: Oxford, UK
Contact:

Re: Dungeon Crawler

Post by Davidobot »

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.
PM me on here or elsewhere if you'd like to discuss porting your game to Nintendo Switch via mazette!
personal page and a raycaster
User avatar
Davidobot
Party member
Posts: 1226
Joined: Sat Mar 31, 2012 5:18 am
Location: Oxford, UK
Contact:

Re: Dungeon Crawler

Post by Davidobot »

Did anyone figure out why "decheck" is not being drawn?
PM me on here or elsewhere if you'd like to discuss porting your game to Nintendo Switch via mazette!
personal page and a raycaster
coffee
Party member
Posts: 1206
Joined: Wed Nov 02, 2011 9:07 pm

Re: Dungeon Crawler

Post by coffee »

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: 1226
Joined: Sat Mar 31, 2012 5:18 am
Location: Oxford, UK
Contact:

Re: Dungeon Crawler

Post by Davidobot »

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. :)
PM me on here or elsewhere if you'd like to discuss porting your game to Nintendo Switch via mazette!
personal page and a raycaster
coffee
Party member
Posts: 1206
Joined: Wed Nov 02, 2011 9:07 pm

Re: Dungeon Crawler

Post by coffee »

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: 1226
Joined: Sat Mar 31, 2012 5:18 am
Location: Oxford, UK
Contact:

Re: Dungeon Crawler

Post by Davidobot »

Davidobot wrote: Add stairs that lead you down a level( For some reason they are not printed)
PM me on here or elsewhere if you'd like to discuss porting your game to Nintendo Switch via mazette!
personal page and a raycaster
coffee
Party member
Posts: 1206
Joined: Wed Nov 02, 2011 9:07 pm

Re: Dungeon Crawler

Post by coffee »

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: 1226
Joined: Sat Mar 31, 2012 5:18 am
Location: Oxford, UK
Contact:

Re: Dungeon Crawler

Post by Davidobot »

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
PM me on here or elsewhere if you'd like to discuss porting your game to Nintendo Switch via mazette!
personal page and a raycaster
coffee
Party member
Posts: 1206
Joined: Wed Nov 02, 2011 9:07 pm

Re: Dungeon Crawler

Post by coffee »

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 »

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: rabbitboots and 43 guests