Tuesday, 13 July 2010

RE-Invaders

A long time ago I had a really boring weekend, so I asked to myself: Hey, you know Java...Why don't you search how to make games in java?

So after 2 days I was making my first "import": A really big mesh (Just a plane with a lot of tris) It was my first import from 3dsMax to JMonkey Engine...and it was WOW!!! (just for me)



Suddenly I've got it: Make games is easy!!! (Hey you, don't laugh so much)



I can't remember "How", but one PuppysGames' demo came to my hands: Tittan Attacks!, so I played it and Oh man, What a surprise!!! It's a space invaders remake, it's simple but not simpler, I don't know if this game was made in Java or not, whatever, the general concept art is retro with a great sfx and music track, and the main thing: It's a real addictive game!!!



So I decided to make a game like this, but with my own experiences, even I tried to create a new character, you know, a Texas rich kid trying to "invades" Huacho



But, time again invaded to me my work and pay my bills, I wish to meet this rich guy and ask for money and run away lol, whatever, after a few weeks I met Unity and I said to myself: Now or forget that! so I forgot it again , no, I just kidding.

Well, I decided to share with you what I did:



You can play here!!! XD: (REI)nvaders

Thank you for watching
Cya later.

Sunday, 11 July 2010

Unity to the Car!!! lol

The last weekend I was working with the new unity 3d's Car tutorial: Car Tutorial

It was amazing, you know the graphics are so fantastic and the scripts are really powerful.

So I decided to dive more depply in the code, and after a few days I thought I had learned enough... WTH!!! I was wrong :(



But It was a great thing because I decided to make my own car game from the ground (at least in my mind), so I turned on 3ds Max:




Please don't forget a few very important things:

1.- Model your objects with this in your mind: "real scale". Search the average size for your car, e.g. 5 meters to length, etc... The same for the track and so.
2.- Press "number 7" key in your viewport in order to see the count of polys you make. If you open the fbx files inside de car tutorial from unity you'll see that car is around 5320 polys.



3.- Personally, the best technique to make low polys model is: Box Modelling, you can find a lot of tutorials in the web, some links:
Cat Box Modelling (Yeah, CaT not CaR)
After all you work done, you need to transport your objects to a Game Engine (that's the complicate name for Unity, UDK, Ogre3d, Jmonkey, Xna, etc...), so one good protocol is FBX, but that's no perfect at all, be carefull around "isolated" vertices in you mesh in order don't crash 3ds max when you export your object.
4.- If you are not a graphic artist like me, you should try to find good webs around concept art for your objects, for example: While I was making box modelling I was searching in the web and I found this really great web, take your time to view this and write a comment to the author: SmileyBones



5.- Finally you don't forget the Axes, the devil Axes lol, I'm kidding, That's really easy. In 3ds max world the axes upward is Z Axe, in Unity and the most game engines is Y Axe the one upward.
So Before export your object, change the Axes: Select your object, change the Reference Coordinate System to Local and go to Hierarchy Panel>Pivot>Affect Pivot Only, press "E" key to rotate the gizmo and rotate the Y axes to upward (press "A" key to fixing rotate, the Z Axes point to you and X axes point the horizon (X, Y are the same like our normal coordinate system, remember the school, just the z "imaginary goes out the screen point to you"), and that's all.



And yes, after a lot of hours thinking about this, I finally exported my car and my track (I'm not an artist)



But this was just the real begining, now the CODE!!! In my first try nothing worked lol so I turned off the lights and I went for a beer and take a rest.



NEXT DAY (I think so, whatever)
I have been following every step in the same way like the tuto, so WHY Things DOESN'T WORK???
Easy: I haven't been every step, I left the music script to the end ( I though the sounds to the final part, first this "stooopish" car must turn on ), don't make my mistake, at least follow the same sequence in the tutorial, when the things are ok for you, it's time to make a BaseLine (save your file and go for another beer) and start with the cicle method "try - error - think - dammit!"

With a little of good luck you should see your pretty models becomes to life, and your finger moves them (WASD and Space Bar) lol



Well, after a few minutes my game is a really boring game, I'm the lonely one in this party :( and there is not much to say, you need human players or at least a decent AI script in order to get a little fun, at least you must try it.



That's a hard way, but if you want try it, you are not alone. The same for the artist is the same for coders, someone more was here, I found this Car's AI for Unity:
1.- A basic but really useful Waypoint system: Gotow's car tutorial



2.- A more general AI system called UnitySteer: UnitySteer
They are changing everything to have everything ready for Unity 3.0, so you must see this topic in the unity's forum: UnitySteer Post at Unity's Forum



Well, it's time to awake and come back to reality, the weekend has gone, I'll hope to see your comments in my next dream lol.



Link: Play Me!