TM
Full Member
Offline
Posts: 133
AIDS Charity Game: trail problem [moved]
Jul 9th , 2008, 1:39pm
ps: the post is long, but please help me. Hi, I work for a AIDS Charity ( avert.org ). I am also a artist that use processing in some works. So when we talked about doing a game, I though "processing". Basically, we are developing a game where you are controlling a snake-thing. You have to collect letter and/or items and avoid baddies. We want a nice movement and a brain-training-like type of game. The development is doing well but we have a problem with the snake. I can't manage to control the length of the snake. Here is how I am doing it for the moment and a possible solution: Problem: I've got a class ( bone ) which is a vertex. The first end of the first line is attached to the mouse. When the mouse move, each extremities of the object take the position of the object in front. It all relies on how fast the mouse move and how fast the computer "record" the mouse pos. The problem is that the faster you move, the longer is the snake. Which is cool for the gameplay in a way. But on slower machines the snake become incredibility long. What I am trying to do to fix this is, I think, not really efficient: I declare a "length". I divide all section ( bones ) of the snake by this length. Store all those new positions. Draw the snake on x number of "length". Other questions: 1/ It's really slow on firefox-osx, but smooth on all other platform/os combination ( Xp, osx, IE6, IE7, Safari, Firefox 2 and 3 ). Any clue? 2/ which is best a snake made with just a loop or with objects. We would all appreciate some help on this. I know it's not a quick question but if you have any ideas on how to fix this or how to have the same movement. Here is a version of the game ( not even alpha version ) . This really just the work on the fundamentals of the game. No sound, no design ( a little ), no interface, etc... http://www.avert.org/p5/