Matt's Prototypes

Wow, that's a lot of sprites, it's looking good.

BK

1 Like

Punks jump up!

Took me about an hour to:

  • add jumping capability to 3D model
  • run a render
  • add the code to the game to display them

Just some debugging and minor tweaks to do now.

So thanks for the prod @bkumanchik

punks.opt

2 Likes

That looks great! let me know when you have a new build to play with.

1 Like

Will release one shortly after 1.1.1

Tonight's prototype: Kuru Kuru Kuranku

kuranku.opt

will upload a build soon, after I've fixed a collision bug.

1 Like

goal.opt

Test build:

  • 17th July 2021

Changelog:

  • better collision
  • goal and game over states
  • temporary invulnerability on collisions
  • three lives
  • explosions!

Notes:

  • 50fps
  • Press A or B to reset stage at goal or game over

Controls:

  • D-pad = move
  • A = speed up rotation
  • B = speed up movement
  • Crank = (currently unused)
  • Menu
    • Debug (toggle)
    • Background (toggle)
    • Reset Stage
5 Likes

So the magic here (difficult part to implement) is Collision.

2 Likes

Version added with my first attempt at collision

new build uploaded above, loads more included because so many changes since last build :slight_smile:

  • 42 test levels (was 35) including some with jumps in
  • 35 vehicles (was 10), which is everything i've done so far
  • ... that means secret vehicles nobody has seen before!
  • access them through the full debug menu

New build of Kuranku, got to think of a better name.

Dustin asked if I'd tried using the crank more as a steering wheel, in that it has to be returned to the home position to stop steering and go straight.

So I spent a little time trying some things out...

Since the beginning crank steering has been possible, but it requires constant cranking.

I added "momentary" crank steering, which requires cranking only to change the steering. But it gives the same digital control as the original crank steering.

So I came up with a way to map the crank to a sort of analogue steering (actually, right now it maps to frequency of virtual steering button presses).

I'll have a think about how I might be able to do this better, so that the mapping is more obvious and gives a better feel of control. But for now, it works OK. The game feels totally different to play this way.

Dustin also discovered steering by tapping using the d-pad and is enjoying the game more using that technique. I should explain this in the game.

analogue-plane.opt

7 Likes

new build of Daily Driver uploaded above, changes since last build:

  • smoother car rotation
    • now 90 sprites per revolution, was previously 32
  • 4 different types of crank control to try out
    • constant, momentary, analogue, directional

plus the other recent changes:

  • 42 test levels (was 35) including some with jumps in
  • 35 vehicles (was 10), which is everything i've done so far
  • ... that means secret vehicles nobody has seen before!
  • access them through the full debug menu
3 Likes

I commissioned an artist to create a clay-style diorama of Daily Driver!

There are a few things in this scene that I've not yet shown in game footage. Imagine this is a box shot teaser in a game magazine during the wait for Playdate games to release. Please understand.

https://twitter.com/gingerbeardman/status/1428764405521657857?s=21

8 Likes

This looks so awesome! Love this clay style and the cuteness of it!

1 Like

Mission accomplished!

1 Like

I found an old tutorial for a software 3D renderer, and somebody on GitHub had already converted much of it to Lua for LÖVE2D. Models are exported as Babylon JSON format from an old version of Blender.

I rolled my sleeves up and added support for flat-shaded polygons which was missing. I also did some quick optimisations. The plan would be have this run on Playdate and substitute dither patterns for the solid colours.

Part5flat.love.zip (152.9 KB)
tested with LÖVE 11.3

Maths is quite fast even in Lua, it seems. The slowest part is the rasterisation of the triangles by pixel/scanline.

I had the idea to draw the triangles with an SDK function, which is obviously more optimised, and this takes FPS much higher (2.6x improvement in a quick test).

But as you can see this method sidesteps the z-buffer, so Ordering Tables would need to be implemented, like PS1 hardware, for the triangles to be drawn in (mostly) the correct order

...is this all worthwhile?

Plus, the code would need to be converted from Love2D code to Playdate SDK, which I have not done before. My head is still fried from lack of sleep with the new baby so I'll leave this here for now.

Anybody who feels the need to hack on this is welcome!

Regardless, let me know if this is interesting.

1 Like

That's really cool Matt!

Ordering table are pretty cool and fast but they also generate a lot of polygon fight and potential flickering. It's mainly because it uses a single value to evaluate the polygon (usually the average of the vertices). It can be especially bad when you have large polygons or models intersecting with each other.
But I think that would be a pretty good method for the Playdate.

I do think it would be suited to the low power of Playdate. Definitely interested to see.

My desire is to have one model/mesh (a golf course landscape) or at least multiple mesh that do not overlap (grass, sand, water, rock).

And maybe I would be able to control the size of triangles/polygons during export to optimise that aspect.

I also don't need realtime 3D, just the ability to render a view of the scene relatively quickly. Faster would be better, but it's not a deal-breaker for me.

1 Like

Hey if it's not realtime, maybe having a C extension to draw a triangle with some Z-Buffer would be doable. Most likely slower that using the SDK function but fast enough to not have the user really wait for a render. I am sure that adding a bit of Gouraud shading would fit the bill too.

1 Like

Maybe! Nice idea.

Also, I'm not comfortable writing C, so I didn't look at adding to the 3D example in the SDK.