Eviltyphoon Posted September 5, 2009 Author Share Posted September 5, 2009 Well, I've been playing with the idea of starting a side-project of my own, since MyWorld will be using SE which isn't released yet, but I didn't want it to become some generic orpg like you can find loads of in the WIP board. So, one of the things I wanted to add was pixel based movement, and I've been looking at the source, but I'm stumped on how to begin with it.So, all I'm asking is some hints on how to do this, I don't need a complete walkthrough, nor do I need all off the code changes. This will be my first (big) source mod, just to hone my skills a bit. Link to comment Share on other sites More sharing options...
Guest Posted September 5, 2009 Share Posted September 5, 2009 couldn't you use warps?, then modify the warp code?like,Key up,CAll warp(get player x+1 Link to comment Share on other sites More sharing options...
Eviltyphoon Posted September 5, 2009 Author Share Posted September 5, 2009 @Commander:> link=topic=51424.msg539580#msg539580 date=1252154905]> couldn't you use warps?, then modify the warp code?> > like,> > Key up,> CAll warp(get player x+1No, you can't. Right now the movement is bound to tiles, and the coordinates of a player are bound to the tile he is one. If the player moves, it wil do X + 1, x -1, y + 1 or y -1, but those number refer to tiles. I need to find a way to disconnect player coordinates and movement from tiles.What you suggest would just warp the player 1 tile in whatever direction x +1 is. Link to comment Share on other sites More sharing options...
Guest Posted September 5, 2009 Share Posted September 5, 2009 As i said, modify the warp code Link to comment Share on other sites More sharing options...
Eviltyphoon Posted September 5, 2009 Author Share Posted September 5, 2009 Right now, the line for player movement looks like this:```Player(Index).yOffset = Player(Index).yOffset - SS_WALK_SPEED```What do you suggest I change to get pixel-bsed movement… Link to comment Share on other sites More sharing options...
unnown Posted September 5, 2009 Share Posted September 5, 2009 no that's not it, it's mostly in the movement sub server side and the player draw suball are done like this x = x + 1and in the draw subx * 32 (pic_x) Link to comment Share on other sites More sharing options...
Genaga Posted September 5, 2009 Share Posted September 5, 2009 I've not looked at the code but I am guessing it requires quite a source change, I would do a speed + velocity type thing to check everything and make sure the collision dectection is correct because more than likely that will change too. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now