Jump to content

  • Log In with Google      Sign In   
  • Create Account


Using different kinds off art files in game development nood question


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 simondid   Members   -  Reputation: 190

Like
0Likes
Like

Posted 03 August 2012 - 01:56 PM

Hey


okay so I have just started on learning more about java game development. I’m using the slick library And I have read that it’s preferred to use png files but when I’m looking around the world wide wep I’m finde every thing but png files and if I find png fiels they look like the attached files explosion_2.png with in my head makes no sense to display in a game unless you can get those explosion running like a animation some how???



Am I missing some thing?

I’m also finding a loot off bmp file with is looking like base.bmp attached file how can I use one off those models in my game??
1. Can I use bmp files
2. How due I spilt it up so I only use one off the modules??

I have no skills in Photoshop ore any kind off pic editing ☹

sry for my english

Attached Thumbnails

  • explosion_2.png

Attached Files

  • Attached File  base.bmp   63.55KB   28 downloads


Sponsor:

#2 FLeBlanc   Crossbones+   -  Reputation: 3085

Like
1Likes
Like

Posted 03 August 2012 - 02:18 PM

.BMP is typically not used for much in game development, due to its lack of an alpha channel. .PNG is more useful in that regard.

The image you posted is an example of what they often call a sprite sheet. It is intended to be "split up" (not literally) into frames. A frame can be thought of as a sub-rectangle of the image, which encloses one bit or part of the explosion. If the frames are displayed in sequence, one after another, at a rapid enough rate the illusion of something happening is created. With a sprite such as your explosion above, you will require an alpha channel (or some other method of removing all the pixels that are not part of the explosion), hence the recommendation of using .PNG, .TGA or some other format that supports alpha. The alpha channel is used to allow the background to show through the drawn sprite wherever there is not a pixel that is part of the explosion.

Now, you don't literally split the image up. Instead, in your game you conceptually split it up by mapping each bit or piece (sub-rectangle) to a sprite frame. When a given sprite frame is drawn to the screen, it only draws the particular sub-rectangle associated with that frame. How you accomplish this exactly depends highly upon your graphical API. An animation will typically store some sort of list of frames to display in sequence.

#3 simondid   Members   -  Reputation: 190

Like
0Likes
Like

Posted 03 August 2012 - 04:29 PM

okay gave me some kinda off sens in what shut due :) but no idear on who to due it ore what to google after is this process call something specifik??

so the explosion image is the one i need to use ??

due you have acces to a peac off code that dos this ??

sry for my english :(




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS