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
Before you make a thread asking for help, read this.
Post Reply
User avatar
BulbaMander
Citizen
Posts: 58
Joined: Sat Dec 15, 2012 7:00 pm
Location: Pittsburgh, PA

Lovely People Helping a Misguided child in Game Dev.

Post by BulbaMander » Mon May 06, 2013 4:36 am

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.
(52.21 KiB) Downloaded 69 times
escape the dungeon v0.2.love
version two, took out the attacking dont know what to do with that yet
(40.68 KiB) Downloaded 69 times
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.

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

Re: Some stupid thread about some stupid kid's game

Post by retrotails » Mon May 06, 2013 5:16 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?

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

Re: Some stupid thread about some stupid kid's game

Post by Plu » Mon May 06, 2013 6:35 am

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)

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

Re: Some stupid thread about some stupid kid's game

Post by rhezalouis » Mon May 06, 2013 8:56 am

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? :huh: "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 :roll:.

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. :crazy:
Aargh, I am wasting my posts! My citizenshiiiip... :o

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

Re: Some stupid thread about some stupid kid's game

Post by BulbaMander » Mon May 06, 2013 7:17 pm

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? :huh: "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 :roll:.

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. :crazy:
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.

Post by Germanunkol » Tue May 07, 2013 2:45 pm

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

User avatar
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.

Post by BulbaMander » Tue May 07, 2013 9:58 pm

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

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

User avatar
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.

Post by T-Bone » Wed May 08, 2013 5:58 am

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.

Post by Germanunkol » Wed May 08, 2013 6:37 am

It is strange, but it's exactly what I liked... I think this setup "feels" nice. Can't really explain it better :P
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

User avatar
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.

Post by BulbaMander » Wed May 08, 2013 7:17 pm

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 :P
:ultrahappy: [insert a thumbs up]
It takes an idiot to do cool things. Thats why they're cool.

Post Reply

Who is online

Users browsing this forum: No registered users and 10 guests