Re: A86: Re: Ports


[Prev][Next][Index][Thread]

Re: A86: Re: Ports






>
>Read the file!  That was just the quick summary that I copied, the file has
>all the details!
>
>>> Summary (from file):
>>>      port 0 - Screen Offset, WRITE ONLY
>>Offset? Is this like some kind of second screen? Or is this the screen
>memory
>>area?
>
>This is where video ram is located at.  It is normally at $fc00, but you
can
>set it to something else, like $f600.  This is how grayscale normally
works.
>You have two screens, say at $f600 and $fc00, then you flip back and forth.
>Read the grayscale section at 86 Central for more info.
>
>>
>>>      port 1 - Keypad
>>Is this where you read from the keypad directly? Could Mr. Nigel use this
>to
>>make Mario stop hoppin' up and down like a penguin or something? :)
>
>The keypad is read directly in Mario.  The reason Mario keeps jumping up
and
>down is because he used the engine from Penguins and Penguins sucked!  To
>keep this from happening, you need to set a flag (in your game) that says
>that the jump was already recorded.  If the player is ready for another
jump
>and the flag is still set, don't jump.  When the player releases the jump
>button, reset the flag.  In Sqrxz, this doesn't happen.  However, a gripe
>about the Sqrxz jumping is that you always jump the full height, even if
you
>just tap the button.
>In my side scroller engine, I decided to fix all of that.  The player jumps
>depending on how long you hold down the button, just like in all the
>Nintendo games you are used to.  One of the few things I did right.  I just
>checked the code for the jumping/falling stuff.  If you remove all the
blank
>lines it is 105 lines long!  If anyone wants to see the jumping code, let
me
>know, it might be a little messy because it was one of the first things I
>did, but it's all commented.
>

Yeah, I've been trying to figure out little side scrolling properties like
that also.  Did you ever notice that in the nintendo marios there isn't any
momentum when you stop holding down the right/left keys?  (ie. it stops
moving in the direction as soon as you let go of the key)  ... except when
you duck, then you are able to sort of slide.  almost unnoticable and seems
to be alot of work as you'd have to add in velocities and similar; not that
that's too difficult, but it seems strange that so much was put into
something so innocuous (haha you don't have to look it up this time :-)
There are a lot of little things in mario you only really think about when
you start coding