## Lovely People Helping a Misguided child in Game Dev.

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
BulbaMander
Citizen
Posts: 58
Joined: Sat Dec 15, 2012 7:00 pm
Location: Pittsburgh, PA

### Lovely People Helping a Misguided child in Game Dev.

So today at percisly 5:04 I was inspired to make a game. So I started to. This is what I have. I would apreciate ideas and ways to make my code more effiecient/organized. Piece.

[EDIT]: it sounds like its done its noo000oo0oo0o0o where near being done but i dont want to make a lengthy post about it.
Attachments
escape the dungeon v0.3.love
Version three! With a Menu!! But the mission lies, theres no glory or monsters yet... There could be bears.
escape the dungeon v0.2.love
version two, took out the attacking dont know what to do with that yet
Last edited by BulbaMander on Wed May 08, 2013 10:42 pm, edited 3 times in total.
It takes an idiot to do cool things. Thats why they're cool.

retrotails
Party member
Posts: 211
Joined: Wed Apr 18, 2012 12:37 am

BulbaMander wrote:So today at percisly 5:04 I was inspired to make a game. So I started to. This is what I have. I would apreciate ideas and ways to make my code more effiecient/organized. Piece.

[EDIT]: it sounds like its done its noo000oo0oo0o0o where near being done but i dont want to make a lengthy post about it.
Could you possibly add arrow key support for us non-QWERTY users?
edit: I kinda like the game for some reason. I also love the code, are you more familiar with another language?

Plu
Inner party member
Posts: 722
Joined: Fri Mar 15, 2013 9:36 pm

Nice little game. It crashed after a few levels; I'm not sure if it's just because it ran out or because it's a bug.

Error notice was:
Dungeon.lua line:88: attemp to get length of field '?' (a nil value)

rhezalouis
Party member
Posts: 100
Joined: Mon Dec 07, 2009 10:27 am
Location: Indonesia
Contact:

Hi BulbaMander, nice game.

P.S. What on earth is wrong with your post subject ... . Don't you think it disrespect yourself and those who respond to it? "Tiled Dark Corridor Maze" or "Can't Get Out" or something along those lines would be relevant I suppose. And since you don't ask anything, probably this post is a showcase that would find it's home in the Projects and Demos instead of Support and Development. Just my tuppence worth .

You could add quick floor check before the player could go to the next level. And some meaningful names might help to debug the code later on.

Code: Select all

function checkMap(x, y)
local tileRow = (p.y/32)+1+y
local tileCol = (p.x/32)+1+x
local tileType = floor[game.lvl][tileRow][tileCol]

local isPassable = true
if tileType == 1 then
isPassable = false
elseif tileType == 2 and floor[game.lvl + 1] then
game.lvl = game.lvl + 1
end

return isPassable
end

Otherwise, this would happen:
Plu wrote:Nice little game. It crashed after a few levels; I'm not sure if it's just because it ran out or because it's a bug.

Error notice was:
Dungeon.lua line:88: attemp to get length of field '?' (a nil value)
It's game.lvl == 6; but the floor[6] is not defined yet.
Aargh, I am wasting my posts! My citizenshiiiip...

BulbaMander
Citizen
Posts: 58
Joined: Sat Dec 15, 2012 7:00 pm
Location: Pittsburgh, PA

rhezalouis wrote:Hi BulbaMander, nice game.

P.S. What on earth is wrong with your post subject ... . Don't you think it disrespect yourself and those who respond to it? "Tiled Dark Corridor Maze" or "Can't Get Out" or something along those lines would be relevant I suppose. And since you don't ask anything, probably this post is a showcase that would find it's home in the Projects and Demos instead of Support and Development. Just my tuppence worth .

You could add quick floor check before the player could go to the next level. And some meaningful names might help to debug the code later on

Otherwise, this would happen:
Plu wrote:Nice little game. It crashed after a few levels; I'm not sure if it's just because it ran out or because it's a bug.

