Learning Series - My first coding experiences on Playdate

bubble

bubble - Learning Playdate SDK coding.

This was a simple experiment for me to animate a pulsing circle with math.sin.
Once I realized that math.sin is always moving, I decided to add some text in too.
I think it turned out quite good.

One of my first issues I ran into was figuring out how to draw images onto the screen.
It was me being a bit dumb.

Try it out for yourself!
bubble - egg.zip (32.6 KB)

P.S. You use the crank to make the bubble big and smol.

3 Likes

Nice!

Another thing that's always moving is a count of number of frames displayed. And if something is moving down the screen it's coordinate is always changing.

You can have even more fun combining all these.

1 Like

Ticker

ticker - Learning Playdate SDK coding #2.

Wanted to have some fun with the font text drawing and learn how functions worked.
I learned the following.

tostring(str)

  • Allows me to change a variable to a string.

a .. b

  • Allows me to combine variables and strings.

math.random(1, 50)

  • Creates a random number between the two given numbers.

sound:play()

  • Allows me to play a sound once the "sound" is opened in the script.

This was a really fun experiment about how text works.
Makes me appreciate how message boxes draw a single character out at a time.
The sound effects was just me using LMMS and its woodblock tool with some SNES reverb.

Have fun trying it out!
ticker - egg.zip (670.6 KB)

Controls:
A - Adds a large random number.
B - Adds 1 to the counter.
UP - Timers time gets longer.
DOWN - Timers time gets shorter.
LEFT - Decreases the counter scrolling speed.
RIGHT - Increases the counter scrolling speed.

3 Likes

Little personal update!

Took a break from coding for a little while and decided to look around on the interwebs for a used Playdate console. I attempted a few bid ones and all of them exceeded the range I wanted to buy one for. I try going after ones that have honest descriptions like, "I just have better things to play, yah know." Each one I failed to bid high enough and just gave up. Just this morning I discovered a listing on Mercari that had everything perfect with no bids. I decided to get a early dev Playdate for double the price (but its worth it in my opinion).

I should have one in the upcoming days!
Now I can actually observe the screen, gyro and other neat features of the device.
Like one where I want to emulate the feeling of rumble by using the speaker.

Hopefully, my next project will be a rhythm game! Which yes, will be on itch.io once I figure out my name.

card

scroller · Learning Playdate SDK coding #3.

Finally, I can showcase some of my actual art!

This is a simple move the picture with the crank or buttons thingy that I made for fun. It has a nice satisfying click when you scroll and also has nice momentum based math in it. The math is pretty bad if I am being honest.

So what did I learn this time around?
Not much, but I am getting faster pushing prototypes!

sound:stop() was an interesting thing to look into. In the past usually when I told an engine to "stop sound effects" it would stop everything. But now you can specify WHAT sound can stop. This is used when scroll clicking hits the bottom or top of the image.

.setBackgroundColor() was extremely useful! Its a fast way to paste a color before everything else. Um, although there is no color. The SDK is lying to me. :playdate_upside_goofy:

I got used to "if" statements this time around and used it with button presses.
But this was the first time using the crank as an input.
Really satisfying and was easy to jam into the project.

Overall, this was my way to learn my skills a bit better and see what I can do on the hardware. The image size is 400 x 1200, I am not entirely sure what size will make the Playdate chug a process frame but I will keep it at this size for now.

About the artwork shown in this, its a card game I am working on. It will be a physical game and a video game! I wanted to make it for Playdate ever since 2021 but I felt I wasn't good enough in comparison to what everyone else was making. Its also why I have been so desperate for local multiplayer so each player has their own "secret hand" of cards. Its gonna be a small RPG game similar to Hudson's Pokemon Trading Card Game on Game Boy. I do hope you look forward to it.

As usual, here is the .pdx. (Thats right, no source this time!)
scroller.zip (152.5 KB)

Until next time!
I am still thinking about making an actual game.
Something something I suppose.


Update about a few hours later.
Im currently going through some anxiety about my artwork. I get really scared whenever I post anything of my own. I've been really brave thus far sharing my work and passion. I just need to accept it and continue along.

6 Likes

https://easings.net/ might help your math a little.

3 Likes

Little personal update.

I got my first Playdate!
Its from a reseller as I have said previously.
Its in excellent condition.
However overtime I noticed a very odd and strange issue with my d-pad buttons. They would sometimes double press up or down when I push on them respectively. Now I have seen the Playdate teardown video and it seems like the buttons are doing this because it hasn't been used so they are extremely sensitive to input. One Reddit user explained that they also had this issue but went away after a session. Not sure if the same will happen to me but if it continues onwards I might have to send it in to Panic to get a repair. Poor Playdate. Although, I am having too much fun. I love the Playdate. Also, I have tested the screen latency. Oh boy, its fast. Almost CRT levels! Well actually its almost the same as one. Which is perfect for some skilled timed games.
The volume rumble idea I had earlier won't work as I initially thought, its a bit cumbersome and might damage the speaker so I avoided it. I also am looking into protecting the screen from scratches with a screen protector but I am not entirely sure which one to get out there.
Overall, the Playdate is a fascinating little gaming device which I realized serves as a stepping stone for many vintage hardware projects to be reborn.
Similar to the recent Tamagotchi / Digimon resurgence in the market. I feel like the only problem with the device is its price. Which yes, its a huge gap between you and the product. But I do think the price is justified for what you get. Its unlike anything in the market and fills a empty part of my brain with excitement. I am extremely hopeful for the future of Playdate.

. . . Just as long as my D-Pad buttons don't turn into triple unintentional inputs.

3 Likes

Just want to say I'm enjoying following this thread and you shouldn't feel any anxiety over your artwork, it looks great!

1 Like