Search found 18 matches
- Thu Mar 07, 2013 12:34 am
- Forum: General
- Topic: Tables within tables, within tables...
- Replies: 2
- Views: 2269
Re: Tables within tables, within tables...
Thank you very much the the response! I'm can't believe I didn't figure that out . Now my map will have layers! Maybe I'll make a bridge! Maybe I'll make a staircase! Thanks again, and hopefully I'll have a cool-bean map to show off soon!
- Wed Mar 06, 2013 11:47 pm
- Forum: General
- Topic: Tables within tables, within tables...
- Replies: 2
- Views: 2269
Tables within tables, within tables...
I am trying to make a 2d, overhead-view game and I am having some problems with my map. I want to create a map table that has an [x] and [y] dimension. However, I also want the map to be in layers. This way I could make layer 1 be the basement level, 2 be the floor, and 3 be a roof (or something sim...
- Tue Feb 05, 2013 9:14 pm
- Forum: General
- Topic: Math.Random question
- Replies: 12
- Views: 8430
Re: Math.Random question
Oh, ok. Thank you very much for teaching me that
I will read everything linked, hopefully I'll get this working in no time!
I will read everything linked, hopefully I'll get this working in no time!
- Tue Feb 05, 2013 3:56 pm
- Forum: General
- Topic: Math.Random question
- Replies: 12
- Views: 8430
Re: Math.Random question
First of all, sorry about the double post. It will not happen again. The computer I am on isn't working properly for making .love files (not admin on this comp). I will upload the .love file later when I get access to my home computer. For now here is all the code I am using for the random: rand.lua...
- Tue Feb 05, 2013 3:20 pm
- Forum: General
- Topic: Math.Random question
- Replies: 12
- Views: 8430
Re: Math.Random question
In other words: How can I get a random number that is NOT based on os.time, because I generate multiple random numbers at the EXACT SAME TIME which causes them to all be the same.
- Tue Feb 05, 2013 3:12 pm
- Forum: General
- Topic: Math.Random question
- Replies: 12
- Views: 8430
Re: Math.Random question
Thank you very much for the replies, I still a little stumped though. While I do (now) understand how random numbers are generated, I still don't know the best way to get different random numbers at the same os.time. How would I implement something like mouse movement or cosmic radiation to my rando...
- Tue Feb 05, 2013 3:53 am
- Forum: General
- Topic: Math.Random question
- Replies: 12
- Views: 8430
Math.Random question
I understand that math.random's seed in based on the os.clock. I am having a small problem with many random numbers declared many times in a row. Here is an example: for a=1, #objectsToMove do local rand = math.random(-5,5) objectsToMove[a].x = objectsToMove[a].x + rand * dt end This is an example o...
- Wed Jan 30, 2013 5:23 pm
- Forum: General
- Topic: Resolution Question
- Replies: 8
- Views: 5518
Re: Resolution Question
What exactly does that mean, I just looked it up but I don't quite understand the difference. If it makes my moniter resolution 800x600, does that look any different than actually scaling? Also, if i do "scale" that would imply i have different images for 32x32 and 64x64 and 128x128 correc...
- Wed Jan 30, 2013 4:45 pm
- Forum: General
- Topic: Resolution Question
- Replies: 8
- Views: 5518
Resolution Question
When I coded my game, I had a ScreenScaleWidth and ScreenScaleHeight variable, which was created with "CurrentScreenSize/800." My intent was to be able to easily scale all graphics with the new screen size. However the love.graphics.ToggleFullscreen() functions AUTO scales for me, I don't ...
- Fri Jan 18, 2013 3:21 pm
- Forum: General
- Topic: Checking for a Nil value from a table.
- Replies: 4
- Views: 6026
Re: Checking for a Nil value from a table.
Thank you so much, the "y" not existing was the problem. I was able to fix it by declaring my table like this: level = { { }, -- # of { }s are equal to the map height { }, { }, { }, { }, { }, { }, { }, { }, { }, { }, { } } Thanks again, It's always annoying to make a silly mistake like that