Friday, February 1, 2008

Re-Rewrite

Yesterday I suddenly got a mistical feeling ... I don't know what it was ... maybe it was a enlightment, ... or a brilliant idea, ... or just the boredom that was hovering between my ears, ... anyway

I started to have a look on the ship controls. While the last big changes I've done where focused on the speen control, this time I wored on the rotation control.

It didn't took me that long to get a working system like you may know it form games like freelancer, so I woun't spend more line in it, yet, but you got no idea how hard it is to make a circle.

Yes a easy white circle in a 20x20 bitmap that you could use as a cursor prototype.
I spend a full hour in Gimp to think about the best ways of how to make a perfect circle.

I thought of just drawing it with my amazing Wacom skill, I tryed the spile system in Gimp, till I finaly just took a great round brush, made a big dot which spaned the whole pic and later just make a nother, smaller, dot in the center of that dot, in the color of the background ...

Ok, its still far form a perfect circle, but you don't notice it while it is hovering around on the screen.

And I added a little enum value telling the game how to handle the new input, just like in freelancer (again) you can press 'space' at any give time and just disable that great 5 line code spring physics (no, I did not use the same thing as they do in the chase camera sample for xna, I used my mecanical engineering skills for a better one :) ), ship rotation and input handle system, so that you can move the cursor around on the screen without any effect (very usefull).

And do you remember when I sayed that I don't want ot talk about the details of this great code, that was because it don't workes yet everywhere.
Once I got the ship thing done, I tryed to applay the same code to the Deview camera, but unfotunatly I found out that the whole camera control code there is very old (around a month) and long forgotton, so it dose not cooperate with this new and shine stuff ...

... So I have to read myself in thos controls and figure out how to change them, or even ... even ... have to rewrite al 200 lines ... *shiver*


Greg the Mad

1 comment:

Zygote said...

200 lines is nothing :) I'd like to see this code of yours. Any chance you could code paste it (rafb.net/paste)?

Thanks,
Ziggy
Ziggyware XNA News and Tutorials