Page 4 of 10

Re: Sonic Velocity

PostPosted: Mon Feb 20, 2012 10:44 pm
by CrimsonTheDarkBat
Hblade wrote:Amazing! Who did you get to voice!? :)


Omahdon - the voice actor from Nazo Unleashed, the popular flash series. :D

Re: Sonic Velocity

PostPosted: Tue Feb 21, 2012 12:49 am
by phyzix5761
The demo looks great! I think the game could benefit a bit from parallax scrolling. What do you think?

Re: Sonic Velocity

PostPosted: Tue Feb 21, 2012 2:54 am
by Hblade
Agreed about the scrolling

Bat: Cool!! :D This is going to be one AWESOME game.

Re: Sonic Velocity

PostPosted: Tue Feb 21, 2012 4:16 pm
by CrimsonTheDarkBat
Hblade wrote:Agreed about the scrolling

Bat: Cool!! :D This is going to be one AWESOME game.


Thanks dude! :D Heheh, hopefully!

Re: Sonic Velocity

PostPosted: Tue Feb 21, 2012 6:01 pm
by Hblade
I'm really pumped for it :)

Re: Sonic Velocity

PostPosted: Wed Feb 22, 2012 5:01 pm
by CrimsonTheDarkBat
Hblade wrote:I'm really pumped for it :)


Now that I love to hear! =D

Re: Sonic Velocity

PostPosted: Thu Feb 23, 2012 3:13 am
by Hblade
:D:D

Re: Sonic Velocity

PostPosted: Sun Mar 04, 2012 6:55 pm
by CrimsonTheDarkBat
Alright, I'm in a pickle - I'm gonna throw this one out to the community:

Basically, it's the camera. It becomes far too low for normal gameplay to work efficiently when you execute a level:

In image-talk, here is what it should be (captured from the editor) - notice how much of the level is intended to be on-screen within the view:
Image

And this is what I get upon execution:
Image

And eh, never mind the floating tree's - the level is currently in production and overall layout comes before the cosmetics! :P

Anyway, the code that the view is using is:
Code: Select all
x=max(player.x-320,min(x,player.x-310));
y=max(player.y-320,min(y,player.y-310));


I've tried editing the values in this code and if I do that, it makes the background image jerky as hell since it uses a similar code.
Is there something alternate I can use to make the camera centered on the player, and make the background (Static image) follow the screen, without overlapping the HUD (who is parented by the view)?

Thanks!

~Crimson

Re: Sonic Velocity

PostPosted: Sun Mar 04, 2012 6:59 pm
by Hblade
Try this
    x=max((player.x-320),min(x,(player.x-310)));
    y=max((player.y-240),min(y,(player.y-230)));

Half of 640x80 is 320x240. y should be 240 and 230.

Re: Sonic Velocity

PostPosted: Sun Mar 04, 2012 7:22 pm
by CrimsonTheDarkBat
Hblade, you're a lifesaver!

Problem solved, thanks for the help! :D

One other thing I might try and get solved while I'm here though :P Sonic's running motions, acceleration/deceleration, etc. are all working fine, but when the player stops moving, the actor slides to a halt as though it were on ice. See this video for a better understanding:



That said, I know that increasing the value of the variable that states the players increment speed (that is, the value for the speed of acceleration and deceleration) will fix the sliding, but by doing that, the player also ends up accelerating too fast, and that just dosen't work for gameplay. :/

Any ideas?

Re: Sonic Velocity

PostPosted: Sun Mar 04, 2012 7:29 pm
by Hblade
hmm.. thats a tough one o3o try setting it up something like this.. though this wouldn't work in YOUR code, but you can modify it to match it up probably. oh and no prob :D
Code: Select all
//Draw Actor
char*key=GetKeyState();
int SLD\key[KEY_RIGHT]-key[KEY_LEFT]; //key right arrow makes it 1, key left arrow makes it -1, none or both keys pressed makes it 0

switch(SLD)
{
    case 0:
        //xvelocity slowdown script doubled
    break;
}


This is just a rough draft of what would need to be done, but you see what I'm getting at? If no keys are pressed, or both keys are pressed, double the speed of the slowdown velocity. Otherwise, leave it normal.

Re: Sonic Velocity

PostPosted: Sun Mar 04, 2012 7:48 pm
by CrimsonTheDarkBat
Code: Select all
//Draw Actor
char*key=GetKeyState();
int SLD\key[KEY_RIGHT]-key[KEY_LEFT]; //key right arrow makes it 1, key left arrow makes it -1, none or both keys pressed makes it 0

switch(SLD)
{
    case 0:
        //xvelocity slowdown script doubled
    break;
}


Alright, I understand how that code works - but I can't seem to tweak it into my own code without failing quite epicly. :lol:

I've attatched a sample GED of the core engine - perhaps you can make magic happen? :P Also, keep in mind that Sonic has numerous actors for certain states during gameplay - make sure that "player" is the actor you choose when adding any code to Sonic. 8)

Re: Sonic Velocity

PostPosted: Sun Mar 04, 2012 8:04 pm
by Hblade
O-O XD lol I only know the logic, modding the code would probably be the hardest thing in the world o3o sorry DX

Re: Sonic Velocity

PostPosted: Sun Mar 04, 2012 8:06 pm
by CrimsonTheDarkBat
Hblade wrote:O-O XD lol I only know the logic, modding the code would probably be the hardest thing in the world o3o sorry DX


xD No worries, s'kool. :D

Anyway, I'll throw this one out to the rest of you: Read my previous post for information on what I'm trying to achieve.

Re: Sonic Velocity

PostPosted: Mon Mar 05, 2012 12:53 am
by skydereign
What exactly do you want? You seem to have it already setup, you just need to decrease the 0.95 to something lower, at least if you want the slide to be less extreme. Also you seem to be using two script editor invocations per event for quite a few events. I wouldn't recommend doing that, as you can easily combine both scripts. It's a lot more manageable that way. One other thing, you currently are using the same spin animation for both directions. This looks rather weird as sonic is spinning in the opposite direction.