eshu Posted September 3, 2010 Share Posted September 3, 2010 (edited) Hey Trebor: As always, thanks for your input. I don't know how feasible it will be to have two different sets of motion for the different controllers, but the other stuff were things I was already going to tackle. Working on the clown motion was what I meant by: -Tweak difficulty, in the respect of how fast the clown moves on the screen, and where the clown hits the trampoline. The original Circus Atari read the Y-values in from a table (i.e. it didn't calculate the clown's Y coordinate on the fly). Therefore, it had 5 unique bounces - that's all. One where the clown didn't hit any balloons, and four with varying degrees of speed. To get the game going, I copied those tables into this game. All Y coordinates started at line 161 ($A1) and worked upward from there. The Y-table where the clown didn't hit any balloons ended at line 36 ($24) which was too high for this version. I shortened it to 66 ($42). The others were left alone, but I knew they were all too fast. Now, to modify this, I am using the function Y = SIN((3.14159265 / 2) * X) to get values between 0 and 1. This was as close as I could get to Atari's curve. I only plan on using more points to 'slow the clown down', so to speak. The only problem is, I have a feeling this curve will be to 'relaxed' and make the clown look like he's 'floating'. If you or anyone has a better function to use that can get closer to Atari's original, I'm all ears. Thanks again Bob I expect they used gravity - I remember getting really excited the first time I got proper jumps into a platform game.... it will need playing with the constants, but something like: y=K*x-g*(X^2) in metres per second squared (m/s^2) g is ~9.81 if you scale that appropriately for your game (say assume the clown is 1.5 metres tall and convert that to pixels), and play with K you should get a nice formula. edit: spelling edit again: sorry been a long time since I did this - but basically you are working with a value for acceleration (due to gravity), but you might well want to also have a maximum velocity (due to wind resistance!?) basically you start of with an initial velocity caused by the jump/bounce, say v=+5 m/s each frame you add the acceleration to that: g=-9.81 m/s^2, say your frames are every 60th of a second (NTSC): v=v-9.81/60 every frame but you may want to cap v at a certain negative value (I think you'll probably be alright, because the clown never falls below his starting point, so shouldn't get too fast) and then each frame you add the velocity to the y co-ordinate: y=y+v/60 (again divide by 60 because I've been working in per second) I'm probably making this more complicated than it needs to be, and if you just want to generate tables, I think you can use the original formula I said: y=K*x - g*(x^2) and just play with the constants 'til it looks right. Edited September 3, 2010 by eshu Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.