TLDR: This is a very buggy basic implementation of TIM, only not so Incredible since it's totally broken and lacks the game part. So it's mostly about crashing pico with overflowed math using bowling balls that are apparently covered in flubber. :D
I am probably going to miss the jam deadline for this one, my weekend exploded on me. The trig and collisions also gave me hell the last few days trying to figure it all out, so now this is mostly a featureless demo of some basic line based collision code.
I want to upload what little I got working at least. As I get the rest of the game systems in place, I'll update this with stable-ish versions. By no means is this a game yet, but I thought some of you might like to poke around and see how the game is structured or how you can start doing line based sprite collisions.
directionals - move cursor
Button 1 - puts things, picks things up
Button 2 - enter parts bin mode, leave it(you can also leave by grabbing a part with button 1)
-Press the play button to start the simulation. While running, press again to stop. Stopping it will "revert" parts back to original positions and speeds.
-The reset button does not work yet.
-The rocket part is a wip, and does not have a concept of thrusting yet. It simply starts with some momentum and will run out once it hits a wall.
-Gravity is totally placeholder and completely wrong. In real life, objects do not care what weight they have, but I needed something quick slapped together to test the collisions. I aim to fix this later with a proper calculation instead.
-The momentum from bounces is either wrong, or the balls are bouncing multiple times off a platform sometimes. They seem to just gain momentum as they bounce. This is basically what's been giving me hell and is eating my time. :(
-there is no friction yet, so sadly no rolling or anything like that.
-I left the debug line drawing code in place, the red lines are what the "collision engine" is seeing. Each frame it loops through moving parts and checks for collisions with any lines nearby(It only can see a single block in any direction to keep it running smooth).
-If you want more parts to play with, you'll have to add more parts manually through code in _init(), though the existing part spawning code is simple enough. (partID,x,y are the parameters in case you can't figure it out yourself.) Be careful adding moving parts, as they take a lot more memory then the walls and ramp. Note that if you wish to grab the part it MUST be on a multiple of 8, or in other words, "on grid".
-The parts in the parts bin auto-sort themselves, though I have not tested the wrapping part code yet. It's supposed to wrap part placement to keep them in the bin if you go over a single row. No vertical scrolling has been implemented yet.
Anyway, I hope at the very least some of you can learn something from this version's code. I'll keep poking it, though my progress is very slow. I deal with trig and code in my other things, so lately I'm too tired to think straight when I get to pico8. ;)
I also have not come up with a good way to store puzzle data yet. I'm thinking of using the map or sprite data somehow. The real game I'm copying has user made levels, I'm not sure I'm skilled enough to tackle that yet. Pico's saved data limits are really hard. :/ But fun to try to use, as most of it! :)
[Please log in to post a comment]