Here's my prototype for March 4th. The theme was "Escalation". Any feedback is welcome.
In the game you score up when you reach the yellow box. Touching red circles kills you. You can change your size by using w and s keys. The bigger you're, the slower you move and vice versa. At maximum size you stop.
Since the positions of the red circles are randomly generated, sometimes it's easy, sometimes it's hard. You try to reach your maximum score.
EDIT: I don't think I came up with the best idea for this mechanic. Do you have any suggestions?
Update: Every even level is vertical now
Resized
Resized
- Attachments
-
- resized.love
- (1.54 MiB) Downloaded 109 times
Last edited by bgordebak on Sat Mar 04, 2017 6:16 pm, edited 3 times in total.
Re: Resized
I enjoyed it. Mechanics seem fine.
What is the reason for the multiple randoms in love.load()?
What is the reason for the multiple randoms in love.load()?
Code: Select all
math.random(); math.random(); math.random()
Re: Resized
Thanks a lot!mtdev wrote: ↑Mon Mar 13, 2017 5:15 am I enjoyed it. Mechanics seem fine.
What is the reason for the multiple randoms in love.load()?
Code: Select all
math.random(); math.random(); math.random()
I read somewhere that the first math.random() in lua isn't random, so you need to use it at least once to get a really random number after that. I saw someone put three to be on the safe side. I don't know the reason, but I like to be on the safe side.
- zorg
- Party member
- Posts: 3470
- Joined: Thu Dec 13, 2012 2:55 pm
- Location: Absurdistan, Hungary
- Contact:
Re: Resized
Yes, it may or may not give back a "random enough" first value, depending on many factors. That's why it doesn't hurt to call it a few times.bgordebak wrote: ↑Mon Mar 13, 2017 5:18 amThanks a lot!mtdev wrote: ↑Mon Mar 13, 2017 5:15 am I enjoyed it. Mechanics seem fine.
What is the reason for the multiple randoms in love.load()?
Code: Select all
math.random(); math.random(); math.random()
I read somewhere that the first math.random() in lua isn't random, so you need to use it at least once to get a really random number after that. I saw someone put three to be on the safe side. I don't know the reason, but I like to be on the safe side.
However, one of those factors is OS-dependence, or in other words, lua's (including luajit too, probably) random generator will most likely give back different results on different OS-es (and/or architectures, even).
A good reason why löve has received its own random generator stuff in 0.9.0; it'll give back the same numbers on all platforms.
People should use that instead of math.random.
(Also, only love's is seeded in love.run on startup, meaning you'll probably always get back the same numbers on each restart if you're not seeding lua's random generator yourself)
Me and my stuff True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
Re: Resized
Thanks zorg, I didn't know that LÖVE has its own random generator.
I always used math.random() by seeding with os.time(). But from now on I'll use LÖVE's.
I always used math.random() by seeding with os.time(). But from now on I'll use LÖVE's.
Re: Resized
Thank you both for the knowledge.
Who is online
Users browsing this forum: No registered users and 2 guests