• Post Reply Bookmark Topic Watch Topic
  • New Topic

Flipped image when using tileset

 
Iantra Solari
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, i'm having another problem with the "game" i'm trying to make. Basically, i'm in the process of changing the images to a tileset, so i only need 1 image. The problem is that the walking animation and the standing still images are flipped, i don't know why because they use the same image. Here's my code, could someone guide me towards fixing the problem?



I already tried making a flipped over image and using that as the still image, but the image stays the same...
oh and walking==3 is still, walking==4 is moving


Edit:
I'm really sorry for taking up space in the forums, but somehow playing around with the values in the script got me to fix the problem. I'm sorry i made this useless topic
 
Campbell Ritchie
Marshal
Posts: 52574
119
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's not a useless topic. Sorry, don't know offhand. I think this would sit better on our GUIs forum, so I shall move it. And welcome to the Ranch
 
Rob Spoor
Sheriff
Posts: 20820
68
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Iantra Solari wrote:


I already tried making a flipped over image and using that as the still image, but the image stays the same...
oh and walking==3 is still, walking==4 is moving

If I were you I'd create static final int fields for that, or possibly enums. Don't you agree that the following looks easier to understand:
I'd also do something about those 96, 64 and 94 values. Currently they are so-called magic numbers (third bulleted item).
 
Iantra Solari
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ritchie... that sounds like christine's son. Thanks for moving this to the right place and thanks to Rob for the comment, i guess i'll have to learn some more java and understand what all that means before making a game-thing :P
Any tutorials or something you can suggest me to learn which you consider good??

Just paid a little more attention to the code and i realised i dont really need to be an expert in java to understand it... Thanks, i think i'll change it to that since it certainly looks easier to understand
Also, i used 64 and 96 because that's the sprite dimensions i liked and found, the 94s were just me being bad at adding mentally, but i was in the pocess of changing 94s to 96s when i discovered the flipped image problem. Anyways, should i use 16*32 sprites?
 
Campbell Ritchie
Marshal
Posts: 52574
119
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Who's Christine?
 
Darryl Burke
Bartender
Posts: 5154
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Campbell Ritchie wrote:Who's Christine?

At a guess, Ritchie's mother
 
Iantra Solari
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
at least someone got the reference.
 
Campbell Ritchie
Marshal
Posts: 52574
119
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
But I'm not called Mr Campbell
 
Iantra Solari
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No no no no no mr campbell is christine's ex husband, or boyfriend i'm not sure. Anyways, ritchie campbell is christine's son.
 
Rob Spoor
Sheriff
Posts: 20820
68
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, but Campbell Ritchie is Mr Ritchie, not Mr Campbell. As in, Ritchie is the last name, not the first name.
 
Iantra Solari
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
But i never said he was Mr. campbell, i said ritchie sounded like christine's son...
 
Rob Spoor
Sheriff
Posts: 20820
68
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Fair enough. Shall we stop this off-topic discussion?
 
Iantra Solari
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes, we shall.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!