fabsh [Lexaloffle Blog Feed]https://www.lexaloffle.com/bbs/?uid=45636 Retro Clock v0.02 <p> <table><tr><td> <a href="/bbs/?pid=141771#p"> <img src="/bbs/thumbs/pico8_retro_clock-1.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=141771#p"> Retro Clock v0.01</a><br><br> by <a href="/bbs/?uid=45636"> fabsh</a> <br><br><br> <a href="/bbs/?pid=141771#p"> [Click to Play]</a> </td></tr></table> </p> <p>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 <strong>Retro Clock</strong>, a nixie-inspired desktop clock and stopwatch for the PICO-8 fantasy console:</p> <img style="margin-bottom:16px" border=0 src="/media/45636/cover-screenshot.png" alt="" /> <p>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 <code>UP</code> button, you can toggle between daylight saving time (DST) or normal time.</p> <p>Pressing <code>X</code> will bring up stopwatch mode. You can start and stop the stopwatch by pressing <code>X</code>. Pressing <code>X</code> again will resume where the stopwatch left off. Pressing <code>O</code> resets the stopwatch. You can return to the simpler clock-only view by pressing <code>LEFT</code>.</p> <p>The visuals are based on a nixie clock I own that uses old Soviet IN-16 tubes.</p> <p>Special thanks go out to <a href="https://www.lexaloffle.com/bbs/?uid=16423"> @Krystman</a>! I learned a lot from watching his tutorials and none of the horrible code in this mess is his fault.</p> <p><strong>Clock Mode:</strong></p> <img style="margin-bottom:16px" border=0 src="/media/45636/clock-mode.gif" alt="" /> <p><strong>Stopwatch Mode:</strong></p> <img style="margin-bottom:16px" border=0 src="/media/45636/stopwatch-mode.gif" alt="" /> <p>A web version of this program is available here: <a href="https://fab.industries/pico-8-tools/clock/"><a href="https://fab.industries/pico-8-tools/clock/">https://fab.industries/pico-8-tools/clock/</a></a></p> <h3>To Do List</h3> <p>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: <a href="https://github.com/fab-industries/retro-clock"><a href="https://github.com/fab-industries/retro-clock">https://github.com/fab-industries/retro-clock</a></a></p> <ul> <li>FIXME: Currently the app only works for about 9 hours, before PICO-8's <code>time()</code> function loops around into the negative and blows everything to hell</li> <li>TODO: Make buttons light up when pressed</li> <li>TODO: Sounds?</li> </ul> <h3>Credits</h3> <p>Idea, art &amp; code: Fabian A. Scherschel</p> <h3>Release Notes</h3> <p><strong>v0.02</strong> (25/02/2024): Stopwatch and clock displays now synchronised<br /> <strong>v0.01</strong> (22/02/2024): Initial release</p> https://www.lexaloffle.com/bbs/?tid=140295 https://www.lexaloffle.com/bbs/?tid=140295 Thu, 22 Feb 2024 11:25:35 UTC How do I rotate my game world and keep track of enemies? <p>Hello, everyone!</p> <p>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:</p> <p>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.</p> <p>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?</p> <p>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.</p> <p>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:</p> <p><a href="https://github.com/fab-industries/subsim"><a href="https://github.com/fab-industries/subsim">https://github.com/fab-industries/subsim</a></a></p> https://www.lexaloffle.com/bbs/?tid=42865 https://www.lexaloffle.com/bbs/?tid=42865 Wed, 12 May 2021 08:36:00 UTC