starting on player-controls
the camera is following behind a car...but you can't really tell because the car isn't rendered yet
a floor
this drops my fps to 40 (max possible on playdate is 50) but i'm hoping/assuming i can find more stuff to optimize. worst case, locking the game to 30fps seems like it would be OKAY, and maybe even the more sane choice for a handheld (to save on battery power)
the real ideal thing would be if you could pick between 30fps (power-saver mode) and 50fps (try-hard mode)
better floor (now with ambient occlusion!)
back up to "usually 50fps" on the device, sometimes dips down to around 47
working on a drifting mechanic
it needs more tuning but i'm absolutely stoked about it already
starting to draw a proper car - i did this first version in a really basic way so i thought it'd tank my performance, but it turns out it still stays at like 45+ fps on the device. not bad!
i'm very bad at lowpoly modeling so the car accidentally looks like an old-timey beater, but i think that's sorta funny so i'll probably try to keep that vibe
night sky - drops me to about 40fps on the device, but i think i can still find more room to optimize
would be nice to add some clouds or something...
adding some presentation at the start of the race, and some basic timer/scoring stuff
all hail lobster font, lobster font will lead us to salvation
working on replay recording/playback - yes, the clip looks the same as the others in the thread, but it's a pretty good run since i was retrying the map. if you think "i see places where the racing line could have been improved" then the game is working, lol
replay data is quite small: stores keyframes containing a bitmask of user-input states (one byte), along with how many frames you held that state for (one byte). a "normal" 30 second replay tends to be around 200 bytes
smarter sampling on the floor...
when it samples the floor tex, it raycasts the texelspace grid to see how many screen-pixels it'll step along the scanline before hitting the next texel, and it can reuse the latest sample until then - fewer samples, sharper result!
it also does some smooth LOD, where it starts using a bigger and bigger "screen-pixel steps per sample" ratio as pixels get farther away
(before/after)
added a realtime shadow for the player's car
it only works on the floor (not the walls) but that's probably okay-enough for me
kinda going off the deep end here but now the car can cast its shadow onto the walls
it's kind of a ridiculously subtle effect, but it ties the mesh-geo, the raycaster-geo, and the skybox together, so uhhh maybe that's something
starting to think about a title screen but i'm not really sure wut to do yet
but hey i have an easy way to make text into 3D meshes (thank you, blender!) so that seems like a sane place to start
been pretty busy for a few days, so not much progress here - but i've started getting into a track editor
initially this is just for me to make some built-in tracks, but i might polish it to make it user-facing if i can figure out a comfy way for people to share their maps
i can now save tracks as files, and then load them - the ghost-car in this clip is included in the track data. the spiral track file (including that ghost's replay) is 161 bytes
zipping the file actually makes it larger (241 bytes) so i think i did good. lol
conveniently, i already wrote a playdate serializer for C, for that previous music-maker app
here's the code for serializing/deserializing a track and its replay. serialization and deserialization use these same functions (the Serializer has a flag to tell it whether it's reading or writing) - so there's no need for annoying/error-prone "near duplicate" routines for input/output
it supports ascii format (more legible) and binary format (smaller file)
reduced the framerate to 30fps since it still beats that on the device, but in doing so i instantly radicalized myself into one of those "30fps is literally unplayable" people, so now i guess i have to optimize for 40 instead
(30 is fine with me in other games, i'm just used to 50 in this one)
whelp turns out i can't figure out how to get it back to 40 (particularly with 4 ghosts active) but 30 actually looks fine on the device - the lower framerate is only noticeable to me when testing in the desktop simulator
something something magic playdate screen. good enough!
added a way to save your replay from the daily challenge, as a way to "chess by mail" against your friends without having to author a map first
also a nice idea from @fsouchu: ghost cars become opaque when you're not touching them
making some campaign-mode tracks - each one has four replays to compete against (bronze/silver/gold/author)
you'll unlock the next track if you get at least the bronze (or silver?) medal. maybe the author-ghosts are only unlocked after you get gold on every track? not sure yet
trying a different style of wall rendering
"walls are just meshes" simplifies a lot of the code and adds lots of new possibilities, but it also adds a slew of new demands, both in terms of code (LOD, sorting, etc) and aesthetics/legibility. feels promising so far, though
added object-sorting to fix the "inside out" walls (check the right side of the screen in the previous clip to see that) - i haven't mixed the cars into that sorting pool yet, but i'll do that soon
gonna need to figure out some static-object culling to skip faraway stuff quickly...there are a lot of small wall-meshes in a full track
various adjustments and new things
(this dips a bit below 30fps on the device, but it feels like there's still a good amount of room for improvement)
@fsouchu for now, yeah!!
dunno if i'll be able to keep them...it really depends on how much i can optimize and resist the constant urge to add more-more-more other stuff. lol
@fsouchu that's how the AO already works - but the texture is so very low-res that it's not useful for any high frequency details at the moment! (checker pattern is the tex resolution)
may change at some point but I don't think I can get away with too much, since the ground renderer takes big advantage of the low res (does a lot of "don't re-sample until the next texel" caching inside each screen-row)
@2DArray There are already so many difficult games on the Playdate so I would say bronze. This way it may still be easy to play yet hard to master.
Just a suggestion 🙂
@donnyglover yeah bronze is definitely feeling like the right move!
in general you can hit a bunch of walls and still beat the bronze times (my strategy for recording those was to mess up every turn at least a little, sometimes a lot) - so getting a campaign-complete screen for all-bronze seems like a good "first bus-stop which rolls credits" to me
@fsouchu it's a fair question, lol
I still haven't updated the car since the first time I implemented it, knowing that I'd need to update/replace it eventually - and it's almost time for that now. I guess the tryhard option is to include multiple car models (with the same driving stats), so the default one looks like a race car but you can pick a jalopy if you think it's funny