Author Topic: strange blitting position behavior  (Read 1104 times)

Offline jt123

  • byte
  • *
  • Posts: 8
    • View Profile
strange blitting position behavior
« on: March 24, 2013, 02:46:07 pm »
Hello i've god a problem. I have 60 by 60 texture for dpad and on 320 x 480 its alright but on 800 x 480 the texture is too low i'm using this
code. So if someone can help me.

Code: [Select]
tPack.blit(fb, gamepadTexture, 0, fb.getHeight() - 60, true);

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11748
    • View Profile
    • http://www.jpct.net
Re: strange blitting position behavior
« Reply #1 on: March 24, 2013, 06:04:56 pm »
How low is 'too low'? A screen shot might help.

Offline jt123

  • byte
  • *
  • Posts: 8
    • View Profile
Re: strange blitting position behavior
« Reply #2 on: March 25, 2013, 11:22:59 am »
There are some pictures it looks like on 800 x 480 is the texture bigger btw i'm using rafts texturepacker class but that shouldn't affect anything,
also is there any better way to make dpad or some tutorials because my is a bit bad.

This is on 800x480.

https://www.dropbox.com/s/pqydcxudb804uky/device-2013-03-25-110919.png

This is how it should look(480x320).

https://www.dropbox.com/s/qp4leyqxl8q4weu/device-2013-03-25-111509.png

Update: I made dpad that is like a nova 3s etc... and it looks like on bigger resolution textures goes a bit off so i'll try to fix it by changing offset on bigger resolutions.
Update2: Also i tried to switch my players model from box to 3ds model but it rotates it wierdly so i don't know if I'm doing somethink wrong or not.
« Last Edit: March 25, 2013, 03:52:42 pm by jt123 »

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11748
    • View Profile
    • http://www.jpct.net
Re: strange blitting position behavior
« Reply #3 on: March 25, 2013, 07:04:48 pm »
Have you tried to do normal blit with some 64*64 texture instead? If that doesn't work any better, make sure that the visible area actually has the size that you think it has.

I don't get the part apart the 3ds?! Rotations don't about the actual model they are applied to, so what exactly is so weird?

Offline Thomas.

  • double
  • *****
  • Posts: 833
    • View Profile
Re: strange blitting position behavior
« Reply #4 on: March 25, 2013, 07:33:23 pm »
If you use raw folder, images may be scaled by system to another resolution. Try this.

Code: [Select]
tPack.blit(fb, gamepadTexture, 0, fb.getHeight() - gamepadTexture.getHeight(), true);

Offline jt123

  • byte
  • *
  • Posts: 8
    • View Profile
Re: strange blitting position behavior
« Reply #5 on: March 26, 2013, 07:26:55 am »
Alright i've god it working now animation. What is easyer or better bones or keyframes?

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11748
    • View Profile
    • http://www.jpct.net
Re: strange blitting position behavior
« Reply #6 on: March 26, 2013, 07:53:55 am »
Keyframes are faster but use more memory. Bones requires more processing power but uses less memory and is more flexible. It depends on your needs, which one is best.