Pixel Movement

by Forum_account
Pixel Movement
A pixel movement library for isometric and top-down maps.
ID:642408
 
BYOND Version:493
Operating System:Windows Vista Home Basic
Web Browser:Chrome 18.0.1025.151
Applies to:Dream Maker
Status: Open

Issue hasn't been assigned a status value.
top-down-demo\demo.dm:48:error: pdepth: undefined var
top-down-demo\demo.dm:52:error: pdepth: undefined var
top-down-demo\demo.dm:56:error: pdepth: undefined var
top-down-demo\demo.dm:56:error: pz: undefined var
top-down-demo\demo.dm:62:error: pdepth: undefined var
top-down-demo\demo.dm:81:error: pdepth: undefined var

(Those are the errors i got, i forgot how to fix them, you told me once. can you help me out Forum_accounts.?)
Open _flags.dm and comment out the #define TWO_DIMENSIONAL line.
Ok and want to make it so you can jump in my game with depth and all that. What should I do.?
The same thing =)

The #define TWO_DIMENSIONAL line tells the library to work in a top-down 2D mode. If you comment that line out, it'll run in 3D mode with jumping, depth, and all that.
Ok great thanks but i tried that through first time it didn't work. but great library.!
Some of the demos can be run in 3D mode but don't make use of it. The isometric demo certainly makes use of the 3D mode if you need a way to test something out.
Yeah but i need a regular game you know top down....
In response to Anime HQ
Anime HQ wrote:
Yeah but i need a regular game you know top down....

Do you want jumping and depth with a top-down view?

The library uses BYOND's pixel_z var to represent the elevation of an object and, by default, this moves objects up on the screen (like it would for a three-quarter view). If you want to have depth with a strictly top-down view, you'd need to do something like this:

mob
set_pos()
..()
pixel_z = 0
ok great thanks
Ok the jump still doesn't work in my game...
Do you override the key_down() proc anywhere in your code? If so, you need to call ..() in it, otherwise the default action (jumping when you press the jump key) won't execute.
i dont believe i do...
You can try adding this to your code:

mob
can_jump()
world << "can_jump() was called."
return ..()

jump()
world << "jump() was called."
return ..()

If those procs aren't even being called, the default key_down() isn't getting called for some reason.
ok
keyboard.dm:50:error: key_up: undefined proc
keyboard.dm:36:error: focus: undefined var
movement.dm:249:error: client.focus: undefined var
movement.dm:250:error: client.keys: undefined var
movement.dm:251:error: client.keys: undefined var
movement.dm:252:error: client.keys: undefined var
movement.dm:253:error: client.keys: undefined var
movement.dm:286:error: client.focus: undefined var
movement.dm:286:error: client.keys: undefined var
movement.dm:286:error: client.keys: undefined var
movement.dm:295:error: client.focus: undefined var
movement.dm:295:error: client.keys: undefined var
movement.dm:295:error: client.keys: undefined var
debugging.dm:76:error: client.keys: undefined var
debugging.dm:77:error: client.keys: undefined var
_flags.dm:64:warning: can_jump: procedure override precedes definition
movement.dm:79:warning: can_jump: definition is here
keyboard.dm:43:error: key_down: undefined proc
_flags.dm:68:warning: jump: procedure override precedes definition
movement.dm:82:warning: jump: definition is here

now it says this
It looks like you're missing the Keyboard library and that you pasted the code I gave you in the wrong spot. This code:

mob
can_jump()
world << "can_jump() was called."
return ..()

jump()
world << "jump() was called."
return ..()

Should go in the project of yours that references the Pixel Movement library, not in the library itself.
Ohh ok thanks
C:\Documents and Settings\Mike\My Documents\BYOND\lib\Forum_account\keyboard\keyboard.dm:187:e rror: split: undefined proc
Make sure you have the Forum_account.Text library included. I'm not sure why that error comes up - the Keyboard library should be including it automatically but for some reason you sometimes have to include it manually.
and do i have to download this Text library.?
Page: 1 2