Results 1 to 3 of 3

Thread: A few Side-Scroller Problems

  1. #1

    Default A few Side-Scroller Problems

    Hey, just starting with novashell... so far I cant believe how awesome (yet free) this engine is!

    Right now I'm fooling around with a side-scroller type game (think Mario) and have run into a few problems:

    1: The character is really "jittery" after I apply gravity

    2: When landing after a jump, the character sorta bounces backward, and acts a little to much like a rubber ball.

    3: If I was to make a multiplayer mode, I would want the camera to zoom out in such a way that both characters are always visable... Any ideas on how to do this?

    Also I'm Trying to switch between rotational physics (when your hit), recover (or stand back upright), and then switch to non-rotational physics... Is this possible?

    Thanks in advanced!

  2. #2
    Administrator Seth's Avatar
    Join Date
    Jul 2002
    Location
    Japan
    Posts
    5,343

    Default

    The physics code is a little shaky at the moment, the "Treeworld" demo is probably the best thing to work from for sidescrollers, if you use it as a template you should at least get results similar to that, then be very careful with changes.

    I'm hoping some physics pro will look at the source and fix it sometime.. Or I may work with it later, but it's a bit low priority as what is there is working fine for me. (now you see why it's free )


    3: If I was to make a multiplayer mode, I would want the camera to zoom out in such a way that both characters are always visable... Any ideas on how to do this?

    The camera can be completely controlled by script so this is possible but you'd need to calculate where to position the camera based on where the players are yourself.

    So, in one of the players Update() function (that happens every frame) you could get the positions then set the camera target position and target zoom so both players will be on the screen.

    The math would be like.. let's see.. add both player positions together then divide by 2 to get the average, then use GetCamera:SetPosCenteredTarget(vFinalPos); to move the camera there.

    For zoom, you'd measure the distance between the two players (could use PlayerEnt:GetDistanceToPosition(theOtherPlayer:Get Pos()) to get that) and set the scale accordingly.

    Also I'm Trying to switch between rotational physics (when your hit), recover (or stand back upright), and then switch to non-rotational physics... Is this possible?
    It is possible to switch back and forth, the enemies in the TreeWorld example switch to rotational physics after they die for example.
    Seth A. Robinson
    Robinson Technologies

  3. #3

    Default

    Thanks, I've solved the jittering problem by looking at treeworld, but I'm still going to need to fiddle around with bouncing.

    has any other game of this type been completed in novashell?

    EDIT:
    Could i get a tut on how to use Vector2? i cant quite figure out how to record and use the players current X and Y.
    Last edited by shofixti244; 08-17-2007 at 08:01 PM.

Similar Threads

  1. Top down RPG example problems
    By DarthDie in forum Novashell Game Creation System
    Replies: 4
    Last Post: 05-09-2007, 01:49 AM
  2. Some problems.
    By Uhfgood in forum Novashell Game Creation System
    Replies: 5
    Last Post: 03-25-2007, 07:26 PM
  3. Side Scroller
    By jimbo in forum Novashell Game Creation System
    Replies: 4
    Last Post: 12-14-2006, 05:45 AM
  4. Stoooopid side quest
    By in forum Dink Smallwood HD
    Replies: 6
    Last Post: 08-15-2004, 01:19 PM

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •