Click and Move Actor ... A beginning to Strategy games in GE

Talk about making games.

Click and Move Actor ... A beginning to Strategy games in GE

Postby ingsan » Sun Jun 13, 2004 11:47 am

Following this post : http://www.game-editor.com/forum/viewtopic.php?t=299 here is what I've come to : http://paking.prod.free.fr/ingsan/GE_TU ... _Actor.rar

I got to tell you that my ascii contains no negative numbers, so don't ânic whenever you don't see them :wink:
I hope you like it :mrgreen:
Regards,
Mrs Green
User avatar
ingsan
 
Posts: 580
Joined: Mon Nov 17, 2003 4:02 pm
Location: Maurician LADY in FRANCE
Score: 6 Give a positive score

Postby jazz_e_bob » Sun Jun 13, 2004 12:32 pm

Excellent.

I hope you don't mind. I have simplified the code.... :wink:

http://www.maybanana.com/pantzboi/game_editor/Click%20and%20Move%20Actor%20Jazz.ged

Simple is good because I am not too smart. :wink:
Controlling complexity is the essence of computer programming.
User avatar
jazz_e_bob
 
Posts: 742
Joined: Tue Jul 01, 2003 9:38 pm
Location: Bloke from Cockatoo Creek Australia
Score: 14 Give a positive score

Postby ingsan » Sun Jun 13, 2004 12:40 pm

Oh, I really don't mind :P and in fact, it works better than mine (I found some bugs after )but as simple as it seems to be, I don't understand this : xmouse - (view.width/2) and ymouse - (view.height/2)
Could you explain to me this logic ? :oops:
User avatar
ingsan
 
Posts: 580
Joined: Mon Nov 17, 2003 4:02 pm
Location: Maurician LADY in FRANCE
Score: 6 Give a positive score

Postby ingsan » Sun Jun 13, 2004 1:10 pm

Hmm, I think I understood ...

Image

What was strange to me was the - (view.width/2) or - (view.height/2)thing. Please clear me, - (view.width/2) do stand for the New view.width of the filled actor ? If that is right, then I understood EVERYTHING :wink:

Thank you, you are releaving me :D
User avatar
ingsan
 
Posts: 580
Joined: Mon Nov 17, 2003 4:02 pm
Location: Maurician LADY in FRANCE
Score: 6 Give a positive score

Postby jazz_e_bob » Sun Jun 13, 2004 9:55 pm

The "handle" for the filled actor is its top left corner.

When the filled actor is created it is placed in the top left corner of the view.

x = -(view.width/2);
y = -(view.height/2);

When the filled actor is clicked it sends the main actor to:

xmouse - (view.width/2)
ymouse - (view.height/2)

This is because xmouse and ymouse are "screen co-ordinates". They need to be converted to "game" co-ordinates.

Hope this helps. I often find the difference between handles, view co-ordinates and game co-ordinates a bit tricky.... :)
Controlling complexity is the essence of computer programming.
User avatar
jazz_e_bob
 
Posts: 742
Joined: Tue Jul 01, 2003 9:38 pm
Location: Bloke from Cockatoo Creek Australia
Score: 14 Give a positive score

Postby ingsan » Mon Jun 14, 2004 8:31 am

Understood, my friend :wink:
User avatar
ingsan
 
Posts: 580
Joined: Mon Nov 17, 2003 4:02 pm
Location: Maurician LADY in FRANCE
Score: 6 Give a positive score


Return to Game Development

Who is online

Users browsing this forum: No registered users and 1 guest