BZFlag Embedded Port
Posted: Mon Mar 14, 2016 6:45 am
I'm pleased to officially announce my port of BZFlag's graphics code to OpenGL ES, which allows BZFlag to run on so-called embedded devices. BZFlag's graphics code was originally created to work on desktop computers, and what I've done is modified the graphics code to use subset (almost, with some differences) of those calls that will work on devices like cell phones, tablets, tiny computers, and handheld consoles. I have been working on this for about eight months, and it has been a significant amount of work (currently the "diff" from the main BZFlag project is approximately 32,000 lines long).
The source code is available at a GitHub repository at https://github.com/macsforme/bzflag-embedded
It is worth pointing out that this is a personal project of mine, supported only by myself, and not supported by the larger group of BZFlag developers. This project takes a somewhat different direction than the main project is going in, so it is very unlikely that this code will ever be merged into the main BZFlag code repository. If you feel compelled to point out that this isn't a good direction for the main project, please save your breath... that's not what's going on.
I have the project working on several devices, and support for others may be within reach without much additional effort.
Raspberry Pi
Video (captured over component output, so a little grainy compared to HDMI)
The Raspberry Pi is probably the platform with the best support for this project right now. On my RaspBerry Pi 2 Model B, on an average map I would get somewhere between 30 and 45 FPS at 640x480, and closer to 30 FPS at higher resolutions. When the resolution gets too high, however, the framerate can drop significantly. Otherwise, the embedded client generally runs on the Raspberry Pi just like the standard client does on desktop computers.
iOS
Video
There have been a multitude of threads here discussing whether a BZFlag client for iOS would be feasible. Yes, BZFlag does run on iPhones and iPads. I chose the word "run" carefully, because right now you can navigate the menu and join games, but there is no touch control interface for driving, firing, and other critical functions. It is possible that with an external keyboard or a bluetooth controller you may be able to actually play the game (especially on a larger screen, like a standard iPad, or using AirPlay to stream to a television), but otherwise the client is mostly only good for observing games or some minimal chatting.
Would I like to implement full touchscreen support? Absolutely. Unfortunately, there there is a conflict between BZFlag's LGPL license and the Apple App Store terms, meaning that if I did implement such an interface (which would be a significant amount of work), I would not be able to distribute the finished product through the App Store. The options are to either 1) distribute the source code only, and make people compile it (a real pain), 2) obtain an alternative license to BZFlag's source code from Tim Riker (such as the Mozilla Public License, which is similar in many important aspects), or 3) re-create the game from scratch. I am hoping for option #2, but so far Tim Riker has not informed me whether he will grant such a thing, despite 8 months of waiting for an answer so far. If this is something you would like to see, it might help if you contact him as well and let him know that you support the idea (his email address is shown at the top of BZFlag's console right when you start up the game). Currently, further development on the iOS port is stalled while I wait for an answer.
GCW Zero
Video
The GCW Zero is an open handheld console created several years ago. There was a topic about it on these forums several years ago as well. This is very different from other embedded devices because it has a gamepad-style interface. This device has a special branch in my repository due to special code required specifically for this device. The implementation is almost complete. You can play the game just fine on it; it primarily just needs an on-screen keyboard so you can enter your callsign and password and chat with other players. Support for this device is a work-in-progress, but it's coming along well so far.
Other Devices
I am interested in bringing support to other devices, such as Android phones/tablets, possibly the OUYA, and maybe the Apple TV, but right now I am trying to prioritize the platforms I've already started to support. It may not take a significant amount of work to support additional platforms. If you are interested in helping bring support to other platforms, feel free to have a look at the code or get in contact with me.
The source code is available at a GitHub repository at https://github.com/macsforme/bzflag-embedded
It is worth pointing out that this is a personal project of mine, supported only by myself, and not supported by the larger group of BZFlag developers. This project takes a somewhat different direction than the main project is going in, so it is very unlikely that this code will ever be merged into the main BZFlag code repository. If you feel compelled to point out that this isn't a good direction for the main project, please save your breath... that's not what's going on.
I have the project working on several devices, and support for others may be within reach without much additional effort.
Raspberry Pi
Video (captured over component output, so a little grainy compared to HDMI)
The Raspberry Pi is probably the platform with the best support for this project right now. On my RaspBerry Pi 2 Model B, on an average map I would get somewhere between 30 and 45 FPS at 640x480, and closer to 30 FPS at higher resolutions. When the resolution gets too high, however, the framerate can drop significantly. Otherwise, the embedded client generally runs on the Raspberry Pi just like the standard client does on desktop computers.
iOS
Video
There have been a multitude of threads here discussing whether a BZFlag client for iOS would be feasible. Yes, BZFlag does run on iPhones and iPads. I chose the word "run" carefully, because right now you can navigate the menu and join games, but there is no touch control interface for driving, firing, and other critical functions. It is possible that with an external keyboard or a bluetooth controller you may be able to actually play the game (especially on a larger screen, like a standard iPad, or using AirPlay to stream to a television), but otherwise the client is mostly only good for observing games or some minimal chatting.
Would I like to implement full touchscreen support? Absolutely. Unfortunately, there there is a conflict between BZFlag's LGPL license and the Apple App Store terms, meaning that if I did implement such an interface (which would be a significant amount of work), I would not be able to distribute the finished product through the App Store. The options are to either 1) distribute the source code only, and make people compile it (a real pain), 2) obtain an alternative license to BZFlag's source code from Tim Riker (such as the Mozilla Public License, which is similar in many important aspects), or 3) re-create the game from scratch. I am hoping for option #2, but so far Tim Riker has not informed me whether he will grant such a thing, despite 8 months of waiting for an answer so far. If this is something you would like to see, it might help if you contact him as well and let him know that you support the idea (his email address is shown at the top of BZFlag's console right when you start up the game). Currently, further development on the iOS port is stalled while I wait for an answer.
GCW Zero
Video
The GCW Zero is an open handheld console created several years ago. There was a topic about it on these forums several years ago as well. This is very different from other embedded devices because it has a gamepad-style interface. This device has a special branch in my repository due to special code required specifically for this device. The implementation is almost complete. You can play the game just fine on it; it primarily just needs an on-screen keyboard so you can enter your callsign and password and chat with other players. Support for this device is a work-in-progress, but it's coming along well so far.
Other Devices
I am interested in bringing support to other devices, such as Android phones/tablets, possibly the OUYA, and maybe the Apple TV, but right now I am trying to prioritize the platforms I've already started to support. It may not take a significant amount of work to support additional platforms. If you are interested in helping bring support to other platforms, feel free to have a look at the code or get in contact with me.