Coder's Toolbox [Game Jam 4]

Toolbox.hex (60.2 KB)

Coder’s Toolbox

A toolbox of tools for developing ArduboyTones compatible music and Sprites compatible images. The toolbox permits you to save the progress of your creations in EEPROM allowing you to complete your masterpieces over a number of sessions. Once complete, the output can be downloaded using a serial monitor (like that shipped with the Arduino IDE) in a format you can then paste directly into an Arduboy sketh.

Graphics   @vampirics
Code        @filmote

Source       Source Code
Hex            Hex File
Emulator    Project ABE Emulator

Developing Music

Selecting Music from the main menu allows you to edit a new score. A score can be up to 150 notes or rests in length, with each note being up to 8 periods in length.


CodersToolbox_02   CodersToolbox_03

Start by pressing the A button to place a note on the musical staff.

Press and hold the A button while pressing

  • the Right button to extend the duration of a note
  • the Left button to shorten the duration of a note
  • the Up or Down button to raise or lower the pitch of the note

Once you have completed the note, press the Left or Right button to navigate between notes.

CodersToolbox_04  

Press and hold the B button for three seconds to reveal the menu. You can then scroll through the options pages using the Left and Right buttons. Pressing the B button again will exit the menu.

The first menu page has options that allow you to hear your creation from either the beginning (Play from start) or from the current cursor position to the end (Play from cursor). You can save your creation using the Save to EEPROM option. Once a creation has been saved, you will be able to select the two remaining options, Load from EEPROM andClear EEPROM.

CodersToolbox_05  Toolbox_06

The second menu page has options that allow you to change the temp of the tune and the note range. To change either of these, select the desired option using the Up and Down buttons and then pressing the A button to reveal the editor. Toggle the values using the Left and Right buttons. Once complete, press the A button to return to the normal menu.

You can output your tune in an ArduboyTones compatible format by connecting your Arduboy to a computer and monitor the Arduboy via the Serial Monitor. Choose the Export to Serial option to print the tune to the serial monitor.

CodersToolbox_06   CodersToolbox_07

The third and fourth menus detail the key combinations you can use when editing a tune. Important combinations include the B and Left buttons which delete the current note and B and Right which inserts a note at the current cursor position. Pressing and holding the A button on a note will toggle it between an audible note and a rest.


Developing Art

Select Art from the main menu allows you to edit images. The system will allow you to edit up to 8 images, each a maximum of 16 x 16 pixels each.

CodersToolbox_08  CodersToolbox_09

Use the Up / Down / Left / Right buttons to navigate around the image canvas. Press the A button to toggle each cell on or off. Alternatively, press and hold the A and then navigate to draw a continuous line.

CodersToolbox_10  CodersToolbx_12

Press and hold the B button for three seconds to reveal the menu. You can then scroll through the options pages using the Left and Right buttons. Pressing the B button again will exit the menu.

The first menu page has options that allow you to change the width and height of the image. To change either of these, select the desired option using the Up and Down buttons and then pressing the A button to reveal the editor. Toggle the values using the Left and Right buttons. Once complete, press the A button to return to the normal menu.

The Copy an image an image reveals a similar editor that allows you to specify which of the 8 slots to copy the current image to. By default, it will select the next image in the sequence. Pressing the A button will perform the copy whereas pressing the B button will cancel the action.

CodersToolbox_12

The second menu page has options that allow you to save your image creations using the Save to EEPROM option. Once a creation has been saved, you will be able to select the two remaining options, Load from EEPROM andClear EEPROM. All eight images are saved together.

You can output your tune in an Sprites compatible format by connecting your Arduboy to a computer and monitor the Arduboy via the Serial Monitor. Choose the Export to Serial option to print the images to the serial monitor - only those images with at least one pixel set will be exported.

CodersToolbox_11

The third menu page details the key combinations you can use when editing an image. Important combinations include the B and Up / ** Down** buttons that allow you to cycle through the eight images.

16 Likes

Very cool!

So, I had already started making a sprite editor. Does this mean I should give up and work on something else?

Of course not - there is room for two entries. Hopefully we design different features that make them excel in different tasks.

1 Like

I wonder which of you two made the title screen :sweat_smile:

1 Like

One feature that I think would make either of your sprite editors even more unique is to allow for multiple frames on the sprite editor for those who want to make multiple sprites for a single object, character, enemy, etc. in their game. Maybe even add a fps dial for anyone who’s interested in making more complex animations for their game/project so they can see how the sprite will look in action before exporting. I don’t know how practical this idea is, but I figured it wouldn’t hurt to throw it out there anyways. : p

Mmm … what are you saying? :rofl:

1 Like

You will see on the next teaser lol

I think this will need to be for a utility that focus on sprite only. Ours does sprite and music and eeprom is already full with just one 16x16 image and 1 creates tune of 150 notes.

Good point, maybe @pmwasson can implement that into his sprite editor.

Yes, I plan to have multiple frames with a variable frame rate. I’ll post another topic so as to not derail this one, once I have something to show.

2 Likes

We are done! ‘Final’ version now posted in original thread.

2 Likes

Guys! I give up! This is amazing!

Well, joking, I will finish my submission as well, but this is really cool, congratulation for your amazing work.
This already won the speed development time!

Cheers!

2 Likes

Thanks. I had a four day holiday last weekend due to the Melbourne Cup (a horse race) being run on Tuesday and was able to knock this out over that break.

1 Like

Great, I really like the app.

I’ve noticed a bug in my Arduboy (Arduventure Kickstarter version). In the music app, when I press B to show the menu, sometimes the app freezes and the system hangs. Sometimes the blue led lights and other times the screen goes black… Maybe something with the EEPROM values?

Weird. I tested the app a lot on 2 different Arduboy and never got that issue…

BTW, I didn’t upload the hex, I compiled the source code in my (old) Macbook with OS X El Capitan. Maybe the binary is different…

I am using Arduino 1.8.10 … not sure about you. However, this is a really simple sketch which doesn’t do anything abnormal so I find it strange that you are having issues with an earlier version.

I’m also using the latest Arduino IDE in OS X. It’s weird in fact… I’ll try to upload the hex later and I’ll also try to use the Windows Arduino IDE to see if there’s a bug somewhere.

@filmote Just as a heads up,
you might want to move the files around into a separate folder to pre-empt the -master issue.