At this point, I find it important to reflect on what I have done, because it is a personal achievement for myself in many ways, but also to the LÖVE developers and the open source community. I'd like to say that without the open source community, none of this would have been possible, even remotely.
Context is due, so I will begin where every writer would begin, at the start.
I'm a big game compo jam participator. Most of the games I have made have been for game jams (Ludum Dare, Bacon Game Jam, and a few other lesser known ones) and I intend on doing more of them. Not only do they provide me with a greater understanding of game design, but they sharpen my game development skills.
In the past, I have been incredibly fond of the game compo community keynotes, for example Benn's famous Ludum Dare 26 Keynote.. Most recently, I came across an interesting by @Sosowski one called, 0 Hour Game Jam. The keynote is spectacular; simple, to the point and cheeky;
"Fuck - Rules - Make - Games" @dogbomb
The goal; make a game from 2AM to 2AM during the DST switch.
Coming from someone who is used to 48, 72 and week long jams, I knew beforehand that this was going to be a challenge. I would need all my dev tools ready, my libraries prepared and my environment ready to make a game. I develop for LÖVE pretty much exclusively, so in all honesty, I was already ready for anything any jam was ready to throw at me.
A bit of shopping at a thrift store changed everything;
<script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>I found a dingoo... need help installing nLove... yes that's 0.7.0 pic.twitter.com/VEZ4ArRtLI
— Seppi (@josefnpat) November 3, 2013
For anyone who can't see, or doesn't care to examine the minute details of the attached image, that is myself with my thrifty purchase; a Dingoo A320 that I found for the amazing price of $9.99.
It was the day of the US #0hgame jam, and I had a gaming device that I wanted to make a game on for the jam. Here are some assumptions I had about game development that suddenly flew out of the window;
- My knowledge of the framework/language (which was all based on LÖVE 0.8.0)
- My desktop game development experience (I have never developed a console game, other than for the TI-83+ back in middle school)
- My development scripts (All my stuff was for LÖVE 0.8.0, and not prepared for a console.)
At this point, I had no idea what I was getting myself into. From what I could tell from wikipedia, I was going to have to hack together something in C++ for the MIPS architecture.
I was researching the Dingoo A320 for hours, when suddenly I noticed a familiar name; SiENcE.
What the hell was one of the big LÖVE game devs doing fully documenting the device? Then it hit me; SiENcE was the big name behind promoting nLÖVE on hackable devices, much like the Dingoo A320. @bartbes had gone through the trouble of writing a MIPS port for the damn device. I had to make this happen now.
<script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>Oh shit, is this dingoo my calling for the #0hgame jam in ~4 hours? @crank_gaming WHERE ARE YOU???
— Seppi (@josefnpat) November 3, 2013
Time was ticking. I was working on a few assumptions at this point;
- The core API for LÖVE 0.8.0 should pretty similiar to LÖVE 0.7.0.
- The device was a flash based vfat device, so I should be able to get a linux work flow down.
- LÖVE 0.7.0 was tagged in the LÖVE repo, so I should be able to build it from source.
- I have experience abstracting user inputs like the Xbox 360 Controller.
The first thing I had to do was figure out how to get nLÖVE working on the Dingoo. Without the framework, all would be lost.
At this point, the community for the Dingoo A320 had deteriorated quite a bit; broken links left and right, servers timing out and pages missing all together. There was still enough intact to pull it together. With the help of @DumpOnIt I was able to bumble through the process of getting nLÖVE on the device;
- Identify the LCD driver, so that the proper binaries could be run.
- Running the dual boot firmware installer, so that one could boot into OpenDingux.
- Downloading and preparing the correct OpenDingux kernel based on the LCD driver.
- Downloading and preparing the
rootfs
binary.
After finding a bunch of guides, and figuring out what the newest way to properly install OpenDingux, I was able to get Linux to run on this miniature MIPS device.
I found the most recent version of nLÖVE in binary form, and got the demo running on the device. I was ecstatic at this point; I got the framework, my framework to run on this MIPS device. The trip was far from over at this point. Now I had to get a work flow down.
I found I was able to mount the device as any standard USB vfat device, and I wrote some scripts to speed things up;
mount_dingoo.sh
#!/bin/sh mount /dev/sdg /mnt/dingoo/ mount /dev/sdh1 /mnt/dingoo_minisd
umount_dingoo.sh
#!/bin/sh umount /mnt/dingoo/ umount /mnt/dingoo_minisd
refresh_dingoo.sh
#!/bin/sh WD=`pwd` ./mount_dingoo.sh TARGET=/mnt/dingoo/GAME/nlove/games/ DEV=/home/seppi/dingoo/nlovedev/src/ rm ${TARGET}dev.love cd ${DEV} zip -r ${TARGET}dev.love * cd $WD ./umount_dingoo.sh
So, with this, I have a hacky work flow. During development, I keep a window with sudo su
running, so I could refresh the device's dev.love
at my whim.
Building LÖVE 0.7.0 was a breeze. Clone from the repo, update to the 0.7.0 tag, ./configure
and make
. BAM; a working 0.7.0 binary. It's nice to see that the build process was the same as the current version of LÖVE. This was probably the most straightforward event in the entire process, but it does say a lot to the LÖVE team for making a good piece of software.
What I had to do next was abstract the user input so that it would work on the device and on my computer, so that I wouldn't have to test every build on the target device. With a little help from the IRC channel, I was able to do so.
Big shout out to @slime73 to helping me figure out whether the device was using nLÖVE. The discerning fact that separates LÖVE from nLÖVE is that nLÖVE uses SDL for graphics instead of OpenGL. Now we can determine at least the difference between the Dingoo and the binary on my computer;
using_nlove = debug.getregistry()["love.graphics.sdl"] ~= nil
With that, I am able to load the functions to check for user input as a module;
dingoo = {} dingoo.DU = function() return love.keyboard.isDown("up") end dingoo.DR = function() return love.keyboard.isDown("right") end dingoo.DD = function() return love.keyboard.isDown("down") end dingoo.DL = function() return love.keyboard.isDown("left") end dingoo.A = function() return love.keyboard.isDown("lctrl") end dingoo.B = function() return love.keyboard.isDown("lalt") end dingoo.X = function() return love.keyboard.isDown(" ") end dingoo.Y = function() return love.keyboard.isDown("lshift") end dingoo.BL = function() return love.keyboard.isDown("tab") end dingoo.BR = function() return love.keyboard.isDown("backspace") end dingoo.start = function() return love.keyboard.isDown("return") end dingoo.select = function() return love.keyboard.isDown("escape") end dingoo.lock = function() return love.keyboard.isDown("pause") end return dingoo
What the fuck is this shit, who said you could push buttons?
At this point, while I was at square one, it was quite an achievement. I had;
- A working framework running on the target device.
- A work flow for rapid testing and development on and off of the target device.
In comparison, aside from a bunch of familiar libraries I could count on running (which would not be many, as this was 0.7.0), this was pretty close to my familiar tmux/vim setup that I usually use to make games. I was about 20 minutes away from the #0hgame jam, and I was ready to jam.
From the point in the afternoon where I discovered the Dingoo to 2AM, where I had to actually make a game, I had prepared an entire development environment for a device I had never even heard of.
The rest of this blog post is much what one would expect from a game dev compo post mortem, but for story completion I will go on.
I was able to entice my girlfriend, who is not a programmer, to join me for this game jam, mostly due to the fact that she wanted to sober up. The theme, "Romantic Alt Tabbing," was announced, and I quickly set to making a game.
The game had to be simple enough to make in an hour, so unfortunately the first idea was the idea we went with. "Your girlfriend is trying to catch you watching porn." Seemed on topic, even if it was merely satiric.
The breakdown ended up mostly like this;
- 5 minutes for concept planning
- 10 minutes for implementation planning.
- 10 minutes of asset creation.
- 20 minutes for implementation.
- 15 minutes for polish and testing on the device.
The result was, "Don't wake the Girlfriend" much in the light of the "Don't wake Daddy" board game.
"You're really good at this game." "It gets faster every time."
While setup for actual deployment of this game on a Dingoo device is ludicrous (Install OpenDingux and then the nLÖVE binary, which for me as a new Dingoo user was hours) it does open my eyes to new ways of using the LÖVE framework. In the end, without the efforts of the open source community which provided Linux, the OpenDingux kernel fork & bundled UI, the LÖVE framework and all the available documentation and developers who were willing to help me, this would not have been possible, unless much more time was provided for me to figure out how to write native binaries for the Dingoo firmware OS (which in this case would not have been possible.)
Thanks for reading, and if you have any questions or comments, please feel free to post them here!
You can download and play the game for free here. It runs on LÖVE 0.7.0 to 0.8.0 and on the 0.7.0 nLÖVE build.
Howdy; my name's Seppi, and I'm an indie game developer. I am an active member of the LÖVE community and you check out the games I've made over here. I've been making games for years now, and I'm always interested in helping prospective indie developers out.
One of the paradoxes I've learned over the years, especially as a software developer, is the more I know, the more I realize I don't know. I quote;
Only a fool would take anything posted here as fact.
Questions, comments or insults? Feel free to leave in the comments section, or contact me; I'm usually on IRC in #[email protected] as josefnpat, and you can email me at [email protected].
Looking good.