Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (739)
Games in Android Showcase (224)
games submitted by our members
Games in WIP (820)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
   Home   Help   Search   Login   Register   
  Show Posts
Pages: [1]
1  Game Development / Newbie & Debugging Questions / Re: Sprite practical question... on: 2011-12-06 19:58:58
Thanks for all Grin

See you !
2  Game Development / Newbie & Debugging Questions / Re: Sprite practical question... on: 2011-12-06 19:27:06

Thanks. I used TexturePacker and adapted my code.
I divided all my sprites to single files (yoshi-slurp_1, yoshi-slurp-2... etc) then used TexturePacker.

I define only one the images (ie, slurp to the right img) and use .flip to get it to the left. flip makes a symmetry.. Since I've centered the foots of my yoshi, that shouldn't cause any problems. That doesn't seems to cause problem with walk action but with tongue stuck action..

When WhitespaceStrip is False, That's works, I can get my yoshi walks.. stucks his tongue in both direction.
When WhitespaceStrip is True, That doesn't work. My yoshi walks in both direction but he can't stuck his tongue in a direction correctly..

I don't know why...
Maybe because AtlasRegion store the whitespace informations but don't apply it then the cast to TextureRegion can't be done..
But Animation takes TextureRegion constructor parameter only.

Packed stripped:
Packed nonstripped:

I can provide you the entire sources if needed..

3  Game Development / Newbie & Debugging Questions / Re: Sprite practical question... on: 2011-12-06 16:21:27

Thanks for your answer.
You mean, I should separate all my yoshi sprites into single files (ie yoshi_walk_1 yoshi_walk_2 etc....).
Then all this files to a folder (yoshi/) and use a texture packer?

That what I did manually but thanks, I now know that we can do that dynamically.

I'll try that in few hours.
4  Game Development / Newbie & Debugging Questions / Sprite practical question... on: 2011-12-06 10:35:06

First at all, thanks to this forum to being there =)

I'm not new at all in Java Programming but totally new in Java Game Dev.
I just try to create a simple game with a Yoshi & a world with the libgdx lib (jogl)

But I've a problem.

So I've some sprites in a texture file to make an animation.
For ex, I use 64*64 sprites in two 512*64 textures for the walk animation. In each 64*64, I've a sprite with Yoshi in a certain position. Each time the game advance, we choose the next sprite... (as described into the libgdx game). I've a texture to Walk from left to right and a texture to Walk from right to left. Why ? Because I didn't centered the sprites but aligned them at the bot-right position. So I can't flip them. I think it's not a good solution.. but it works.

But my problem is that I want the Yoshi to "stuck out his tongue" (I call this "Slurp") to right & to left. For the left slurp, it's ok because the sprite is aligned at the bot-right corner. But to the right... It cause the Yoshi to go back.
I thought about putting the Yoshi in the middle of the sprite but Yoshi+tongue take more than 32pix.. That I can't get him in the middle to be able to use symmetry or...

I don't know if I can be understood.. Sorry ^^

And I don't really want to expand all my sprites to 128*128 ? Its a bit dirty no? Please throw a light on that ^^

PS: I wanted to put an offset on the drawing method but Jogl have strange axis/scale.. Failed to find how to put a PixelOffset.


Here is my class if you want to but I think you won't need it.. And it's a bit unclean cause it's tests :
Thanks !
Pages: [1]
Ecumene (54 views)
2017-09-30 02:57:34

theagentd (77 views)
2017-09-26 18:23:31

cybrmynd (185 views)
2017-08-02 12:28:51

cybrmynd (183 views)
2017-08-02 12:19:43

cybrmynd (190 views)
2017-08-02 12:18:09

Sralse (199 views)
2017-07-25 17:13:48

Archive (748 views)
2017-04-27 17:45:51

buddyBro (882 views)
2017-04-05 03:38:00

CopyableCougar4 (1431 views)
2017-03-24 15:39:42

theagentd (1322 views)
2017-03-24 15:32:08
List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05

SF/X Libraries
by SkyAphid
2017-03-02 06:38:56

SF/X Libraries
by SkyAphid
2017-03-02 06:38:32

SF/X Libraries
by SkyAphid
2017-03-02 06:38:05

SF/X Libraries
by SkyAphid
2017-03-02 06:37:51 is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!