Don’t know if I’ll have too much time to finish this, but have made a start. Guide the spaceman (?) in his hall down a well by drawing platforms for him to bounce off. Basic falling done, but need to refine the platform drawing then add bonuses and obstacles.
@west wouldn’t the error be solved if you collect garbage after the destruction of physics objects? Recently there was a post about garbagecollect on here…
Code so far
https://gist.github.com/Westenburg/8139969
And a video
Better platform creation and added rocks which fall too. Bonus stars added but don’t interact at the moment.
Very nice. I actually had a very similar idea for my next game, but you were bouncing up on the paddles. I might share a video eventually. Nice concept! I like the falling rocks.
Added a few tweaks - star bursts and water droplets as well as a background bricks for the well - though these need work
Really nice star busts!
@JakAttak - cheers - very straightforward to implement.
- Create a table in setup to hold the stars
starburst={}
Use the following to draw current active stars. On each loop fade the star and if the level of fade falls below 0 then remove the star. In this version the tint command is used to give the star a different random colour each loop.
--starburst
for s,d in pairs(starburst) do
--add transparency to the starburst so it fades away
tint(math.random(255),math.random(255),math.random(255),d.fade)
pushMatrix()
translate(d.x,d.y-man.y+HEIGHT-300)
sprite("Cargo Bot:Star Filled",0,0,d.size,d.size)
popMatrix()
d.x = d.x + d.speed*math.sin(math.rad(-d.dir))
d.y = d.y + d.speed*math.cos(math.rad(-d.dir))
d.fade = d.fade -5
if d.fade<0 then
table.remove(starburst,s)
end
end
tint(255)
Finally use the following routine to create the star burst. It loops round a circle in steps of 12 degrees at the moment, and replace the touch.x and touch.y values with the star location of the burst. I’ve added some randomness to remove the non uniformity of the burst so some stars are omitted, they move at slightly different outward speeds and have different brightness to start with (fade variable) so will “live” for different lengths of time
for s=0,360,12 do
if math.random(3)>1 then
table.insert(starburst,
{x=touch.x,y=touch.y,dir=s-3+math.random(6),fade=175+math.random(50),size=10+math.random(5),speed=5+math.random(5)})
end
Another update - latest code here:
https://gist.github.com/Westenburg/8139969
Video of gameplay
http://youtu.be/CwRvPg5mmmY
Any thoughts on the scoring system welcome.
Finite state machine will be the next update
Very nice! I’d better get cracking on mine…
Another video
Finite state machine up and running. Couple of bugs to iron out but don’t anticipate having much more time to work on it before NYE.
Code also available on github as previously
This is pretty much it - not going to have much time between now and the deadline. Name changed to “Well Racer” ,added special bonuses changed the rocks to other racers and added character selection.
Here is a video plus latest version on the repository.
http://youtu.be/Ok0ZsM3bB7c
One bug which occasionally occurs is in line 651 and is triggered between levels. I think it’s to do with left over collision objects once physics objects have been destroyed but am not sure how to reset the physics engine or clear the collisions. Any pointers would be appreciated.
Finally my best score so far is 4980 - anyone get better?
Wow, really nice. My favorite of the competition entries so far.
As for your highscore… I got a solid 8175
EDIT: new highscore: 11668
Noticed a small bug. If you tap the screen, it doesn’t create a platform, but it still takes a 200 point penalty
@stevon8ter - thanks for the pointer - hopefully that’s it fixed.
@JakAttak - it’s intentional. If the platform you draw (including a zero length one caused by a tap) will earn you a penalty - there is a points cost associated with drawing a platform depending on its length and wanted to discourage users from drawing tiny ones. Now there is the challenge of conserving points by drawing small enough platforms but too small then you incur a big penalty. Maybe this is over engineering and detracts from the game.
Anyway, first release is now on github. https://gist.github.com/Westenburg/8139969
Away for New Year from today so any further updates unlikely.
New high score is 14652
Even though the competition is over I’ve decided to keep developing my entry. Have added (some) custom graphics and a few tweaks to things like the starting position of the player relative to the rest. Also added a load of unlockable content.
Here’s a video of the latest version
Nice! The character has lots of animations, blinking, rolling eyes, catching on fire. Very cool