Shattered Lands (a multi-part RPG saga for Arduboy)

This is incredible! Where does the map size fit in relationship to Arduventure can you share?

I am interested to see how much content is in this game! Incredible work.

Too bad it is one of the things that crashes the embedded emulator :frowning:

Also when the embedded emulator crashes it seems that chrome mobile crashes. It must be something with chrome because I hear my desktop fans going crazy. Makes the cpu go nuts!

Where does the map size fit in relationship to Arduventure can you share?

The map is 64x64 tiles roughly, though it’s broken up into 8x8 chunks and 16 tiles per map. Each chunk uses 2 bytes (1bit/tile) indicating which tiles are used in that chunk. From there it determines how many bits to use for each tile in the chunk (0bits for 1 tile, 1 bit for 2, 2 bits for 3-4, 3 bits for 5-8, and 4 bits for 8+). This allows the chunks to be individually compressed based on their complexity. One of the things I noticed with Arduventure is it has a very large overworld map (with great details), but doesn’t allow room for sub-maps or much in the way of a battle system. I wanted to have a decent sized map (not exactly 64x64 max, but rather max of 64 chunks) while focusing primarily on the battle system. I’m working on getting the code uploaded to GitHub on my next day off so I can share the source code (licensed GPL v3.0). I’ve got detailed comments on how all the data is broken down, including the map events. I’ve also got a map editor using C++/Qt but I’m modifying it to be able to also edit the map events (that was painstaking creating them all by hand, and required setting the various bits and then using a binary to hex converter).

Too bad it is one of the things that crashes the embedded emulator

The game works fine in the emulator, just not through the forum iframe. Not sure why that’s the case, but if you copy the link to the hex file and paste it as the url in the emulators main site (like this) then it works just fine. Not sure why that is, but I noticed a few games that have that issue.

EDIT: Just tried inspecting the page source in chrome and copied the iframe src link and pasted it into the address bar and it works perfectly fine. Might be something related to the iframe.

Is there an option somewhere to mute the music? I need to be quiet where I am much of the time.

When your playing this game at work :slight_smile: try …

  • Hold the B button while powering up.
  • While still holding the B button, press the UP and DOWN button to toggle between sound on / off.
  • Release both buttons.

(This assumes the game is using the standard Arduboy technique. As the source code is not posted, I cannot verify myself as I am at work too).

1 Like

Thank you, it didn’t work so I guess it doesn’t have that feature at this time.

1 Like

Oh wow that was difficult. I only had 18 bytes available, but it turns out I still had the arduboy.clear() before arduboy.display() from before stripping the boot logo. Deleting that I still wasn’t able to free enough space to call arduboy.systemButtons() which handles the mute/unmute functionality. Instead I read the state of the EEPROM audio value and toggled it if the A button is pressed, then updated the EEPROM with the new value. Still had to free 8 bytes but the player’s battle sprite had 3 unused columns of 24 pixels (3 bytes) each so I cropped it and now my sketch uses the entire 28,672 bytes available. Editing the Initial post so as to keep the latest hex file at the top.

1 Like

See below post for details but it’s there now. Simply hold down the ‘A’ button while turning on the device to toggle audio (it will remember this for future boots as well).

1 Like

Great effort! When you post the code up, I bet a few people can think of interesting ways to save enough bytes that you can put systemButtons() back in.

That is now done. I added links to the top post to keep everything organized at the top for new visitors.

That would be interesting to see as it’s now using 28,672 / 28,672 bytes.

I have created a PR which should save you about 400 bytes - enough to get the systemButtons() in.

1 Like

This is really awesome. I never really looked much into using the ArduboyEX class.

Not anymore thanks to filmote saving 400 bytes. Turns out by not running the arduboy.systemButtons() routine it was freezing the embedded emulator.

1 Like

That’s an added bonus!

I’m heavily refactoring the code to separate the core engine components from the data. This will make it far easier to make improvements on the core that will propagate to each game. Plus once I get my all in one editor done it’ll be easier for people to make their own games with the engine. They just include the core and drop in the ‘data.h’ file created from the editor.

This won’t effect the final compile size, just a reorganizing of the code.

2 Likes

He says hopefully!

2 Likes

All done refactoring. Ended up creating a copy of ArduboyTones and stripping out everything that wasn’t needed (ability to queue up to 3 tones, volume control, etc). This freed ~600 bytes extra. While this extra space won’t be utilized for this game, it will allow for a lot more content in the sequels.

Since the sequels also don’t require the name entry portion there’s a total of about 1,200 bytes extra for their content (for reference the overworld map is 1,062 bytes).

2 Likes

You’re a wizard Justin!

Hey Justin !
Great Work !
Just finished the part one, was wondering if there is a planned release date for part 2 ?

No pressure ! I am just curious ! I really had a blast whit the game !

Thanks a lot and I hope you and yours are well !

I do have some preliminary work done on the sequel. I’ve got the core concepts underway for the overall theme of the second installment, as well as the enemies/bosses I would like to have and how I want the story to progress.

Here’s a preview of the title screen for the sequel
title
The sequel will take place in a world that’s mostly ocean with multiple small islands connected by a vast underground cave network. The story will continue the hero’s efforts to chase down the darkness that presides in each world.

Overall I’ve got plans for 5 games total with the general theme idea for each world and the rough concept for the final showdown in the last installment. Each game will load your save data from the previous game so you will continue right where the previous game left off.

5 Likes

That’s a big undertaking! Cannot wait to see them unfold though.

1 Like
  • writes to do list item to make sure to get @tuxinator2009 his arduboy extra ASAP…
2 Likes