2 registered members (vicknick, 1 invisible),
801
guests, and 6
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: Super secret craziness.
[Re: coma_dose]
#212710
06/23/08 20:21
06/23/08 20:21
|
Joined: Jul 2002
Posts: 4,436 Germany, Luebeck
Xarthor
Expert
|
Expert
Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
|
Maybe some use of vec_to_screen and vec_for_screen is a solution? Basic idea: Compute the player position into a screen position. Set the y values of that screen position to the left and right boundaries of the screen (0, screen_size.x e.g.) Calculate the world pos from each of thoses border positions and use them for clamping the movement or whatever. It looks a bit ugly maybe:
...
var border_left[3];
var border_right[3];
...
vec_set(temp,player.x);
vec_to_screen(temp,camera);
vec_set(border_left,vector(0,temp.y,temp.z));
vec_set(border_right,vector(screen_size.x,temp.y,temp.z));
vec_for_screen(border_left,camera);
vec_for_screen(border_right,camera);
// uses the borders for clamping or whatever
player.y = clamp(player.y,border_left.y,border_right.y);
...
edit: Of course this needs to be computed in a while loop, as the player position may change each frame and thus the borders change.
Last edited by Xarthor; 06/23/08 20:23.
|
|
|
Re: Super secret craziness.
[Re: coma_dose]
#212722
06/23/08 21:42
06/23/08 21:42
|
Joined: May 2008
Posts: 73 Richmond, VA (USA)
coma_dose
OP
Junior Member
|
OP
Junior Member
Joined: May 2008
Posts: 73
Richmond, VA (USA)
|
Yea multiple posts! Went throught a lot of crap to find out that this was the problem: player.y = clamp(player.y,border_left.y,border_right.y); Should be: player.y = clamp(player.y,border_right.y,border_left.y); No more dangerous borders! Thanks a lot!
|
|
|
Re: Super secret craziness.
[Re: cartoon_baboon]
#212818
06/24/08 12:03
06/24/08 12:03
|
Joined: May 2008
Posts: 73 Richmond, VA (USA)
coma_dose
OP
Junior Member
|
OP
Junior Member
Joined: May 2008
Posts: 73
Richmond, VA (USA)
|
I am working hard to prevent the slow down. I need to change that explosion. It is on my computer as well. I thought of keyboard controls last night as well. Hyperdrive is a good idea, I'll put that in. BTW: press b to turn that "artifacting" off lol!
Last edited by coma_dose; 06/24/08 12:05.
|
|
|
Re: Super secret craziness.
[Re: cro_games]
#212879
06/24/08 20:25
06/24/08 20:25
|
Joined: May 2008
Posts: 73 Richmond, VA (USA)
coma_dose
OP
Junior Member
|
OP
Junior Member
Joined: May 2008
Posts: 73
Richmond, VA (USA)
|
I didn't like the game as much as video,but it isn't bad. That is very strange LOL! It strikes me as bland at this state. Any ideas for making it better? I have a huge list of things to implement. I have a couple of new enemies since then, and the hyperdrive idea is implemented as well. I was going to set up an inventory system and mission map, as well as metal earning. Also, the slow down is taken care of. cro_games: you're going to end up as an "artifact" at the bottom of the screen if you don't watch it buddy! LOL
Last edited by coma_dose; 06/24/08 20:29.
|
|
|
|