6 Replies - 624 Views - Last Post: 10 October 2013 - 07:24 AM Rate Topic: -----

#1 lscorpionlmi  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 20
  • Joined: 04-January 13

C++ Allegro 5 : Sprite Sheet with different sized images?

Posted 09 October 2013 - 11:12 AM

Hi guys,

I'm still starting to learn Allegro 5.

So far I was using al_draw_bitmap_region for sprite sheets with images of same size.

Now I'm trying to work with sprite sheets that have different sized images. The sprite sheet is just the images with a pink background.

I don't know where to start, can anyone give me a hint of what I need to do?


Thanks in advance
Is This A Good Question/Topic? 0
  • +

Replies To: C++ Allegro 5 : Sprite Sheet with different sized images?

#2 stayscrisp  Icon User is offline

  • フカユ
  • member icon

Reputation: 994
  • View blog
  • Posts: 4,158
  • Joined: 14-February 08

Re: C++ Allegro 5 : Sprite Sheet with different sized images?

Posted 09 October 2013 - 11:31 AM

Can we see the sprite sheet in question? Might help to shed some light on things.

But my immediate thoughts are to handle the size of the frame for each animation in your animation handling code. For example, when running frame height and width = such and such and when standing = something else. Unless you have frames of different sizes to loop through, and if so I would advice against it and split your character into separate parts.
Was This Post Helpful? 0
  • +
  • -

#3 lscorpionlmi  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 20
  • Joined: 04-January 13

Re: C++ Allegro 5 : Sprite Sheet with different sized images?

Posted 09 October 2013 - 11:40 AM

I'm trying to animate the side walk of this sprite(from ragnarok)

http://imageshack.us/photo/my-images/94/d22x.png/

http://img94.imagesh...4/7569/d22x.png put wrong link before
Was This Post Helpful? 0
  • +
  • -

#4 stayscrisp  Icon User is offline

  • フカユ
  • member icon

Reputation: 994
  • View blog
  • Posts: 4,158
  • Joined: 14-February 08

Re: C++ Allegro 5 : Sprite Sheet with different sized images?

Posted 10 October 2013 - 02:10 AM

That's the thing about ripped sheets from the internet, they are never spaced correctly.
Was This Post Helpful? 0
  • +
  • -

#5 lscorpionlmi  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 20
  • Joined: 04-January 13

Re: C++ Allegro 5 : Sprite Sheet with different sized images?

Posted 10 October 2013 - 05:29 AM

I got it from grf file from ragnarok.

It would be better for performance not to work with these kinds of sprites, right?
Was This Post Helpful? 0
  • +
  • -

#6 stayscrisp  Icon User is offline

  • フカユ
  • member icon

Reputation: 994
  • View blog
  • Posts: 4,158
  • Joined: 14-February 08

Re: C++ Allegro 5 : Sprite Sheet with different sized images?

Posted 10 October 2013 - 07:22 AM

No not necessarily, but you will need to mess about with it to ensure it has specific width and height for each sequence of frames. Performance wise it will be fine.
Was This Post Helpful? 1
  • +
  • -

#7 lscorpionlmi  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 20
  • Joined: 04-January 13

Re: C++ Allegro 5 : Sprite Sheet with different sized images?

Posted 10 October 2013 - 07:24 AM

Great!! Now I have a start point.

Thank you!!!

:bigsmile:
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1