Matt's Prototypes

holy :playdate: batman! What a great write up, thank you so much for sharing!!

I find it fascinating that you use OpenSCAD to program your models instead of something like blender, but I can also see how small, more simple objects might be easier to program than model by hand. I'll have to dig into OpenSCAD more than I have in the past (for 3D printing stuff).

Looking at your explanation for Retrobatch, I wonder how much could be accomplished using vanilla Automator actions. Certainly a cool app, I never knew it exited!

Thank you again for the explanation, you're doing great things with this project and I continue to look forward to your progress updates :playdate_happy:

I shouldn't be this surprised but that is an impressive number of sprites for one car and explains why your animations are so smooth. How are you handling your animation tree so smoothly @ 50fps??

Keep up the awesome work!

1 Like

Confession time: I have never used Blender. The barrier to having to learn it is always too great when I can just carry on with my existing tools. You know?

No idea about Automator, but I think it would be more limited and way more difficult than Retrobatch. I mean, you could do all this on the command line if you wanted to. But why would you when there's a great app like Retrobatch?

32 is a number that is a leftover from a different prototype and it's stuck. I guess it should really be 36? or 24? or 18?. But it's too late now! :playdate_cry_laugh: Actually it would be relatively easy to change but I have bigger fish to fry.

Handling the animation changes - there is no tree! I don't do anything special other than set the frame number based on the angle when that changes, but only actually change the sprite image if it needs changing. It's so very important to do all you can to not update or move sprites unless you actually need to. Minimise drawing!

The animations alone could run at 99fps — it's anything that causes more drawing which slow things down. Collisions, not because they are computationally heavy, but because they cause a lot of sprite updates - which means drawing moving things - to happen. I'm working hard to maintain 60fps on device (50fps in simulator for... reasons) and am excited I've managed to get here.

I'll have a think about posts for other aspects of my game.

1 Like

I am curious @ast-rsk how would you go about building a car like this in Blender?

1 Like

It's late but I took a crack at the F1 model. Here's about 5m sped up to about 1m, just the modeling part and no texturing though it would be super easy to texture since you can use a 1-bit texture to uv map in seconds. Of course I have your reference image so it's faster to accomplish and I made a bunch of mistakes because I didn't plan this out too well.

oops, gif cutoff. heres the mp4 of the timelapse

My thinking here is that if I were to adapt your process on windows, I'd use blender (I guess it would work on mac too) to setup a template file that has a camera animation where stock camera positions are setup as keyframes, and in sync with those keyframes would be the necessary part movements like wheel positions.

Using the template project you could model up and texture a car pretty fast and then just hit render to render out each frame. From there we would need some way to stitch the images into a sprite sheet but theoretically blender can have its render settings configured to output the right size per-frame, right color depth, even add in shaders that could filter for you, and the only step would be to stitch into a sprite sheet. I'm over simplifying the process because again, it's late. But that's just off the top of my head with your great detailed process explanation!

1 Like

Thanks for that! Very interesting.

All of my positions and distances are based on units that I know map well to a 32px sprite, so eyeballing it like you did gives me shivers. But I guess there's a way of entering specific coordinates into Blender? But that would perhaps slow down the modelling process?

Something for the weekend?

Here's another demo build of Daily Driver. It is a couple weeks old (dated 30 July) so whilst not representative of where I am right now with the game it does show my progress since the last build I shared at the start of June. Would love to know your thoughts!

Controls

  • any combination of d-pad, A/B, Crank
  • d-pad U/D, or A/B = accel/brake
  • d-pad L/R, or Crank = steer left/right

Notes

  • runs at 60fps on device (50fps in Simulator)
  • pressing Menu twice will reset the current stage layout
  • pressing Menu then Options will load the next stage
  • 19 different stages (all cone layouts in this build)
  • includes level editor!

Debug Keys for game (simulator only):

  • E = open level editor
  • F = toggle fps indicator
  • J = jump!
  • L = list all sprites
  • N = next stage
  • P = play replay data
  • R = print replay data to console
  • T = toggle telemetry
  • U = toggle frame limiter

Controls for editor (simulator only):

  • d-pad = move cursor
  • A = place an object or increment object under the cursor
  • B = toggle precision mode
    • cursor moves in smaller increments (5px vs 20px)
    • drag/move item under cursor
    • A = delete item under cursor

Debug Keys for editor (simulator only):

  • B = new blank stage
  • D = dump stage JSON to console (for copy and pasting)
  • E = exit level editor
  • O = output stage as "m-edited.json" in game Sandbox directory
  • Z = undo (deletes last item placed)

Downloads:

For 0.11 and newer I added some quick menus:

  • telemetry on/off
  • next stage
  • reset stage

Feel free to share some levels on here if you dare.

Have fun!

july.opt

3 Likes

Sorry if I missed something obvious but is there anything I have to do before running it? I copied over the pdx and it crashes because trackData in loadTrack (scene.lua:57) is nil.

How strange! I believe others have been playing it fine, and I played it to take the GIF.

@veubeke Is there a chance it's unzipped wrongly? The error indicates it can't find the contents of the track subfolder inside the pdx.

Thinking about it a little more... you say "copied over the pdx" could you try opening it on the Simulator? assuming it works there you could choose "upload to device". This is how I install games on my device.

Thanks, I didn’t know you could open pdx files in the simulator. I had to delete folder in Data on the device, then upload from simulator, and it worked.
I wonder what the difference is between copying it over and uploading via simulator. I tried a few other demos and they worked fine after copying. :thinking:

1 Like

I'll investigate!

Glad you've got it working.

Hi Matt! How do you catch custom (debug) keys in the simulator?

Check the docs at:

Simulator debug callbacks

These callbacks are only invoked when your game is running in the Simulator.

playdate.keyPressed(key)
playdate.keyReleased(key)

1 Like

Thanks a lot!
It's amazing how I missed this in the docs. :thinking:

1 Like

When you get a crazy idea that you'll never be able to use but you do it anyway, just to scratch the itch.

trueno.opt

4 Likes

Since I am targetting 60fps one of the things I can do is flash a black sprite every other frame to get a shade of grey. It only works at high framerates (50fps isn't high enough!) and only on device (taking a photo was... fun). I'm not sure I'll use it, as all other shadows are dithered and flashing them all will hit the framerate. But it was fun to try! One for another game.

grey shadow demo: https://devforum.play.date/t/matts-prototypes/826/87

4 Likes

Had a productive chat with Gus at Flying Meat who make Retrobatch and with his help condensed my 3 sprite workflows into 1 smaller and quicker workflow!

2 Likes

Accidental new game mode discovered?

"Cannonball Run" — collect stuff whilst a barrage of heavy balls bounce around the screen

wrong.opt

5 Likes

This looks like madness! I love it haha!

1 Like

Hey Matt - this looks utterly delightful. I received my Playdate dev kit today and immediately wanted to give this a go, but sadly the device says the demo is "too old" for the latest firmware (which I installed). Any chance you might have a new build? :slight_smile:

Also, sorry to be such a newb, but how does one uninstall a build from the device? I've managed to install to it using the Simulator (in Windows) but that's how far I got so far.

Thank you!

1 Like