Close

Game Update, etc.

A project log for Tiny Bit Machine

An 8-bit solar powered gadget.

gordonGordon 09/06/2024 at 14:190 Comments

Power Consumption Deepsleep

First off, I have been running this program on device past two days:

BB PAXX D0 LP

 It blinks the binary value if the adc reading, which ranges from 20-53 (2.0v-5.3v). Then goes into low power mode until next button interrupt.

Pressing it periodically throught the day and checking voltage, while making sure solar panel was covered, it ran for about 36 hours before hitting 2v and going into power down mode.

Another use case for this could be adding a RTC and using it as a clock... hmmm.

Now onto my current thoughts about the game for device.

Game Ideas:

I wrote a mockup of the game I want to run on device in python. If i need to quickly write and test a program, often I will use python before porting it to C, etc. This allows me to know how many variables, functions, etc I need and get an idea of what the programs structure will look like.

I believe some VERY simple game could be written in TGRK, but the game I want to add would exceed 127 keywords. At this point I am thinking adding it as a built in feature of the arduino sketch. I believe there is enough flash left to add it in there.

The game itself is a 1 dimensional RPG. The world map is a path with 127 "rooms" or maps. Map 0 is the INN, where the player can pay to sleep and restore health.

On any map cell 1-126 there is a random chance for a monster to appear. Their health and damage dealt to player increases in a somewhat random manner the higher the map level. Every time the player kills a monster 3 things happen:

  1. Monster drops random amount of gold based on map difficulty (more at higher levels)
  2. Player gains XP
  3. The map EXPLORED variable gets set to current map cell. Monsters don't spawn on map equal or less than the EXPLORED value. This makes it so map cells are cleared after a monster has been killed on one. And also for "fast travel" to and from inn.

Fast travel. When player leaves inn and moves forward into world map, game will quickly blink through each empty map cell until reaching unexplored one. Same with traveling back to inn.

This becomes incredibly helpful when at higher levels as no not have to manually click through 100+ map levels just to heal up. Playing on the Python version I noticed several things. 

At higher levels 80+ I would have to travel back to the INN more and more frequently, as monsters become stronger and stronger. 

So far I have only made it past lvl 90. I am still tweaking the balance for the games calculations. I want it to be difficult but not impossible.

When players HP gets to 0, player loses, game is over.

If player reaches map 127, player wins, Game over!

Discussions