Showing posts with label nintendo. Show all posts
Showing posts with label nintendo. Show all posts

Wednesday, 11 April 2007

My first PC Wiimote and Nunchuk Game

I have done it.

I am so proud.

To be honest anybody looking at it may think that it looks like a load of old pants, but I dont care. There was a fair bit of work involved, but I have completed my first game using a Wiimote and a Nunchuk to control it.

At the moment I havent sorted out the 3D engine license to mass release it so it is playable for people who have a license for the TV3D engine only.

I intend to let anybody have the source code who wants it and who wants to play around with it and make their own additions to it. If you do make any changes then could you please let me know either in this blog or on my website to let me know what other people want from wiimote games.

Anyway the game:
It is basically a punching game. I thought along the lines of the punching games at an arcade where you punch as hard as you can and see the results on the screen.
When you start up the game you will see a smiley face and a couple of boxing gloves and you punch using the Wiimote and the Nunchuk to cause damange to the face.


I want to take this oppurtunity to thank Terry Bailey for supplying the 3D boxing gloves as I am not very good at 3D modelling. I may colour them in at some point if this game starts to prove popular with anybody.
After a determined amount of damage has been caused then you will get a final score on how long it took you to knock Mr Happy out.
You can walk around using the Wiimote direction buttons and you can look around using the Nunchuk Joystick.
Because the Wiimote and Nunchuk are secondary controls then you can also control the game using the PC (using the mouse and cursor keys to move and look around and using the I and P buttons to punch).

It has taught me a lot, especially the intricacies that are involved with understanding the acceleration readings that comes from a controller and translating that information to an in game action.

I may take this game further and add multiple faces that you can hit, and make the images editable so that you can use your own images to punch which might make a nice little stress reliever for some people. I may leave it here and move onto a different game and try out some other types of Wiimote and Nunchuk motions. I havent decided yet.

But if you want to have a play, then please feel free to get the game from my Wiimote Games section of my fun website here:

If you want to leave any comments or ideas then please feel free to leave them on the message section of my website here: Or email me through our Main Software Development Website contacts page here:

Thanks,

L.

Friday, 30 March 2007

Wiimote PC 3d Games controller motion logger

This is an update for where I am with writing PC Games that utilise the Wiimote and Nunchuk.

I firstly got a blank 3D world going in TrueVision3D which I have mentioned on the previous post. Once I had this world with a wiimote and my banana I realised that it is actually a difficult task to study the acceleration outputs of the wiimote and nunchuk and to translate them into motions in a 3D world.
I decided to implement the C# WiimoteLib version 1.0.1.0 from Brian Peek (thanks Brian). There is a test program that comes with his driver that displays all of the outputs of the Wiimote and Nunchuk in a nice little windows application. I have taken that test program and edited it a bit to give me some reuslts that I want to find useful and use for motion translations with my 3D games. The outputs displayed that I am interested in are straight forward float numbers showing the X,Y, and Z axis accelerations of the Wiimote and Nunchuk (-0.5 to +0.5 in strength). I figured that there would be some kind of a pattern to these outputs that would be the same for certain motions. To demonstrate what I have changed in Brians test code consider the following: Lets say you want to play a game like fishing and essentially you want to cast out the rod. Firstly you will raise the wiimote so it will rotate slowly upwards while being raised about 1 foot. Then as it is stationary the only acceleration will be gravity (9.81 metres per second squared in the vertical direction). Then as you whip it acceleration will change to downwards in the vertical and the wiimote will rotate again back to its starting position. This whole motion will show 3 patterns of accelerations, so you can then say when the player is doing a cast because the wiimote outputs will be in a similar pattern to this varying in strength.

I have written a program to try and help me to log all of these motion patterns that I need, and full details of it can be seen here on the Wiimote PC Games section of my fun stuff website.

The next phase should be incorporating these movements to my character in my 3D world and then I can give this character some tasks. Most probably breaking things and smashing stuff up to start with as the punching motion is a fairly straight forward one to get right and measure player strength.


Cheers,

L.

Friday, 16 March 2007

Wiimote and Nunchuk applications on the PC

I have had a couple of days spare between jobs and I thought about some viral marketing for our sister website for fun and useful applications to experiment with. Partly because it is always good for a company, but also because it gives me a chance to write something funky and fun.

Games are always a passion of mine, and I have gained some skills recently with the Truevision 3D games engine, specifically to do with First Person Shooter (FPS) style gameplay. While looking around I became amazed by the breakthrough that has been made with getting the nintendo wii controls to work on a PC. There seems to be a few drivers emerging now and I have had a look at them to see what would aid me the best in a C# set of PC 3D games.

The best used wiimote driver has to be the GlovePIE set up.
I have found problems with this, in that you have to run the GlovePIE program and run a script before you can run your own program. This is too fidly for me. I then saw that somebody had embedded a wiimote driver inside a Half Life 2 mod which looked much better. They havent released their source code yet, so I have had to look elsewhere.
At the moment I am settling on one of two solutions:
1- A C++ driver that I should be able to translate to C# and embed
2- A C# driver.

I think I will go for the C# one because I believe that includes nunchuk support.

I think these drivers will be getting better and more robust. If they could attempt an auto pair setup with the wiimotes then that would be excellent but for now, you have to go through pairing the wiimote yourself before running any code. A quick hint on doing this is hold down the wiimote buttons 1+2, and add bluetooth device, then skip pairing and click finish, the wiimote should now be useable with your PC (I know some bluetooth stacks have had problems with this but I now think that these issues are fixed).

Anyway onto the game. The control is excellent, I have played around with oscillators and seen exactly what the PC reads when the wii is held in all manor of positions and moved.
I am not using the sensor bar for the main reason that I would like it if somebody could just go and buy a wiimote for around £30 and start using it on the PC. The sensor bar is only for steadying the pointer anyway so it isnt needed for the types of games I am thinking of doing.

This does lead me to think that there could be a whole new market opening up here for the PC gaming market. Nintendo have recently announced that they are selling their games development kits for around $2000, which while it is a lot cheaper than development kits for other consoles, it still isn't as cheap as Visual C# Express for the PC (its free). This means there is guaranteed to be a lot more homebrewers ready to develop games on the PC platform but using the wiimote's original input style. It also means there is a much bigger audience for the games.
While trying to find out the legalities with this and what Nintendo may try and do about it, I have come to the conlcusion that if I write a game for the PC, but it also caters for wiimote and nunchuk controlling then that should keep me legal as far as releasing any games to the masses.

I didnt want to get bogged down with the 3D graphics, and game design yet until I was sure that all pieces of the puzzle would work together. So for my first test I have so far put together a little world that you can run around, and in front of you are two objects: A wiimote, and a banana. These items were grabbed from the Google sketchup warehouse, there is no nunchuk there so that is why I chose a banana as it is a similar shape. At the moment the objects mimmick what the user is doing with the wiimote and nunchuk so I am now at a stage where I can introduce objects and physics and rules into the world to come up with some games.
My world screens:



I will keep my findings updated here and on my nintendo wii PC DOTNET section of our sister website. Next I will start to introduce some more objects, and physics and rules.

I dont want to list the ideas as I want to be the first to do them.

Cheers,

altFusion team.