Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

BennuGD Wii: Difference between revisions

From GameBrew
m (HydeWing moved page Bennugd Wii to BennuGD Wii)
No edit summary
Line 1: Line 1:
{{#seo:
|title=Wii Homebrew Games (Game engine) - GameBrew
|title_mode=append
|image=bennugdwii.jpg
|image_alt=BennuGD Wii
}}
{{Infobox Wii Homebrews
{{Infobox Wii Homebrews
|title=BennuGD Wii
|title=BennuGD Wii
|image=bennugdwii.jpg
|image=bennugdwii.jpg
|description=Streets of Rage Remake on Wii.
|description=BennuGD port for the Wii.
|author=josebita
|author=josebita
|lastupdated=2012/06/08
|lastupdated=2012/06/08
Line 17: Line 11:
|website=http://bennugd-wii.blogspot.com/
|website=http://bennugd-wii.blogspot.com/
|source=https://code.google.com/archive/p/bennugd-monolithic/wikis/WiiGettingStarted.wiki
|source=https://code.google.com/archive/p/bennugd-monolithic/wikis/WiiGettingStarted.wiki
|discussion=https://www.bennugd.org/
}}
}}
'''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.
[https://www.bennugd.org/ 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.


BennuGD supports various features such as tile-based maps, sprite animations, particle effects, and a built-in scripting language. It also allows developers to create games using a wide range of programming languages such as C++, Python, Lua, and Squirrel.
==User guide==
This section includes basic details on how to get your BennuGD games up and running in your Wii (from [https://code.google.com/archive/p/bennugd-monolithic/wikis/WiiGettingStarted.wiki BennuGD Wii-GettingStarted]).


==Things you'll need==
What you need:
* A Wii.
* A Wii.
* The homebrew Channel installed in your Wii.
* [[Homebrew Channel Wii|The Homebrew Channel]] installed in your Wii.
* Wiiload (You'll want a version that can accept extra arguments).
* [[Wiiload]] (You'll want a version that can accept extra arguments).
* A working BennuGD game.
* A working BennuGD game.


==Things you'll want to know==
When developing games for the Wii using BennuGD, there are a few important things to keep in mind:
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 [http://wiibrew.org/wiki/SDL#SDL_button_mapping 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 [https://wiki.bennugd.org/index.php?title=Joy_getbutton joy_getbutton].
*The Wiimote pad is mapped as a hat. You can get the direction the user has selected with [http://wiki.bennugd.org/index.php?title=Joy_gethat 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.


*The Wii only has 88MB of RAM, so be mindful of resource usage and unload resources when they are no longer needed.
Once you've made sure that your game is working with the official BennuGD version and doesn't use any of the [https://code.google.com/archive/p/bennugd-wii/wikis/Status.wiki modules] not yet integrated, you can start working on the Wii version for your game.
*The Wii supports various 480p resolutions, but setting the resolution to 640x480 is recommended.
*Sound may not work as expected due to limitations in SDL_Mixer. Recoding music at 48KHz can help.
*Games must be compiled directly on the Wii and cannot use a dcb generated by the official Bennu version.
*Bennu will report 8 connected joysticks even if fewer are available.
*The Wiimote can be used as a mouse and joystick at the same time, but button presses will not be mapped as mouse clicks if the Wiimote is not pointing at the screen.
*The Wiimote pad is mapped as a hat and can only be used for one hat per Wiimote.
*A recent version of the Homebrew Channel is needed, and games will look better at a Wii screen configuration of 50Hz.


To compile, copy your game folder (with sources) to a folder named "APPS" at the root of your SD Card. Insert the SD card into the Wii and run the bgdc.elf file with the full path to your game's main source code file as an argument.
If you've taken the points above into consideration, things will work more or less flawlessly.


To run the game, use wiiload or copy the bgdi.elf file to the game folder and rename it to "boot.elf" and the dcb file to "boot".
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 [http://wiibrew.org/wiki/Wiiload 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: <code>wiiload bgdc.elf /APPS/mygame/main.prg</code>
* If everything is OK, Bennu will create a file named /APPS/mygame/main.dcb.


The game can then be run directly from the Homebrew Channel menu. For more information on customizing the appearance of your app in the Homebrew Channel, click [https://www.gamebrew.org/wiki/Homebrew_Channel_Wii here].
To run your game. You can:
* Run it from your computer using wiiload by executing: <code>wiiload bgdi.elf /APPS/mygame/main.dcb</code>
* 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).  


==Media==
==Known issues==
'''Bomberdog - BennuGD - ([https://www.youtube.com/watch?v=ASuG5UThVac @jekyll13])'''<br>
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: <code>chdir("/APPS/MyAPP/")</code>
<youtube>ASuG5UThVac</youtube>
 
This build only includes the official modules.


==External Links==
==External Links==
* Official Site - http://bennugd-wii.blogspot.com/
* 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
* BennuGD's Forums - http://forum.bennugd.org/index.php/topic,1513.0.html
* Google Source - https://code.google.com/archive/p/bennugd-monolithic/wikis/WiiGettingStarted.wiki
 
[[Category:Support the author]]

Revision as of 14:49, 8 March 2023

BennuGD Wii
File:Bennugdwii.jpg
General
Authorjosebita
TypeGame engine
Versionpreview release 1
LicenseMixed
Last Updated2012/06/08
Links
Download
Website
Source

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

Advertising: