More actions
BennuGD Wii | |
---|---|
General | |
Author | josebita |
Type | Game Engine |
Version | preview release 1 |
License | Mixed |
Last Updated | 2012/06/08 |
Links | |
Download | |
Website | |
Source | |
Support Author | |
BennuGD is a free and open-source game development kit (GDK) designed for creating 2D games. The BennuGD project was first launched in 2006, and it is written in C++. The engine is based on the original Dreamcast GDK, which was developed by SEGA, but it has been modified and improved to be compatible with modern platforms such as Windows, Linux, and MacOS.
This project aims to create a version of BennuGD (and the required dependencies) that implements all the functionality offered by the official modules of BennuGD in one single binary but keeping the number of required source code changes to the BennuGD base as low as possible. The project also aims to implement all the needed features for correct integration with such platforms. It is also a good starting point for ports to other platforms that require static linking.
Please note that although the code in this project works just as expected in most platforms, BennuGD still suffers from unresolved endianess issues in bigendian systems. Most of these can be workarounded, though.
User guide
This section includes basic details on how to get your BennuGD games up and running in your Wii (from BennuGD Wii-GettingStarted).
What you need:
- A Wii.
- The Homebrew Channel installed in your Wii.
- Wiiload (You'll want a version that can accept extra arguments).
- A working BennuGD game.
When developing games for the Wii using BennuGD, there are a few important things to keep in mind:
- The Wii only has 88MB of RAM. that's less than 1/10th of the memory that a recent version of Windows takes to boot. You must be very careful with the resources you use, and be sure to unload resources as soon as you don't need them anymore.
- The Wii supports a variety of 480p resolutions, depending on the system your TV uses and on whether your TV is 4:3 or 16:9. In practice, you can set the resolution at 640x480 and things should be fine.
- Sound is still not working as expected. Your music might play faster or slower than it should. This is a known SDL_Mixer limitation in the Wii. You should recode your music @ 48KHz and music will play fine.
- Right now, you must compile your games directly on the Wii. You cannot use a dcb generated by the official Bennu version and use it on your console.
- Bennu will report 8 connected joysticks no matter how many of them are really available. This is an SDL limitation and should be fixed soon.
- The Wiimote can be used as a mouse (with the coordinates the user is pointing at being mouse.x & mouse.y) and as a joystick at the same time. The joystick button mappings are described here.
- If the user is not pointing with the primary Wiimote at the screen, "A" and "B" button presses will not be mapped to mouse clicks.
- You can still read such events by treating the Wiimote as a joystick and getting button presses with joy_getbutton.
- The Wiimote pad is mapped as a hat. You can get the direction the user has selected with joy_gethat.
- You can only use one hat per Wiimote. This means that if you plug in your Nunchuk to the Wiimote, the Wiimote pad will be disconnected and the Wiimote pad will be mapped, instead. This seems to be a software limitation either in SDL or in wiiuse. (This point must be reviewed).
- You'll need a relatively recent version of the Homebrew Channel. Older versions are known to cause trouble.
- Your games will look better if your Wii screen is configured @ 50Hz.
Once you've made sure that your game is working with the official BennuGD version and doesn't use any of the modules not yet integrated, you can start working on the Wii version for your game.
If you've taken the points above into consideration, things will work more or less flawlessly.
To compile:
- Copy your game folder -with sources- to a folder named "APPS" at the root of your SD Card.
- Insert your SD Card into the Wii.
- Enter the homebrew channel and ensure it's connected to your local network.
- Set the WIILOAD environment variable as explained in the Wiiload wiki page.
- Send bgdc.elf to the Wii console with the arguments being the full path to you game main source code file. If using wiiload from a console, this'd be:
wiiload bgdc.elf /APPS/mygame/main.prg
- If everything is OK, Bennu will create a file named /APPS/mygame/main.dcb.
To run your game. You can:
- Run it from your computer using wiiload by executing:
wiiload bgdi.elf /APPS/mygame/main.dcb
- Copy the file bgdi.elf to your game folder in the SD card and rename it into boot.elf (in the above example, the full path would be /APPS/mygame/boot.elf) and then rename the dcb file to "boot". You should now be able to run the game directly from the Homebrew Channel menu (see known issues).
Known issues
There's something weird going on with directories and as a result of that BennuGD won't automatically set the working directory to the path where your DCB resides. This means that you won't be able to launch your games from the Homebrew Channel just yet (only tested the binaries to work when launched through wiiload). You'll also still need to change the working directory from your BennuGD code to the correct path, with something like: chdir("/APPS/MyAPP/")
This build only includes the official modules.
External Links
- Official website - http://bennugd-wii.blogspot.com/
- Google Code - https://code.google.com/archive/p/bennugd-monolithic/
- Google Code - https://code.google.com/archive/p/bennugd-wii/
- BennuGD's Forums - http://forum.bennugd.org/index.php/topic,1513.0.html