Programming, Game Development and Wii Homebrew Blog
For the past couple months I was working 2 things for NewoShooter 1 - flight paths for enemy ships and 2 - AABB collision detection. I will talk about the collision detection in this post. I think I may have finally got it down and working well enough to call it DONE! - thank goodness. Titmouse and Wilco2009 helped me with the rotation code for the boxes (took over 2 months, lol, maybe i was asking the wrong questions).
I had collision detection in place from 2011, but it was very redamentary and I could not rotate the objects because the collision boxes where fixed in place. Now with the new code I can have all objects spinning in the game and still be able to determine where the corners are when they are spinning or rolling on any axis. This will allow the player to still be able to shoot them.
As you can see in the pictures the little green boxes represent a single collision check. Each object has a big box around it (not shown) that is used as the first check before I check the little green boxes. Since the little boxes are expensive I make sure I don't check them unless something passes through the big surrounding box (not shown). So its kinda like a AABB within AABB. Its not very advanced but it works well for what I am doing (I am lazy and suck at math). If you look at the bottom of the screen shot you will see 2 values; Faces which is the number of triangles in the model and Colls which are the number of collision boxes which are being checked. I loop through each face in the model (.obj) and I put a collision box in the center of each face (all the faces are triangles). You will also notice that I don't have the same amount of Colls as Faces. I optimize the amount of collisions I have to check in several ways; I check for overlaps between collision boxes. If they over lap more than 2 other boxes I remove that collision box. I also cache the collision boxes so I don't have to calculate where they are every time I check them. You will also notice on some shapes such as the one above the Colls==Faces. That because the Faces are so evenly spaced that not allot of over lapping occures and this often leaves gaps. I plan to over come this by instructing the model designer guy Julian (hopefully he reads his email ) to not have too many big triangles. This will increase my triangle count but reduce the amount of holes in the model - Fair trade in my book. Scaling is handled by moving the collision boxes and increasing thier size by the same factor of the size of the object. So all the Coll boxes are exactly 0.7 times the size of the shape. It also helps that all the models are 2 units large, centered around 0 with -1 being the lowest and 1 being the highest point. It allows everything to be a nice predictable size when scaling and collision checking. A planet model that is scale 2 is twice the size of a planet that is scale 1 and so forth. If a model is rotating then I move all the collision boxes around the center of the model before I do any Coll Checks. The main AABB box is never rotated because all models fit insize the box (by design). There are still ways to optimize this for example sub-dividing the coll boxes within the shape so that only the ones that have of a good chance of hitting are checked. But I don't really need the extra clocks right now and I don't want to over optimize when I have other stuff to work on. I think I have said everything and there are more than enough screenshoots, so if you have any questions post them in the comments.
The Nintendomax Wii Dev Competition 2012 has officially begun!
It was difficult, but Nintendomax is proud to announce the “Nintendomax Wii Dev Competition 2012″, the fourth edition of this homebrew coding competition on Nintendo Wii.
The purpose of this competition is to create a COMPLETELY NEW homebrew game for the wii, applications are not accepted.
This year we have new sponsors who went all in/dug deep and provided 1 x Nintendo 3DS, 5 x SuperCard DSONEi, 1 x Rapid FireJoystick , a 100€ gift card, 16 figurines, the Super Mario 3D Land game, some Nintendo 3DS accessories, some Nintendo Wii accessories, etc. … to be won thanks to our partners www.chipweld.fr, www.modsupplier.com, www.chipnmodz.fr, www.gamespirit.fr and www.rapid-fire.fr.
The contest duration is 3 months, you have until May 31, 2012, 23:59 to present your project(s). Check all the rules => here.
So we get as many entries as we can we ask everybody that has an interest in homebrew coding to tell people and otherwise spread the word of the competition.
Happy coding everyone
.
I have not decided on a concept for a game as yet. Maybe it will come to me in a dream. I still have the racing game concept in my head and I am still having trouble rotating points around a point. Hopefully I get the issues resolve so I can release a new version of NewoShooter with enough time to dedicate to a new game for the compo!
I have been working on 3 different wii game engines lately. Just testing out some stuff that I will need to use in the future plus additional things that I have always wanted to try building. Wilco2009 has been helping me with the magical matrix vector calculations that I will need if I ever want to do serious 3d games. I will definately be hacking them into the next version of NewoShooter (which will be out mid-Feb 2012 - if all things work out well). Wilco2009 also has some helpful tutorials over at scenebeta ( They are in spanish but you read them language translator)
How yall doing? Its a now year. I am still working on php stuff (CMS) but I feel to get back into wiibrewing. Both updating NewoShooter and probably trying to code another time of game. The christmas has been up and down, but overall it was good, it could have been worst on some fronts but whatever, give thanks.
I have thought up some new ideas for a game I tried (but gave up on) to do last year. Hopefully a new approach will make it come together this time. This year I have a few big new features to work on such as enemies and flight patterns for NewoShooter, a new type of game probably a racer which would need some sort of basic artificial intelligience - I probably should start something for one of the upcoming game programming competitions.
WiiU might come out this year as well, that should be interesting. In the mean time I'm still playing through some PS2 classics; doing the Super Liceinse Test in Grand Turismo 4 and 65 hours into Persona 3, finished ICO and ShadowOTC in december, started God of War 1 and Devil May Cry 3 but it got boring and tedious, have GOW2 and a couple other games waiting to be played. I saw Digital Devil Saga 2 in a store thinking of getting that too since it was the cheapest of the bunch.
Eitherway happy new year folks!
more info in this thread; http://forum.wiibrew.org/read.php?26,67360 or http://forum.wiibrew.org/read.php?17,68046