• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

What's with this stupid line?

 
Greenhorn
Posts: 17
Eclipse IDE Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't understand whats going on, I have an image being withdrawn from a spritesheet, and being used as a character that moves around the screen. however a little bit of the image below it sometimes appears when the object moves across the screen up and down, why is this?

SpritesheetCode:
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It's hard to say with the code you've given. I don't see anything obviously wrong in the code, one thing that caught my attention was: why are you doing y + 1 on line 26?

Since we can't see what classes org.newdawn.slick.Image and com.fanger.ophidian.util.Array2D are we can't say if the problem is in one of those classes.

What does, for example, the method getSubImage() do that you're calling in line 17?
 
Jake Cirino
Greenhorn
Posts: 17
Eclipse IDE Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Jesper de Jong wrote:It's hard to say with the code you've given. I don't see anything obviously wrong in the code, one thing that caught my attention was: why are you doing y + 1 on line 26?

Since we can't see what classes org.newdawn.slick.Image and com.fanger.ophidian.util.Array2D are we can't say if the problem is in one of those classes.

What does, for example, the method getSubImage() do that you're calling in line 17?


For some odd reason when moving things are a multiple of 0.5f it kinda flips out. not a big deal.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic