ID:1987938
 
(See the best response by Kaiochao.)
Can someone point me into the right direction on how to do a Proper system for a platform game with Jumping,Gravity and ladders i was using Forum accounts but i ran into a few issues and i re done it thinking that i goofed and now it still no works :3. i tried two other demos and well i can't grasp my head around them like i did with forums, I know its probably not the demo i used but if i use my own work all the way through from stat to finish it would help me even more.


Problem description: If your willing to give shot though, i have 3 Rash's side by side all dense and the box's are all set up and correct, the problem is if you walk you can walk through them but you will bump into a dense location (Problem 1), If you run you can go right through them (Problem 2).


All and all the whole problem is none of the Rash's are getting dense

and it's not just my Rash's it's any obj that i want to be a wall

Preview of the bump Below



Preview: "Note I Already Walked Inside Which I'm Not Suppose To Be Able To Do"






It's possible you're directly setting step_size and it's allowing you to overlap?

By default, that shouldn't be happening.
In response to Rushnut
No step_size is used anywhere.
Then how are you doing the pixel movement? If you're directly setting pixel_x and y that'll be your problem. Look into using step_size instead.
In response to Rushnut
how ever forum account does it with vel_x,vel_y,_px,_py,pheight,pwidth,offset_x,offset_y etc etc


i can post his move stuff with my edits.
In response to DistantWorld101
Best response
With Forum_account's library, you need to use pwidth, pheight, pixel_x, and pixel_y to specify the bounding box.

Setting bounds, bound_x, bound_y, bound_width, and bound_height directly isn't supported (although they are indeed used).

Other than that, it would help to show some code.
Oh I see, I misunderstood and thought he said he wasn't using FA's library anymore.
Well, for sidescrolling, you really should understand vectors and velocity and all those kinds of things at the bare minimum. With that kind of knowledge, you can easily make basic sidescrolling mechanics like sliding, jumping, modifying speed, all that good stuff. Make sure you're using step() rather than px/py/sx/sy, because the step procedure actually takes into account dense objects.

Using F_A's library honestly will probably not help if you don't understand what's happening and where it's happening. My suggestion is to attempt to create your own movement system and ask the community for help where you're stopped.
Forum_account's Sidescroller library is very easy to use. You don't need a degree in Physics to use it. You don't have to know how it works in order to use it.

I'd like to know what specific problems OP was having with the library before he decided it would be best to reinvent the wheel.
I did a series of tests and i'm posting them all, i'm only using one rash cause there all built the same.


Test 1:

This is no Bounding this causes no density - i can walk straight through.


    RRash
icon='BigCharJutsus.dmi'
icon_state="RedRash"
density=1
Health=20
Wall=1


Test 2:

I did pwidth, pheight, pixel_x, and pixel_y all different ways @kaiochao still nothing



Test 3:

Adding Bounding Adds Density but i can go through it
if i start a little far back to get speed do to the fact there is running.






Test 4:

Thinking it was the icon size i made a basic 32x32 square made it a obj and dense and still could walk through it and i even stacked it and still could walk through them.





What i see for moving in forums code that i've messed with.


        move(d)
#ifdef LIBRARY_DEBUG
#endif
if(Genned||SGenned||!client)
return
// we want to keep the mob's velocity between -5 and 5.
if(d == RIGHT)
if(vel_x < move_speed)
vel_x += 2
else if(d == LEFT)
if(vel_x > -move_speed)
vel_x -= 2
action(ticks)

#ifdef LIBRARY_DEBUG
#endif

if(client)
var/turf/t = loc

if(t.ladder)
if(keys[controls.up] || keys[controls.down])
if(!on_ladder)
vel_y = 0
on_ladder = 1
else
on_ladder = 0


if(on_ladder)
if(keys[controls.right])
climb(RIGHT)
if(keys[controls.left])
climb(LEFT)
if(keys[controls.up])
climb(UP)
if(keys[controls.down])
climb(DOWN)
else
if(keys[controls.right])
move(RIGHT)
if(keys[controls.left])
move(LEFT)
if(keys[controls.up])
move(UP)
if(keys[controls.down])
move(DOWN)


if(jumped)
jumped = 0
if(can_jump())
jump()


slow_down()
check_loc()

if(x != last_x || y != last_y || z != last_z)
camera.px = x * icon_width - offset_x
camera.py = y * icon_height
set_pos(x * icon_width - offset_x, y * icon_height, z)

movement(ticks)

#ifdef LIBRARY_DEBUG
#endif

var/turf/t = loc


if(!t)
#ifdef LIBRARY_DEBUG
#endif
return

set_flags()

gravity()

action(ticks)

set_state()


pixel_move(vel_x, vel_y)

#ifdef LIBRARY_DEBUG
#endif

slow_down()
if(vel_x > move_speed)
vel_x -= 2
else if(vel_x < -move_speed)
vel_x += 2
else if(!keys[controls.right] && !keys[controls.left])
if(abs(vel_x) < 1)
vel_x = 0
else if(vel_x > 0)
vel_x -= 1
else if(vel_x < 0)
vel_x += 1
if(on_ladder && !keys[controls.up] && !keys[controls.down])
if(abs(vel_y) < 1)
vel_y = 0
else if(vel_y > 0)
vel_y -= 1
else if(vel_y < 0)
vel_y += 1







Not all objects have this problem every other obj works find i can't go through them if they bump the mob or the mob bumps them it does what it is suppose to do, only the objects that are suppose to be "COMPLETE" walls like Rash and Wood walls but objs that do damage like fireballs work perfect they got there density and won't allow the mob to go through them.
I believe I might of ran into this in paradox, it seems that the AI ignore solid objects and are able to step on them :/