Arduventure (RPG)

I managed to get the big map to render and it works really well :smiley: In case it wasn’t clear, the world will be one continues scrolling world (not separate scenes like in the demo) which I think is quite cool :slight_smile:

It takes about 32sec to walk from one edge to the other (horizonal or vertical).

Still working on the tileset now but I hope I can show of the result soon!


Continuous scroll is nice!! Maybe down the road you can make a menu + scroll demo for people to get started on their own games?

1 Like

I’m really looking forward to this game! I loved the look and feel of the demo!


@crait: Thanks :slight_smile:

Yeah that’s a good idea. It was quite a while ago I programmed in C++ when I started working on Arduventure so I just wrote all code in the .ino file. I took a look as some other projects and I now know how to properly split up code into other h and cpp files :slight_smile: That will sure make it easier to reuse the code in other projects!

@20thPaul: Thanks a lot :smiley: With a bit of luck I’ll be able to show off something new today or tomorrow/the weekend :wink:


Checking out @akkera102’s source might lead to some good examples. The entry point used in their programs are really clean. There are some great patterns presented in all of @akkera102’s source :smiley: .


Are you aware that you can have multiple .ino files in a sketch? All .ino files are concatenated together to form the “main sketch file” before compiling.

Using extra .ino files, instead of .cpp or .c files, to separate your code into functional blocks means you don’t have to add #includes to your primary .ino file to include them. You also get the benefit of the automatic function prototyping “magic” that the compile process does, so you may be able to eliminate some .h files as well, if their purpose is to provide prototypes.

For some details on the Arduino IDE build process see:

Following the Arduino style guide can also be beneficial to others who may examine your code.


This is a great high quality post, @ekem get this man some kind of badge for this!

@DSSiege11 I am constantly impressed! Keep us informed if you need anything at all! :slight_smile:


There are a couple badges out there for well put together answers, The badge @crait earned for this post was… : )

Good to know you can have multiple .ino files, I’ll look into that :wink:

I just made a little video to show the large world in action (walking from the top-left to the down-right corner).
Note: It’s a test, there will definitely be more than just trees in the final world :wink:

Special thanks to @JO3RI for helping me out :wink:


This is great!!! Keep up the great work!

1 Like

Graag gedaan hoor :slight_smile: voila nu weet meteen ook iedereen dat we elkaar verstaan :smiley:


@DSSiege11, Something you may wish to consider (or maybe not):

When a pixel on the display is on, it draws power. When a pixel is off, it doesn’t. (Each pixel is a tiny LED). So, a game such as Arduventure, which has a white background with relatively few black objects, will draw more power than the same game would with a black background and white objects.

How much more power? It’s hard to say for sure (without measuring it) but we can do a very rough calculation.

First we have to account for all the things that draw current other than the display pixels. With the Arduboy running on its battery, this would mostly be the processor, the speaker, and the control logic in the display (unless you use the RGB LED but we’ll assume not).

It’s hard to determine what the processor will draw. It depends on its clock speed, operating voltage, what internal peripherals are enabled and in use, whether it’s being put to sleep when idle, and a few other factors. Based on the specifications and charts in the data sheet, I’d guess it to be about 15mA or less. It’s probably quite a bit less but we’ll use 15mA as a worst case.

Unless your game plays continuous music and sound effects the speaker will likely draw less than a milliamp on average. I think we can lump it in with the 15mA value for the processor.

The current drawn by the display control logic is less than 0.3mA so it doesn’t really need to be considered. We’ll assume 15mA for everything other than the display pixels.

Now, according to the datasheet, the values given for the display are (typical) 8.8mA with 30% of the display lit, 14.0mA for 50%, and 24.9mA for 100%. I don’t know the percentage of pixels that your game has lit, on average, but lets say that it will draw 20mA as is and it would be 10mA if you reversed it.

Given an average 15mA for the rest of the circuitry, then with black objects on white the total current would be 15mA + 20mA = 35mA. For white objects on black it would be 15mA + 10mA = 25mA.

The battery is rated 180mAh (milliamp hours). Using this we can estimate run time from a fully charged battery:

Black objects on white:
180mAh / 35mA = 5.14 hours

White objects on black:
180mAh / 25mA = 7.20 hours, which is about 40% longer

Note that this is a very rough estimate. If the processor averages less than 15mA and/or the black on white vs. white on black current difference is higher, then the amount of extra run time on the battery will be even greater.

Bottom line: The less the average number of pixels turned on, the longer the battery life.
Take that as you will. :confused:


What a damn interesting post man. I’ll keep that in mind.

Interesting post indeed though it won’t make me change any of the graphics to make it use less white, there are already enough hardware limitation affecting the game that I’m not going to give in to any others.


You can reverse the display for your entire game by adding one line after arduboy.begin();


I could add it as an option for those who don’t mind but to me inverting the graphics totally ruins the visuals!


It’s absolutely your choice and I’m not going to try to persuade you otherwise. You should present your game in whatever way pleases you the most.

I only meant to point out the fact that only lit pixels draw power, to make you aware of it and perhaps take it into consideration. I’m sure the battery life will be acceptable to most people even at its shortest possible time.

@MLXXXp: I’ll sure keep it in mind for future games :wink:

@Yulna: I’m sure it’ll be really easy to make a hard mode afterwards. Just changing a few values in the code would do the trick. It would also be fun if you could only heal by sleeping in your bed and when you die your save file is gone! :stuck_out_tongue:


It is a lovely game and all, but can you make a full version or expand the world.Its kinda small. Other than that I really like the game.

1 Like

¿Are you not reading this forum? That’s exactly what they are doing