Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Same question just a little different flavor


Grizzy
 Share

Recommended Posts

So I had a question a while back about the 32x64 char I was making. Now I have a new problem. I was making the character, went to test it out in game and noticed a big problem. The way I tiled it out I left a 32x32 around the guy in each direction (in order to leave room for items) and this is a problem because I can't walk down as far as I used to on block tiles and I am now walking on things a lot than I wouldnt have been before. So what do u recommend I do to fix this problem. My idea was to just take the 32x32 that is blew the sprite and that would fix the problem. But rather than do it 1st I'd rather just ask to get input from people who know the engine and have been around longer than me, in case this has
ever come up with someone else before.

so it looks like this. X = Blank 32x32 O = where the gfx for the sprite are

X X X
X O X
X O X
X X X

see what I'm going for here? I think deleting the bottom row would fix this. If at all possible I want to keep thr XXX row above the head. Below idc about so much.
Link to comment
Share on other sites

@Frosty:

> Why not have it read a sprite that's 48x70?

I'm not sure if thats real advice or if your mocking me lol. Last time I asked this question I just had to find the answer out myself. Which is prob what I should of done in the 1st place. I was just looking for some surprising advice rather than me no little knowledge.
Link to comment
Share on other sites

From what I understand, the engine takes the dimensions of the sprite and calls that the space that your character occupies. So instead of a 32x64 sprite, you're ending up with a 96x128 sprite (because you padded each side with an extra 32 pixels of transparent space). The reason your sprite stops before you hit the bottom of the map is because of that 32 pixel padding you added to the bottom. Your character is being calculated as 96 pixels wide and 128 pixels tall, a full 64 pixels larger for each dimension.

There are two options I can see:
1\. Eliminate the padding and have a regular 32x64 sprite.
2\. Modify the code so that the boundaries are no longer linked to the sprite dimensions and are instead specified as a numeric literal… or just modify the calculation so the boundaries take into account 32 pixels of padding on each side.
Link to comment
Share on other sites

Okay maybe I should ref raise my question. What happens if I take off the bottom layer of 32x32\. So it looks like this..

X X X
X O X
X O X

would that make it where the bottom of the sprite can walk next to the blocked tile again or would hte extra row on the top still cause problems. I used to have it like this on my old set..

XOXXOX
XOXXOX …. ect ect.
Link to comment
Share on other sites

You're really overcomplicated a very, very simple system.

You have a 32x32 square which is your hitbox. The character is then horizontally centralised on top of that with the bottom of the character on the same level as the bottom of the hitbox.

This isn't a programming issue, this isn't a gameplay system, this is just you not thinking when you were creating your character sprites. Re-align your character sprite _properly_ and you'll be right as rain.
Link to comment
Share on other sites

@Robin:

> You're really overcomplicated a very, very simple system.
>
> You have a 32x32 square which is your hitbox. The character is then horizontally centralised on top of that with the bottom of the character on the same level as the bottom of the hitbox.
>
> This isn't a programming issue, this isn't a gameplay system, this is just you not thinking when you were creating your character sprites. Re-align your character sprite _properly_ and you'll be right as rain.

But will that not leave me much room for paperdoll items? I know I'm making it more complicated than needs to be, But I want to have rang when it comes to customizable items and the size I can make the items. That really is the whole point of this mess.
Link to comment
Share on other sites

Unless you're going to be adding streams of piss going down his legs and on to the tile below him then there is absolutely no need to have 32 pixels of space between his feet and the ground.

Please post an example of an item you are wanting to create which is somehow still visible even though it's going _through_ the ground.
Link to comment
Share on other sites

@Robin:

> Unless you're going to be adding streams of piss going down his legs and on to the tile below him then there is absolutely no need to have 32 pixels of space between his feet and the ground.
>
> Please post an example of an item you are wanting to create which is somehow still visible even though it's going _through_ the ground.

I know that, I realized that layer is useless but his head reaches the top of the 32x64\. So I wanted more room for his helmet. I know I have to delete the row below his feet but I wanted to know if the row above could remain or if it would mess stuff up.
Link to comment
Share on other sites

Did you bother trying it out before asking this question? If you would have tried it out, and if you'd read my previous explanation of the system, you'd know that the sprite can be any size you want both vertically _and_ horizontally as long as you have his feet firmly placed on the ground.

I'm really struggling to understand how you're having problems with getting your head around this.
Link to comment
Share on other sites

@Robin:

> Did you bother trying it out before asking this question? If you would have tried it out, and if you'd read my previous explanation of the system, you'd know that the sprite can be any size you want both vertically _and_ horizontally as long as you have his feet firmly placed on the ground.
>
> I'm really struggling to understand how you're having problems with getting your head around this.

This is a time I think I need to aplogize for my own stupidity. I'm a slightly vein person but I was over analyzing a situation and turned it into something much more than needed to be. I guess I doubted the engine to much or idk what. I just felt like the situation was more than it was and I was adding in factors that weren't there. Anywho thnx Robin, good lookin out.
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...