I am relatively new to programming. I have had some exposure, but nothing substantial. I really started getting serious about learning to develop games when I got started on the GB Studio to make Game Boy games. I had a vicarious introduction to Arduboy through the Micro Arcade games that I became fascinated by over the last few months. I was also using Piskel for sprites and animation along with PyxelEdit for tile mapping. Will these programs remain useful when developing for the Arduboy?
What other supplemental resources should I look to in addition to the lessons provided here on the message boards? Should I get a subscription to Brilliant, Curiosity Stream, Nebula? Is there a book I should read, a video to watch, or a blog to follow? I have seen similar questions asked around here, but they are not hitting the points that I would like to hit. I am using toolbox for sprite work, but I am not keen on using it for tile work to make the actual levels. No need to mention Game Maker’s Toolkit and Boss Keys. I’ve seen every one of them.
The thing that has prevented me from learning to program sooner is the wide array of directions one could go. The Arduboy is a natural evolution from making a Game Boy game and has given me a more direct path to confidently press forward. Any relevant advice to get me on the right foot would be appreciated.
Piskel might be useful if you use it to generate single images in a commonly used format such as .png or .bmp.
You will need another tool to convert the images though.
There are many different converters available:
(Personally I tend to make my images in Paint or GIMP.)
Tilemaps made in PyxelEdit will not be useful unless somebody has written a converter that I’m unaware of.
Never heard of them.
I can see why you might think that, but I somewhat disagree there.
Despite the similar names and one inspiring the other, they are two very different beasts.
Which resources you should read depends very much on what your intentions are and how interested you actually are in programming and computer science.
E.g whether you just want to make games for Arduboy or whether you hope to move on to desktop programming at some point, and whether you actually enjoy programming and find computer science interesting or whether you only care about making games.
Either way if your only experience of game development has been GB Studio then you’re going to find things quite different to what you’re used to.
(Ask “where are the level editors?” and the response you get most likely won’t be the one you’re hoping for. :P)
Regardless of what approach you take,
you could probably learn a bit here and there from the (now defunct) Arduboy magazine.
You should probably also learn binary and hexadecimal at some point:
They come in handy.
Ultimately the forum and its userbase are by far the best source of information available for Arduboy programming.
(There is an unfortunate lack of tutorials, mainly because writing tutorials is boring and difficult.)
If you’re also interested in doing dekstop programming and learning how to program in general then I’d recommend learning C++ via https://www.learncpp.com/ and adapting what you learn to Arduboy programming with some help from other users.
(The Arduboy is programmed with C++ but doesn’t have an implementation of the C++ standard library for technical reasons.)
That was amazingly detailed. Thanks so much. In regards to the Game Boy versus Arduboy, I know you are correct technically. They do have a lot of similarities though. The button layout, small resolution screen, essentially black & white (sure, the Game Boy has four shades of gray, but sprites technically only have three shades of gray since one of the shades is used for the transparency of the sprite). When I consider the control scheme for the game I’m currently making for Game Boy, very little needs to be changed to adapt it to the Arduboy. Similarly, converting my sprites to black and white from 4-shades of gray was a breeze. Also, many Game Boy games use sprites that are 16x16 as well (like Pokemon). So yeah, you aren’t wrong but I was mostly speaking from the conceptual standpoint of making games for these two systems.
I already have a pretty good start on binary. I am a bit less familiar with hexadecimal, but I won’t be feeling my way through the dark either. Still, this knowledge can be further developed.
My intentions are largely grounded in video game design. I’m not exactly starting from scratch either. I got the notes, sprite art, animations, most of the level design. That is the problem though, it is all on paper. I am very glad you told me about disparity between the standard C++ library versus the one the Arduboy uses. That would not have been something I expected, so I am certain you saved me a lot of headache right there. All of this doesn’t mean I wouldn’t branch off into side projects, but it’s really about the game development for me. All told, I think the Arduboy programming language for C++ is likely a smarter point to jump off from than Assembly.
I am getting the impression that sprite sheets are not used when programming for the Arduboy based on my initial scan of the instructional material. You also provided a lot of info for me to check out. I have no initial comments at this time besides a thanks. I am likely to check out the stuff with the MIT license simply because GB Studio is MIT open source licensed also. Seems like a good place to start.
But yeah, thanks. You exceeded my expectations. Holy wow.
Conceptually, yes, but the devil is in the detail.
The Game Boy’s screen was 160x144 pixels,
whereas the Arduboy has only 128x64 pixels.
If you’re using 16x16 sprites that doesn’t leave you much room.
The lack of an extra colour can be a nuisance at times,
even moreso the lack of a start or select button.
The big advantage the Arduboy does have though is that the hardware is quite easy to understand and all the necessary parts are widely available.
(To replace a part on a Game Boy you’d most likely have to cannibalise another Game Boy.)
I warn you now, it may not all fit in memory, so you may have to sacrifice a few features.
(I know you’ve already looked into the FX and yes, it probably would all fit if using the FX, but the FX is still in development and nobody has written any FX-specific games yet so that’s probably not an option for the time being.)
It’s less of a disparity and more of a nonexistance.
Basically the Arduboy piggy-backs off the Arduino project (the CPU in the Arduboy is the same CPU used in Arduino Leonardo boards), which in turn doesn’t have a C++ standard library implementation, it just uses a version of the C standard library despite the actual language used being C++.
(There’s a bunch of historical reasons why that might be the case but unless you’re particularly interested you’ll probably find them quite boring.)
Theoretically it’s possible to write a game entirely in assembly if you can figure out how to get the compiler to accept pure assembly,
and some libraries use a bit of inline assembly here and there mixed in with otherwise normal C++ code,
but nobody actually writes games in assembly.
It’s not because assembly is particularly hard to learn,
it’s because writing code in assembly is exceptionally tedious.
They are used, but they’re not typically referred to as ‘sprite sheets’.
(I’m not sure why they aren’t, that’s just how things have evolved.)
An image with multiple frames has to be put into a particular format (which only some of the image converters support) and then drawn with the Sprites class, using the last argument to indicate which frame is to be drawn.
(There is a way to do it using the arduboy.drawBitmap function, but that’s typically not used very often.)
(The more technical term for ‘sprite sheet’ is actually ‘texture atlas’. Also some people draw a distinction between regular images/bitmaps drawn in software and ‘sprites’ as drawn by hardware in devices that support hardware sprites, such as the NES/Famicom.)
Don’t feel you have to understand it all in one go.
Learning to program does take time, just like learning an instrument or learning carpentry.
Anything that’s under MIT or BSD 3-clause can more or less be modified and reused as long as you keep the licence notices intact. If in doubt just read the licence notices because they’re easy to understand.
Anything under Apache 2.0 can be modified as long as you keep the licence notices intact, clearly state that you have modified the code and include a copy of the licence.
(There are a few more restrictions but they’re unlikely to be relevant. The licence text is relatively long but quite easy to understand so if you’ve got the time and patience you can understand it.)
The GPL is quite a bit more complicated so I’d suggest avoiding GPL-licenced code unless you’ve got someone on hand to talk you through the restrictions or the time to wade through the licence.
(Even if you’ve got the time it’s quite difficult to make sense of because of how it’s worded and the many different clauses, circumstances and exceptions you need to keep track of.)
Files taken as source files for the build process are .S, .c and .cpp files (including the .cpp file generated from the sketch’s .ino and .pde files during the sketch pre-processing step). Source files of the target are compiled and output with .o extensions to this build directory, as are the main sketch files and any other source files in the sketch and any source files in any libraries which are #include d in the sketch.
Since,.S files are assembly source, I assume you could include properly formatted assembly code files in your sketch and they would be compiled and linked along with everything else. You may need a basic “stub” .ino file written in C++ (or at least it might make things easier), but the majority of your code could be assembly.
Team A.R.G., who originated the Arduboy Sprites classes, called them (at least the source bitmaps) sprite sheets and tiles sheets, and named their sprite sheet converter and tile sheet converter utilities as such.
This is more or less what I expected based on what I know of the situation with ARM assembly and GCC - I simply couldn’t be bothered to check whether or not the same applied to AVR and GCC in an Arduino environment.
If anyone ever actually attempts writing an Arduboy game entirely in assembly - good luck to them, they’ll need it.
Perhaps, but it doesn’t appear to have caught on.
I find that most people here refer to ‘sprite frames’ or ‘image frames’.
E.g. one of Filmote’s tutorials talks about ‘frames’ almost exclusively.
Slightly more empirically: if you search the forum, “sprite sheet” gets 42 hits (some of which are in fact the result of an older comment being quoted/linked to), whereas “sprite frames” gets 125 hits.
It’s one of those things where the terminology is a bit imprecise anyway, but I feel that most of the people who are familiar with the API call them ‘frames’, perhaps because the parameter that corresponds to the frame index is itself called frame. It’s worth pointing out that the documentation itself even calls them ‘frames’ and makes no mention of sprite sheets.
(Whether they’re considered to be ‘sprite sheets’ before they’re converted into an array of raw data and ‘sprite frames’ afterwards is probably a moot point.)
Yes, I used frame because that was the name of the parameter. I think frame sounds better with respect to their intended use. For the source bitmap, sheet makes more sense. I guess you could say you create a sheet of sprite frames and then convert it.
If you’re looking for a utility to make multiple-frame sprites, I’ve been pretty happy with Pixel Studio - it’s available for iOS, Android, and Windows and supports working on very low-res images, including a lot of animation primitives. It can export to a vertical-strip PNG which can then be converted with the TeamARG (archive) tool to multiple-frame bitmaps. Details at https://github.com/hippogamesunity/PixelStudioHub/wiki
You may be surprised how well developed the aftermarket is for Game Boy. You can buy new parts such as screens, speakers, polarization film, shells, lenses, etc. If you are obsessed with historical preservation, you will need to take parts from another Game Boy. I don’t care about historical preservation of the Game Boy since there are more than a million handheld systems by that name out there. My feelings would be way different for the Virtual Boy, however. Check out eBay and Handheld Legends. I actually do a lot of hardware repair work for legacy systems, especially on the Game Boy. I can even backup save data, put in a new battery, and restore that save data.
You can even put a game ROM you created onto a game cartridge (not a flash cart) for the Game Boy and sell it at retail. Check out Catskull if you would like more information. Google Catskull Games. Their chiptune music is also great for the most part. These carts are limited to 32kb and do not have memory bank switching (last I checked). The game I was planning was already working in the constraints of the medium. Arduboy has a similar limitation. Since I won’t be including a soundtrack (just sound effects) on the Arduboy release and the images are 1-bit, I expect the Arduboy version to take up less space.
All of this is hypothetical as I feel my way through the learning process. My notes do include which sections of the game to cut in the event I run out of space. I am still glad to accept any advice you offer. I would rather hear something twice than not hear it at all.
I don’t want to lend the impression that I am arguing over the differences and likeness of the Game Boy versus the Arduboy. Certainly not. The game I was already working on is a survival horror autobiographical RPG. Considering it is more of a puzzle box game with an overworld, the screen crunch isn’t a major issue in this context. You are right though. I also want to make a Yoshi’s Cookie clone, since Nintendo has seemingly abandoned this series. I was feeling the screen crunch trying to represent cookie pieces (or nuts in my version) in my draft work. Working with an 8x8 tile set is just enough space to pull it off. I am under the impression that sprites on the Arduboy should be in multiples of 8.
I appreciate the further clarification on C++. I would have taken on the fools errand of reading a book on C++ and learning the hard way that the libraries don’t matter on the Arduboy. I can already tell you saved me a lot of effort. The information learned wouldn’t be wasted, but I would rather streamline my learning experience instead of fumbling through it.
I might just be the right type of anal retentive to write tutorials on coding as I complete my own journey. I also think I would be the right kind of OCD for Assembly. Although, I don’t think it’s wise to take a bite that big when I am still learning. You may be surprised to know that a majority of Game Boy games were programmed in Assembly. Only the larger publishers had game engine tools.
Your information is almost a tutorial in of itself. I will be printing this page to PDF when I wake tomorrow morning to put on my reMarkable eInk digital canvas. That is where I put all of my manuals and learning documents. Your help is quality and belongs there. I am also glad you provided more information on the licensing stuff. I do read the documentation of the licenses, but that doesn’t mean I comprehend or absorb it all. You gave me an idea what to look out for on my read throughs. I have another question, but I will make a separate reply for it.
I some how missed your message. I am very anti-social media so I am a total noob when dealing with message boards. I just got a Facebook a few months ago finally. I am particularly glad to hear it is on Android. I hope I can find the APK since I have an imported Android phone without Google services. I spend way too much time on the bus and at work. Being able to work mobile is a big deal. This info you provided was exceptionally useful.
Thank you for this information. Some of this went over my head, but I was able to follow along enough to not be completely lost. I have a feeling that I will be referring back to this post at a later date.
My other question: Portability. I am at work 10 hours a day. No substantial break to do anything. There is an hour and a half bus ride in each direction. I am not home 13 hours out of the day. The actual coding, can that be done in any text editor. Is there a BlackBerry 10 OS app or Android app (that doesn’t use Google services and can be obtained through an APK) that will allow me to develop and code video games for the Arduboy on my 3 hour long bus rides each day? Part of the reason I have to ask so many questions is that there is only so much time in a day that I can dedicate to my own pursuits. I have to operate with a mobile office. I do have a Surface 3, but it is still not practical on the bus or on break. This is what has made Toolbox for the Arduboy so invaluable to me. Someone on this thread mentioned sprite tools on Android. What options do I have to code-on-the-go?
I made another comment to Pharap that is related to this question: What can I use to code-on-the-go? Is there an Android app or BlackBerry 10 OS app that I should consider to code games for the Arduboy? BlackBerry 10 OS can run Android 4.3 (KitKat, I think) apps. It’s not limited to just what is on BlackBerry World.
With all said, I do heed your warnings. All I can do is jump in and get my feet wet and see how much space my ideas actually use. I think I have been efficient with reusing tiles to create the environments without being dull. I had to create choke points in the map because the screen transitions trigger can only take up so many spaces per “screen”. All I am saying is that I have done my best to prepare with my understanding of the limitations. That is supposed to be part of the challenge. All said, my Game Boy game is 65% complete and still under 32kb. I hope that means good things. I just gotta go for it to find out. I just don’t want you to think I am being dismissive.
I have also been thinking about the lack of a START and SELECT button versus the Game Boy since I first heard of this device. Since the directional buttons are independent of each over whereas the Game Boy directional pad has a pivot, you should be able to press two opposite directions. I was wondering how pressing left and right at the same time would work for START while pressing up and down at the same time would work for SELECT.
The height of a sprite, as described in the array that you provide, has to be a multiple of 8 pixels. The width can be anything you like. However, because you can mask off (make transparent) any part of a sprite that you wish, they can be any size you want for displaying them. The unused transparent pixels below the part of the image you display will be wasted space in program memory, though.
Yes, you can use any text editor to create and edit your source files. If you put these files in the proper location in your Arduino “sketchbook” directory, they can be opened, compiled and uploaded just like any other sketch.
You can even set the Arduino IDE to use an external editor instead of the built in one.
There’s an app named ArduinoDroid that might be able to do this. Your device may require a fair amount of space to hold it, though. I haven’t tried it myself.
I just discovered ArduinoDroid in the last hour. I got the libraries installed and the correct board selected. I think what I will do in the coming weeks is get a BlackBerry Priv or KeyOne/Key2 for coding on the bus and such. I will likely sell my current phone to offset the costs.
It depends on the purpose of the graphic. For sprites where you want to have a mask generated, I use transparency. While editing, I often set the transparent color to something other than black/white, as Pixel Studio uses a black/white grid for the transparent area, but be sure to turn it back before saving the PNG to avoid having that background color written. You can see some of my sprite files as the PSP files in https://github.com/unwiredben/arduboy-beamemup/tree/master/assets