Error notice was:
Dungeon.lua line:88: attemp to get length of field '?' (a nil value)
It's game.lvl == 6; but the floor[6] is not defined yet.
Yea I am aware of the game crashing after the 5th level, im planning on having 15 levels, then having enemies spawn when you get to the bottom and grab the treasure.
Plu wrote:Nice little game. It crashed after a few levels; I'm not sure if it's just because it ran out or because it's a bug.

Error notice was:
Dungeon.lua line:88: attemp to get length of field '?' (a nil value)
Well thanks Im not sure if I'd call it a game yet though haha
retrotails wrote:
BulbaMander wrote:So today at percisly 5:04 I was inspired to make a game. So I started to. This is what I have. I would apreciate ideas and ways to make my code more effiecient/organized. Piece.

[EDIT]: it sounds like its done its noo000oo0oo0o0o where near being done but i dont want to make a lengthy post about it.
Could you possibly add arrow key support for us non-QWERTY users?
edit: I kinda like the game for some reason. I also love the code, are you more familiar with another language?

Nope, lua was the first language I learned, then I learned java and the C languages, but lua is still my favorite. And yea arrows is what ill do next I guess with more levels, and fixing the attack button (I bet you didn't even know you could attack, its the space bar) to disapear out of your FOV and maybe race choice along with a menu.
It takes an idiot to do cool things. Thats why they're cool.

Germanunkol
Party member
Posts: 706
Joined: Fri Jun 22, 2012 4:54 pm
Contact:

### Re: Lovely People Helping a Misguided child in Game Dev.

Plays really well, nicely done
I like the graphics and the movement, it's quick and feels nice.
trAInsported - Write AI to control your trains
Bandana (Dev blog) - Platformer featuring an awesome little ninja by Micha and me
GridCars - Our jam entry for LD31
Germanunkol.de

BulbaMander
Citizen
Posts: 58
Joined: Sat Dec 15, 2012 7:00 pm
Location: Pittsburgh, PA

### Re: Lovely People Helping a Misguided child in Game Dev.

Germanunkol wrote:Plays really well, nicely done
I like the graphics and the movement, it's quick and feels nice.

It takes an idiot to do cool things. Thats why they're cool.

T-Bone
Inner party member
Posts: 1492
Joined: Thu Jun 09, 2011 9:03 am

### Re: Lovely People Helping a Misguided child in Game Dev.

Isn't it a little strange that the blue square moves smoothely but the light around it moves in discrete steps?

Germanunkol
Party member
Posts: 706
Joined: Fri Jun 22, 2012 4:54 pm
Contact:

### Re: Lovely People Helping a Misguided child in Game Dev.

It is strange, but it's exactly what I liked... I think this setup "feels" nice. Can't really explain it better
trAInsported - Write AI to control your trains
Bandana (Dev blog) - Platformer featuring an awesome little ninja by Micha and me
GridCars - Our jam entry for LD31
Germanunkol.de

BulbaMander
Citizen
Posts: 58
Joined: Sat Dec 15, 2012 7:00 pm
Location: Pittsburgh, PA

### Re: Lovely People Helping a Misguided child in Game Dev.

T-Bone wrote:Isn't it a little strange that the blue square moves smoothely but the light around it moves in discrete steps?
I wish I could do that, but the map draws tiles depending on distance from the player, its not like there is light or anything that is being cast from the player so I have no idea how to sync that with the players movements. I guess I could use the players smooth coords for the distance formula but that would just have odd timing and not worth it because the game is still drawing whole squares. Should I just get rid of smooth movement? Or jsut make it really fast so it's still there but less noticable that the light isnt synced?
Germanunkol wrote:It is strange, but it's exactly what I liked... I think this setup "feels" nice. Can't really explain it better
[insert a thumbs up]
It takes an idiot to do cool things. Thats why they're cool.

### Who is online

Users browsing this forum: Google [Bot] and 10 guests