Hi, I am trying to make a Planet Generator. I need a good wall jumping script that would
work on planets (circle)
I also need to know how to make a array based raycaster. Anyone have any good scripts?
I am planing to put all of my "Help with Scripts" here, because the mods 'complain' about how much forum topics there are.
Last edited by coolhogs (2012-04-04 16:47:42)
Offline
Is the circle bigger than the screen? As in is the character walking around a circle and the circle is rotating to the guy on top for the illusion that the character is the one moving?
Offline
TorbyFork234 wrote:
Is the circle bigger than the screen? As in is the character walking around a circle and the circle is rotating to the guy on top for the illusion that the character is the one moving?
If you mean scroll, yes it is...
Offline
Well then the guy would be meeting said walls at about 90 degree angles, so you can just program it from the angles at which the person meets the walls.
Offline
I asked if the game is like this:
You are the person. You sit up there, at the top of a circle hopping around. Whenever you press the right key, you do the running animation but you stay at the top. The whole circle is just turning underneath you. A wall approaches, you need to jump on it, then off of it. You're not up to it yet. When you're there, you jump, and since you can only be at the top, you always meet it at the top. Not at the bottom. So you would program it like anyother walljumping thing.
Offline
TorbyFork234 wrote:
I asked if the game is like this:
You are the person. You sit up there, at the top of a circle hopping around. Whenever you press the right key, you do the running animation but you stay at the top. The whole circle is just turning underneath you. A wall approaches, you need to jump on it, then off of it. You're not up to it yet. When you're there, you jump, and since you can only be at the top, you always meet it at the top. Not at the bottom. So you would program it like anyother walljumping thing.
So, how do you do the wall jumping?
I'm not a experienced programmer...
Offline
That, I can not help you with. All I did was try to make it simpler for you. Go on the wiki, I've seen many good base projects that had amazing wall jumping. Maybe check those out.
Offline
Though I personally have never used this method, you could make what people call a "sensor." You take your main costume, duplicate it, color it so that all that's left is the silhouette, and add single-pixel dots of different colors at the four corners. Let's say you're working with a square character. You could color the top left of the sensor costume red, top right blue, bottom left green, bottom right yellow. Then, you have a series of "if" conditions.
Basically, you just test the different possibilities. Important: Put all the if statements under the same loop. You can change the costume to the sensor at the beginning of the loop and then back to the character at the end (you won't be able to see the sensor).
For instance:
while(playing == true) { switch to costume (sensor) if ((color.red isTouching color.black) && (color.green isTouching color.black)) { This is a collision with a left wall. } switch to costume (player) }
Offline
if <<key [up v] pressed?> and <touching [wall sprite v] ?>> set [x velocity v] to ((0) - (x velocity)) set [y velocity v] to (10) endYou can change around the y velocity thing to suit your needs.
Last edited by applejack (2012-04-04 22:52:54)
Offline
applejack wrote:
if <<key [up v] pressed?> and <touching [wall sprite v] ?>> set [x velocity v] to ((0) - (x velocity)) set [y velocity v] to (10) endYou can change around the y velocity thing to suit your needs.
The script wouldn't work. What if he didn't jump but he's touching the wall?
Offline
This is only if you want a wall jump. If you touch the wall but don't jump, nothing happens.
TorbyFork234 wrote:
applejack wrote:
if <<key [up v] pressed?> and <touching [wall sprite v] ?>> set [x velocity v] to ((0) - (x velocity)) set [y velocity v] to (10) endYou can change around the y velocity thing to suit your needs.The script wouldn't work. What if he didn't jump but he's touching the wall?
Offline
If you're trying to make a 3D kind of maze using raycaster, you can download this project and see how it works...
http://scratch.mit.edu/projects/aryabtsev/2422387
P.S. Some people prefer to have multiple "sensors" for faster rendering.
Last edited by aryabtsev (2012-04-05 14:06:12)
Offline
aryabtsev wrote:
If you're trying to make a 3D kind of maze using raycaster, you can raycastdownload this project and see how it works...
http://scratch.mit.edu/projects/aryabtsev/2422387
P.S. Some people prefer to have multiple "sensors" for faster rendering.
No, like WES64's Raycast. Like, you are in a room..
Last edited by coolhogs (2012-04-06 17:26:31)
Offline