Castle Paradox Forum Index Castle Paradox

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 Gamelist   Review List   Song List   All Journals   Site Stats   Search Gamelist   IRC Chat Room

Side Scrolling Problems

 
Post new topic   Reply to topic    Castle Paradox Forum Index -> HELP!
View previous topic :: View next topic  
Author Message
Inspiration
Anti-Protagonist




Joined: 30 Oct 2006
Posts: 74
Location: Kool-Aid

PostPosted: Thu Jul 26, 2007 7:32 am    Post subject: Side Scrolling Problems Reply with quote

Um, yeah.

I copied a large chunk of the Moglery's 3-framed walking script and basically
replaced the walk-up part with jump-up, which pretty much goes like:

Code:
#Jump Up!

if(key is pressed (72))
then(
set tag (2, on)

set variable (directional, herodirection(me))
set hero picture (me, 4)

walk hero (me, up, 3)
set hero direction (me, directional)
wait for hero (me)

walk hero (me, down, 3)
set hero direction (me, directional)
wait for hero (me)

set tag (2, off)
wait(1)
set hero picture (me, 1)

end


Now, I wanted to be able to move sideways while I'm in the air, so I added the tags to check for that.
My first idea was to make the sideways-movement script something like:

Code:
script, each step, begin

#JUMPING

while (checktag(2)==on)
do(

if(keyispressed(77))
then(
walk hero (me, right, 1)
wait for hero (me)
set variable (directional, right)
)

if(keyispressed(75))
then(
walkhero(me,left,1)
waitforhero(me)
set variable (directional, left)
)
)
end


I thought that the hero would continue to rise/fall as the each-step script is on, but apparently it doesn't.

Now I'm out of ideas.
I tried to get a few from the wiki's list of side-scrollers, but the only scripts that were included with the games was from Baby Bob and the Sonic Demo (Both of which were too scary for me to attempt to analyze).
Help, please?
_________________
Look back and you've already lost.
Look forward and embrace the trials of tomorrow.
Back to top
View user's profile Send private message Send e-mail
Ysoft_Entertainment
VB Programmer




Joined: 23 Sep 2003
Posts: 810
Location: Wherever There is a good game.

PostPosted: Thu Jul 26, 2007 10:25 am    Post subject: Reply with quote

ok, first of all, you need to put the moving script inside the part where hero jumps up/down.

right now, all your jumping does is
go up 3
wait for hero
go down 3

it needs to be something like this
go up 1
check if right/left key is pressed
if it is, go to that direction
repeat 3 times

do the same for walking down.


Hope this helps somehow.

check this game out. It doesn't use baby bob's script(although it is somewhat based on it) . I would provide the source for the code, but I lost it.
It does however do what I described above.
_________________
Try my OHR exporter/importer.
OHRGFX
Striving to become better pixel artist then Fenrir Lunaris. Unfortunately the laziness gets in the way of my goals.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Bob the Hamster
OHRRPGCE Developer




Joined: 22 Feb 2003
Posts: 2526
Location: Hamster Republic (Southern California Enclave)

PostPosted: Thu Jul 26, 2007 10:53 am    Post subject: Re: Side Scrolling Problems Reply with quote

Inspiration wrote:
Now I'm out of ideas.
I tried to get a few from the wiki's list of side-scrollers, but the only scripts that were included with the games was from Baby Bob and the Sonic Demo (Both of which were too scary for me to attempt to analyze).
Help, please?


Those scripts are scary simply because making a side-scroller *is* complicated. You won't be able to do it right without a complicated script.

You probably don't want to be using "walk hero" at all. Walk hero is strictly tile-based movement and it is (almost) impossible to do pixel-based movement with it.

However, if tile-based movement is okay with you, try Ysoft's suggestion.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Moogle1
Scourge of the Seas
Halloween 2006 Creativity Winner
Halloween 2006 Creativity Winner



Joined: 15 Jul 2004
Posts: 3377
Location: Seattle, WA

PostPosted: Thu Jul 26, 2007 11:11 am    Post subject: Re: Side Scrolling Problems Reply with quote

James Paige wrote:
Walk hero is strictly tile-based movement and it is (almost) impossible to do pixel-based movement with it.


The "almost" only makes it in there because of Metamorphosis and Siv, which I believe are the only two games to seriously attempt that. It's really not worth it.
_________________
Back to top
View user's profile Send private message Visit poster's website AIM Address
Inspiration
Anti-Protagonist




Joined: 30 Oct 2006
Posts: 74
Location: Kool-Aid

PostPosted: Thu Jul 26, 2007 12:46 pm    Post subject: Reply with quote

Mm.
I thought I had a pretty good concept for a side-scroller last night, but I don't think it's worth that much work.
If I ever make a side-scroller, I'd probably follow Ysoft's plan.

Thanks, guys.
_________________
Look back and you've already lost.
Look forward and embrace the trials of tomorrow.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    Castle Paradox Forum Index -> HELP! All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group