## Ninwa's Love Puzzle - (my latest game!)

Show off your games, demos and other (playable) creations.
ninwa
Party member
Posts: 118
Joined: Tue Oct 12, 2010 1:21 am
Location: Metro Detroit
Contact:

### Ninwa's Love Puzzle - (my latest game!)

Note: This has been written for and tested with Love .70 beta only. It probably works with .6.x, however.

Hello again!

I'm back again with my second Love game ever! It's not another space shooter, but this time, a physics based puzzle game. How cliche, I know, but I needed an excuse to play with love.physics )

Screenshot:

How it works:
You will begin the game with a count-down timer. You can click anywhere on the screen to create a node. Each node will connect to it's nearest neighboring node. These lines that are created are your platforms, your tools to guide your ball. Oh yeah, there's a ball. Isn't there always a ball in these puzzle games? It will fall from the center-top of the screen and you must guide it into the green rectangle of success. The catch? Well, first, it takes some getting used to how the nodes work. The other catch? Your previous nodes remain into the next stage! You can return to a previous stage to reconfigure the nodes, don't worry, once you beat it again the next levels rectangle of success wont move. You will have to return to previous levels, it's okay, that's part of the fun (I hope.)

I can't explain it much better than that. Just go try it!

Controls:
• Left mouse click: Draw a node.
• 'r': Reset level
• left arrow: return to a previous level (only active after you've hit 'r' or lost the current level.)
Current bugs:
• If you draw a node too close to another node Box2d throws an exception. This is a limitation in Box2d's rectangles. They must be over a certain size. I am looking to fix this in the future as using their rectangles isn't the most elegant solution.
• v01 (updated 10/19 for minor bug fixes) - http://www.josephbleau.com/ninwaLovePuzzlev01fix.love
• Fixed finishing rectangle being drawn outside of screen.
• You can no longer press left to visit the previous level at any point, only after having lost.
• You can no longer lose after already having won (the lose timer now stops poperly, and all physics are frozen after winning)
Let me know what you think. Feel free to navigate the code, but I warn you now, it's not pretty.

Regards,
Ninwa
Last edited by ninwa on Tue Oct 19, 2010 9:32 pm, edited 4 times in total.

ninwa
Party member
Posts: 118
Joined: Tue Oct 12, 2010 1:21 am
Location: Metro Detroit
Contact:

### Re: Ninwa's Love Puzzle - (my latest game!)

There seems to be some sort of bug (at least on Windows) where the randomly generated spot for the finishing boxes isn't all too random. I'm going to look into this in the morning.

-nin

arquivista
No longer with us
Posts: 266
Joined: Tue Jul 06, 2010 8:39 am
Location: Insert Geolocation tag here
Contact:

### Re: Ninwa's Love Puzzle - (my latest game!)

the ideia seems nice but needs yet a lot of work.
some problems detected:
- after we won if ball gets away countdown restarts.
- in level changes should'n reset the old nodes?
- random box shows sometimes too low
--------------------------------------------------------
To Do: Insert Signature Here
--------------------------------------------------------

ninwa
Party member
Posts: 118
Joined: Tue Oct 12, 2010 1:21 am
Location: Metro Detroit
Contact:

### Re: Ninwa's Love Puzzle - (my latest game!)

arquivista wrote:the ideia seems nice but needs yet a lot of work.
some problems detected:
- after we won if ball gets away countdown restarts.
- in level changes should'n reset the old nodes?
- random box shows sometimes too low
The first and third point should be pretty easy to fix. The second point is what makes the game difficult. If it weren't for that the solution would be a V every level. I possibly didn't communicate the idea well enough (my fault) but the reason you can revisit old levels is so that you can make your solution more helpful in later puzzles. I think I need to work on making this more obvious to the player.

Nin

Thursdaybloom
Citizen
Posts: 81
Joined: Mon Feb 15, 2010 3:43 am
Location: Australia

### Re: Ninwa's Love Puzzle - (my latest game!)

I understand what you're trying to achieve with the world revists. How about, as an alternative to level repetition, you have the location of where the next square is going to be visualised on the current level that you're on? This way we try and create our platforms to get the ball in the square at hand yet we have the foresight of knowing where the next square will be. This means we not only have to try make the ball stop in the square, we have to craft it in such a way that will help with the next level. I think node deletion needs to be implemented in some way (imagine level 12 without any node deleting...) but this is another issue.

nevon
Commander of the Circuloids
Posts: 938
Joined: Thu Feb 14, 2008 8:25 pm
Location: Stockholm, Sweden
Contact:

### Re: Ninwa's Love Puzzle - (my latest game!)

Thursdaybloom wrote:I think node deletion needs to be implemented in some way (imagine level 12 without any node deleting...) but this is another issue.
Maybe, to make it a little more difficult, without being an annoyance, you could have a maximum of 10 nodes - and when you add an eleventh, the first one is automatically removed?

zac352
Party member
Posts: 496
Joined: Sat Aug 28, 2010 8:13 pm
Contact:

### Re: Ninwa's Love Puzzle - (my latest game!)

Why does that make me think "Armadillo Run"?

thelinx
The Strongest
Posts: 848
Joined: Fri Sep 26, 2008 3:56 pm
Location: Sweden

### Re: Ninwa's Love Puzzle - (my latest game!)

Code: Select all

math.randomseed(os.time())
math.random() -- the first random number is usually the same even across different seeds
math.random() -- for good measure

Also, I noticed a bug where if you try to spawn a node on top of another node, box2d makes LÖVE die. Not nice.

vrld
Party member
Posts: 917
Joined: Sun Apr 04, 2010 9:14 pm
Location: Germany
Contact:

### Re: Ninwa's Love Puzzle - (my latest game!)

thelinx wrote:the first random number is usually the same even across different seeds
Time to test that statement:

Code: Select all

> tbl, c = {}, 0
> for i=1,10000000 do math.randomseed(i) local r = math.random() if tbl[r] then c = c + 1 end tbl[r] = true end
> print("colissions:",c, "rate:", c/10000000)
colissions:	23416	rate:	0.0023416

Taking every third random yields:

Code: Select all

colissions:	24082	rate:	0.0024082
So I guess it does not really matter.

Setting the seed is still a must though.
I have come here to chew bubblegum and kick ass... and I'm all out of bubblegum.

hump | HC | SUIT | moonshine

Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

### Re: Ninwa's Love Puzzle - (my latest game!)

I think it depends on the platform or C standard library implementation of random.