Index · Preferences · Help
Announcements · Bugs and Issues · Feature Creep · Newbie Central · Graphic Arts · Songs & Sound FX · Prose and Cons · Babble
Forum Search:

[Advanced Search]

[Messages in this Thread] [Show All (7)] [Return to Bugs and Issues]

Author:Xooxer [Posts]
Date:9/22/08 3:34 pm
Topic:Re: Platformer Demo Problem
Post ID:48
Parent ID:47
Next ID:49
Without knowing how you're using the code, I wouldn't really be able to say. In the demo, the mob/player has a proc called Loop() that handles updating the position of the player. PixMove() is called in there, but I see in the demo it doesn't include a direction, only the x,y,z position. That's probably because the demo uses a simple ball, and not something more dynamic, like a person or something.

I think you're going to have to modify the calls to PixMove() throughout the code to include the desired direction. PixMove() is called in the Loop() proc for mob/player and also in the PixBumP() procs for all atoms. Just use the Find option in Dream Maker (ctrl+F) and look for all the instances of PixMove( in all the included files.

One of the results will be the PixMove() proc definition, located in the pixelstep.dm file. You can ignore that instance. For the rest, add the direction as the last argument. For the Loop() proc, it will only be dir, or src.dir. For the PixBump() procs, it should be M.dir.

In the player.dm file are a number of hidden verbs that are used to move the player. They're named things like, Left(), Unleft() and so on. In each of the directions, Left() and Right(), (not the "un" ones) set the direction you want the player to face. src.dir = EAST would work for Right(), WEST for Left(). If you have a special animation for jumping, you'll have to set it in the various hidden verbs, the Loop() proc and also the various PixBump() procs that could affect the jump or direction. I think I left code in there commented out that handled changing the state when jumping, but I'm not sure if it's fully functional yet.

This demo is sort of a work in progress, so it may not be entirely stable yet. Some things like movement states and animations are currently a pain to implement, so I'll have to eventually find a simpler solution.

Messages in this Thread: [Show All (7)]

  Platformer Demo Problem Fugsnarf (9/22/08 2:08 pm)
      Re: Platformer Demo Problem Xooxer (9/22/08 2:25 pm)
          Re: Platformer Demo Problem Fugsnarf (9/22/08 2:48 pm)
              Re: Platformer Demo Problem Xooxer (9/22/08 3:34 pm)
                  Re: Platformer Demo Problem Fugsnarf (9/22/08 3:39 pm)
                      Re: Platformer Demo Problem ArcaneDragonX (11/22/08 6:58 pm)
                          Re: Platformer Demo Problem Fugsnarf (11/29/08 9:51 am)