Wednesday, March 31, 2010

libkey, mod_key & a few shots

I've integrated the keyboard handling functions. I've not tested them on a real Wii yet, but the same code in my Linux box seems to be working fine.

As I wrote earlier today, I wanted to share some screenshots of actual games with you.
The first one comes from a fighting game called "Fostiator" (don't ask) which is a very old fighting game that came as an example for the program that inspired Fenix and then Bennu:



The code is the same one you'll be using in your Wii and should work just like it, with the sole exception of the endianess bug that'd make colours look pretty broken right now.

The following screenshot comes from a game called "EEEEK! EEEEEK! HOOOOOOK!!!" by Gabriel Garrote and won the first BennuGD/GPH game programming contest. I had to patch this one a little bit so that it wouldn't use some functions found in mod_wm, but the rest of the code is untouched.







The main motivation behind testing this code is to be able to play some cool games in my computer. The "other" motivation is to test the scroll functions.... Well, here's the result:



As you can imagine, the scroll is pretty much broken right now. There's a lot of working code there, however! :)

I will let you know when I fix the libscroll code, in the meantime, you might like to play Gabriel Garrote's EEEEK! EEEEEK! HOOOOOOK!!!.
Seriously, it's a great game (that you'll soon be playing in your Wii :).

PS: One more

mod_scroll, OS_WII and a small coming surprise

Just wanted to let you know that I've integrated mod_scroll, so now scrolls should be working.
Instead of writing some test code that would leave most people wondering if I'll ever get to a point where this thing become usable, I've decided to recompile a very old fighting game (directly ported from DIV Games Studio code).
It won't yet work in your Wii for two main reasons:
  • The endianess bug (that's being worked on).
  • It needs mod_key (I should integrate this sooner than later).
mod_key should be very easy to integrate, so I'll soon post some screenshots of how the game will look once the endianess bug is solved.

I've also talked to Splinter (the main BennuGD developer) and we've agreed to use OS_ID values over 1000 for unofficial ports, so now OS_WII=1000 (up until now, OS_WII was 9).

signal working now?

After a few hours of reading and re-reading Bennu code and even reimplementing mod_proc, I think I finally fixed the regression in mod_proc that caused signal not to work.

This was a stupid bug. It was caused by me not knowing well enough how C works. Should I have read and understood how enums work in C, I wouldn't have redefined some internal value that told Bennu to kill a process when told so (I was instead messing with some other internal var).

Well, I just wanted to let you know that I think I fixed it.

Sunday, March 28, 2010

mod_draw, mod_screen, mod_path & a few small fixes

The other day I integrated libdraw. That same afternoon I integrated mod_draw, so that's done and you can now paint those beautiful Bezier curves in your Wii.

Also, yesterday I integrated mod_screen (regions, backgrounds...) & mod_path (path finding module). I added some test code for mod_screen and it seems to be working fine. I will have to write some code for mod_path too, just to be sure.

I also uploaded a wiki page in the google code page to keeo track of the modules that are already implemented and the modules that need to be integrated (or won't get implemented at all, like mod_wm).
You can compare how big both columns are here.

Again, if you want to start porting your games to the Wii, please let me know.

PS: Endianess bug is still there, and even if I fixed some minor bug with mod_grproc, some process will refuse to die.

Tuesday, March 23, 2010

libdraw is in

Just a fast update to let you know that libdraw is in. Libdraw is the low level stuff used inside the mod_draw module for drawing primitives (simple geometric elements such as lines, rectangles, circles...). This one was particularly easy, so you should get primitive drawing today or so.

Also, it looks like signal is not working as well as it should for processes with a GRAPH assigned to them (processes without GRAPHs seem to get killed as they should). I'm also trying to find a solution for the endianess issue in the blitting functions that pretty much ruins all the experience with Bennu in the Wii.

Tuesday, March 9, 2010

Collision, signal fixed!

Ok, I finally fixed the signal and collision bugs. At some point during the integration of mod_proc & mod_grproc, I had broken a few things. What I'm not really sure of is why signal was working before...
Both 09_mod_proc.prg and 20_mod_grproc.prg work now as expected.

Wow! I did a few things in under an hour of coding today! :)

PS: BTW, this thing is starting to look usable (if you don't take colours being broken into the account) so if you want to start porting your games to the Wii and help test the port, please get in touch with me.

mod_regex

I owed this one to you since New Year's day. Test code seems to be working fine.
I'll try to work a bit with mod_grproc to see if I can fix it. Using collision results in core dumps right now.

Happy coding!

PS: Advance seems to be working fine, it's not the whole mod_grproc that's broken :)

Wednesday, March 3, 2010

A few videos of Bennugd-wii in action

Below are a couple of videos I've created with my phone (sorry for the blurriness).
The first one runs this code & shows the cursor moving after applying a graph I loaded from a PNG image. The video has no audio, but there's some music in the background, too.
If you look closely you might be able to see that the colors in the mouse cursor are wrong, that's a result of some endianess issues I must solve.



The second video shows some text being written in the Bennu standard font (although others should work, too) and in red colour. When you press the right mouse button (button B in your wiimote) the text moves to a random position.
This one also plays some music. You can find the code here.



I have removed the console initialization code because it caused artifacts, as SDL is the one that initializes all the graphics stuff now.

So, when I solve the signal&endianess bugs and integrate just one more module (mod_grproc) most of the 2D games created with Bennu should start to be playable!