Log In  
Follow
fabsh

Journalist & writer, freelance — "Understanding is a three-edged sword"

[ :: Read More :: ]

Cart #retro_clock-1 | 2024-02-25 | Code ▽ | Embed ▽ | No License
3

My first cart release. Ever. Just a little tool I built for myself, because I thought all of the desktop clocks and stopwatches I found for Windows were ugly. Therefore, meet Retro Clock, a nixie-inspired desktop clock and stopwatch for the PICO-8 fantasy console:

It shows the time in a pleasant, retro-futuristic way. It shows your current system time and the corresponding offset to UTC, as well as the current date. If you press the UP button, you can toggle between daylight saving time (DST) or normal time.

Pressing X will bring up stopwatch mode. You can start and stop the stopwatch by pressing X. Pressing X again will resume where the stopwatch left off. Pressing O resets the stopwatch. You can return to the simpler clock-only view by pressing LEFT.

The visuals are based on a nixie clock I own that uses old Soviet IN-16 tubes.

Special thanks go out to @Krystman! I learned a lot from watching his tutorials and none of the horrible code in this mess is his fault.

Clock Mode:

Stopwatch Mode:

A web version of this program is available here: https://fab.industries/pico-8-tools/clock/

To Do List

As you can tell by the version number, the thing isn't finished yet. I would appreciate some testing. You can follow the development (and see the full source code) here: https://github.com/fab-industries/retro-clock

  • FIXME: Currently the app only works for about 9 hours, before PICO-8's time() function loops around into the negative and blows everything to hell
  • TODO: Make buttons light up when pressed
  • TODO: Sounds?

Credits

Idea, art & code: Fabian A. Scherschel

Release Notes

v0.02 (25/02/2024): Stopwatch and clock displays now synchronised
v0.01 (22/02/2024): Initial release

P#141771 2024-02-22 11:25 ( Edited 2024-02-25 11:15)

[ :: Read More :: ]

Hello, everyone!

I am very new to this and not a good programmer in general (language comes much more naturally to me than maths) so I need your help. I'm making my first PICO-8 game. It's a WWII submarine simulation game where you have a top-down view of your sub. You can dive (which just hides the boat) and fire torpedoes. I have most of the graphics done. What I need your help with is this:

How do I rotate the game world around my boat and keep track of enemy ships I spawn? The game world itself is empty (it's just the blue ocean). But I want to spawn in ships randomly off screen and then have them move slowly across the game world. And I want my boat to be able to turn around slowly with the camera locked to the boat. I've decided the boat will just move at a fixed pace so all the turning is doing is changing the view of the world (which is what you see on screen). I might actually just fake movement of the player boat by moving the enemy ships in a relative direction accordingly.

Let's assume the boat isn't moving. I can tackle that later, when I have this other stuff in place. How do I define a section of ocean a few screens wide in all directions and then spawn enemies there? And how do I rotate the view around the sub (including the enemy sprites) and then keep track of their position relative to the rotating camera?

If anyone has links to tutorials that explain at least part of this, I'd be grateful. I've been looking around in vain for a while for things that come close to explaining what I want to do here.

If anyone wants a look at the code I have so far, knock yourself out. It's just some basic drawing graphics on screen stuff. You can tell the aesthetics I'm going for from it, though:

https://github.com/fab-industries/subsim

P#91834 2021-05-12 08:36