RobotPrototype / RedBit

For Prototyping the robot game
0 stars 0 forks source link

Investigate: how come the HowDoesItCount tiles look rotated and shifted all funny? #4

Closed benjamin-heasly closed 6 years ago

benjamin-heasly commented 6 years ago

I tried drawing a room using the HowDoesItCount.png tile set. The png looks great. I expected it to show an upright number on each tile. But they are rotated! Also the tile borders don't seem to align with the sprite borders.

I wonder if we're using the SpriteManager correctly? Or some other subtle thing?

RobotPrototype commented 6 years ago

sort of addressed this in a longer comment in our other thread. I can do some stuff Gimp side to make sure i'm exporting what I think i'm exporting. Also going to study up on the SpriteManager to see what its really looking for.

RobotPrototype commented 6 years ago

Found something that may be a useful reference... It is possible to break open the babylon.js functions and see what's going on. here is a link to the spriteManager. May be worth sinking some teeth into, or may be TMI

http://playground.babylonjs.com/#18FFKE#2

benjamin-heasly commented 6 years ago

Oh, one thing is I think we should make the png be 128x128, with 16 cells (each 32x32). It's counter-intuitive, but I think the way the tiles are arranged in the png will be different from how they get arranged within a platform.

benjamin-heasly commented 6 years ago

I think by "all rotated" I should just have said "upside-down", which maybe is fine.

benjamin-heasly commented 6 years ago

Ah! that is nice to be able to see the babylon source code.

RobotPrototype commented 6 years ago

Good! It's hard for me to parse still but I thought it would be legible to you.

Just pushed a better formatted (128x128) counting png called How Does It Count 2 (HDIC2).

benjamin-heasly commented 6 years ago

I like. It looks right to me.

I noticed the tiles are all upside down. I think this kind of thing is normal with graphics. Every tool (our code, the sprite manager, gimp, the png spec) seems to want its own convention for where to put the origin (center, top left, bottom left, etc). I think it's not a problem, just something we should accommodate.

I'll rotating the sprites and if that looks good I'll close this ticket.

benjamin-heasly commented 6 years ago

I flipped the sprites vertically. Looks rockin to me now.