[Journal] Bend Hero

Starting a bit late, about an hour a go. I want to do bending coat hangers but that didn’t see to
want to work - so I’ve ended up with bend hero. It’s sorta like guitar hero but with wire or something:

http://www.cokeandcode.com/images/bendhero1.png

You’re the bending bot (see the yellow thing). Your job is to bend the wire to the template marked out on the background in green. The bending bot travels along the wire (getting faster as difficulty progresses). When you press left/right the bot starts bending the wire (clockwise/anticlockwise). When you release it carries on along the way.

You’ll be evaluated based on the on accuracy of the wire to the template. The on screen controls are for the android/iphone versions.

I’m a bit worried the idea is similar to Alan’s, but I haven’t seen his stuff to check yet (only just read it while posting this) :frowning:

Kev

http://www.cokeandcode.com/images/bendhero2.png

Progress:

Controls in a and working (mouse and keyboard)
Can now bend the wire to the shape.
Wire is now limited length
Detects end of wire - and hence bend
Can increase speed of rotate/move to make it harder

Next:

Compare the wire to the template (give a %score)
Add levels (10?) with patterns and target accuracy
Test on Android
Publish the applet for initially testing

Thoughts:

Should add a speed up button to give expert players the chance to set time records
Should be patterns that actually form pictures of something
Level format?
How to handle if the bot goes off the screen
Visuals/Colour updates - what?

Kev

Hi Kev,

Hope you are keeping well. While we have similar concepts, in yours the player moves, while in mine the workpiece moves. Sufficiently different I think :wink: Screenshot now in my thread.

http://www.cokeandcode.com/images/bendhero3.png

Added title screen and a level holder to handle level loading/selection. Few little bits of cuteness around visuals to smooth stuff out.

Tested on android:

http://www.cokeandcode.com/images/bendhero4.png

Works fine with the on screen controls.

Next - pattern assessment.

Kev

Ah, thanks Alan. Nice work btw! :slight_smile:

Kev

when do we get demo ;D

Far out, I’m finding it hard to understand how you can make a game that works on a phone in a weekend!

Heh, only been going a few hours - give me a chance :wink:

Just having lunch - microwave jacket potato and cheese - quick. Put the baby down for a nap and see if I can on with gameplay :slight_smile:

Kev

It’s not really much of a game as yet :wink: On the other hand, it should compile to iPhone too :slight_smile:

Kev

One more hour (real life came up for a bit).

Pattern matching now works, so it knows how close to the pattern you were. I’ve gone with a circuit board style theme. Handled game complete and feedback to the user. I’m still not entirely convinced it’s really a game… demo soon I hope:

http://www.cokeandcode.com/images/bendhero5.png

Kev

Level desinging seems to work ok now. I design the level in SVG (in Sketsa at the moment cause I love it so much). Then I run a little converter to build a java class that I build straight into the code.

http://www.cokeandcode.com/images/bendhero6.png

I haven’t managed to be accurate enough on this level yet. Maybe 80% is too hard to get.

Or maybe… the accuracy calculation isn’t very good. What I do at the moment is scan along both the template and finally wire and take a set of samples (200 currently). I work out how close each of these samples are to each other, working out the average distance a sample on the wire is away from the pattern. Then I use that as a base for a percentage.

Anyone got any better methods?

Kev

That sounds pretty good, but maybe you want to just be more forgiving for slight differences in distance. I see your screenshot there and your own bend is very slightly off the line - your problem is probably that even single sample is giving you a scoring detriment along that line, even though they are in reality very close. You should either remove very little for that difference, or even better you should only remove from the total once per “bend,” although I don’t know if that makes sense for your gameplay. It seems like your entire line is off just because the initial bend was off - so that’s one mistake giving you a very large score detriment. Instead maybe you should just test to see where they bended, and subtract for inaccuracies there.

Na if all the line is just off the other line the average distance of the samples will be pretty low.

Kev

Here’s the first demo, 5 levels (they loop eventually).

http://www.cokeandcode.com/applets/bendhero/

Let me know if you have problems.

Any feedback appreicated!

I’m having half hour off :slight_smile:

Kev

Nice game =)
But I think its to hard or I am to bad.
For the first level I needed 5 tries and the second … my best result after 5 tries was 82,6% :smiley:
€dit: now I got 94,5% … next level I come, 3th level first try 96,1%, the 4th and 5th level solved in the second try … =) So I think only the first two level are to hard (for me). Perhaps 75% or if you want 80% can solve that problem. =)

do you lose a lot of points for not finishing. cause in the 3rd level I got realyl good, but I didnt but I was only like 1cm away, and i get 50%!!!

Still tuning - but it just takes average distance away from the line, so shouldn’t really do that. Could be bugged, if it happens again can you take a screenshot :slight_smile:

Thanks for playing!

Kev

Added sound effects thanks to SFXR. Removed a few tiny bugs and built/test for android:

http://www.cokeandcode.com/applets/bendhero/bendhero7.png

Next:

Try and think of ways to extend the game play
Add a bunch more levels so you can get to the hard bit
Try to design a nicer looking nano-bot thing (damn my art skillz).

Polish mostly I hope for the next few hours.

Kev

Added 5 more levels (remember you can skip levels on the title screen but pushing left/right).

Think I’m done with levels and polish.

Remaining:

Find that elusive bit of extended game play
Redesign the damn bending bot
Test on iPhone

Kev