Log In  
Follow
makaGeorge
Star Trader's Luck 1.0.1
by makaGeorge
SHOW MORE

Cart #makasoft0001-1 | 2023-11-24 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
3

Star Trader's Luck

A digital dice game for 1-4 players

Hi all, I discovered Pico-8 about a week ago and after trying it out decided it was best to just develop something as I learn... So I took an old dice game I created way back and programmed a digital version with some animations and music to accompany.

It uses your "typical" roll and re-roll dice mechanic, keeping at least one die each roll. In this case dice represent goods on a planet and the price for each good depends on the amount (supply) in that planet. You can travel to different sized planets and using the optional (and experimental) "Economy" rules, you can also choose between different types of planets that have different sets of dice. These new rules I came up with just now and might need to be adjusted...

The rules (and a print and play version of the game) are available on BGG but the cart includes a short (and hard to read) summary... The game is pretty easy to pick up and play and will guide you through your turn...

You can play solo and try to beat your highscore or play with up to 4 players. Actions take "days" to complete and the next player to play is always the one with the most days left. There's a mechanic where you can choose to go to the same planet the player before you went (with no re-rolls) by spending one more day to travel.

The code is pretty messy and I'm not sure I'll ever clean it up... it could also be more efficient but I did this on the Pico-8 editor learning while programming, so... But as far as I can tell it does work...

Any comments or bug reports are welcomed and I'll try to address them quickly...

Edit: New version fixing a few bugs

P#137288 2023-11-11 20:58 ( Edited 2023-11-24 22:54)

SHOW MORE

Hi all,

New here... just discovered this wonderful system yesterday... I still haven't experimented with actual game development on the platform, but did try the music tracker to check out its possibilities...

While dabbling around with a simple idea for a song with different parts, I assumed I could define each part as a self contained loop and then from the code just switch parts as appropiate. For example: play the first part twice, then the second part twice and then the third part once.

But when I went to search how that could be done I found no simple answer so I gave it a try and made two methods that both seem to work:

  1. Keep track of what pattern is playing and for how long and just when it's about to end use the music command to start playing the next part of the song. As the ticks received from the stat(56) change in jumps (the timing of music playing seems to be different than the one for the update function) you can't wait right unitl the end of the pattern, so I guess sometimes the jump might be noticeable. But the advantage is that you can switch to any other pattern freely...

Cart #pibuwiyego-2 | 2023-10-29 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
2

  1. Keep track of what pattern is playing and dynamically change the loop start/end flags using the poke command to keep looping a part until you want to go to the next part. This has the advantage that the timing is perfect but you can't structure your song freely. You always either go back to the begining of the current part or let it run into the next one.

Cart #niwowufopo-2 | 2023-10-29 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
2

I put all the code into a function that initializes everything and retuns its own songupdate function to be called from _update, so it should be a matter of pasting it and defining the structure.

Right now the speed has to be manually entered and be the same for the whole song. I guess it'd be possible to get it from memory for each pattern...

Last, in the first method you have to set the loop flags on the tracker to define each section of the song, then define just the starting patterns for each section on the initial table. With the second method no loop flags should be set on the tracker and you define each section with the starting and ending pattern, adding a last section used to set the flags to go back to the begining of the song after it ends

Let me know if there're other ways of acomplishing this or any problems you might see...

P#136566 2023-10-29 01:27 ( Edited 2023-10-29 12:52)

Follow Lexaloffle:          
Generated 2024-02-20 22:51:31 | 0.067s | Q:16