J
Johnathan
Guest
This is a topic I can not find a single clue on. It's a top down shooter based on moon like planet
Let me start off by describing exactly what I'm looking for.
Lets say you start at the north pole i'd like to be able to move all around the planet.
Enemies chasing player even as "wrapping"
dimensions are:
Room size:
1536
2688
View in room
x 0
y 0
w 768
h 1024
port on screen
x 0
y 0
w 768
h 1024
following object player (centered)
I am using:
if (x > (room_width-(view_wview[0] / 2))+1){
x = (view_wview[0] / 2)+1;
view_xview[0] = 0;
}
if (x < (view_wview[0] / 2)){
x = (room_width-(view_wview[0] / 2));
view_xview[0] = (room_width-view_wview[0]);
}
method of looping horizontal just as a test.
I have come to a couple problems:
1 its just teleport me to the other side of the room
This makes enemies that are chasing me stop chasing me and start coming at me from the other way and vanish from view.
also, anything that is in sight just disappear from my view completely until I reach that side again..
Perhaps I am looking more to move the environment as a way to make this more possible. But I am unsure on how to do this. because so far when I tried all I was able to do was make it look like I was moving but the speed of the enemies were exactly the same as when I wasn't moving at all. so If I am running away from them shouldn't they be slower than running towards them? anyway I would Highly appreciate any help on this! this is the last big thing I have left to do!
Let me start off by describing exactly what I'm looking for.
Lets say you start at the north pole i'd like to be able to move all around the planet.
Enemies chasing player even as "wrapping"
dimensions are:
Room size:
1536
2688
View in room
x 0
y 0
w 768
h 1024
port on screen
x 0
y 0
w 768
h 1024
following object player (centered)
I am using:
if (x > (room_width-(view_wview[0] / 2))+1){
x = (view_wview[0] / 2)+1;
view_xview[0] = 0;
}
if (x < (view_wview[0] / 2)){
x = (room_width-(view_wview[0] / 2));
view_xview[0] = (room_width-view_wview[0]);
}
method of looping horizontal just as a test.
I have come to a couple problems:
1 its just teleport me to the other side of the room
This makes enemies that are chasing me stop chasing me and start coming at me from the other way and vanish from view.
also, anything that is in sight just disappear from my view completely until I reach that side again..
Perhaps I am looking more to move the environment as a way to make this more possible. But I am unsure on how to do this. because so far when I tried all I was able to do was make it look like I was moving but the speed of the enemies were exactly the same as when I wasn't moving at all. so If I am running away from them shouldn't they be slower than running towards them? anyway I would Highly appreciate any help on this! this is the last big thing I have left to do!