Animated Sprites png,dds,tga,bmp Whatever img file extension

The Partridge Family were neither partridges nor a family. Discuss.
Post Reply
ghilllie
Posts: 72
Joined: May 2nd, 2012, 3:25 am

Animated Sprites png,dds,tga,bmp Whatever img file extension

Post by ghilllie » May 31st, 2012, 9:07 pm

Okay guys here's my Demo that i'd been busy studying...

Basically this is how you can Load any image files as your Sprite.
I used .png image in this one so I can simulate shadows for the dudes.

Code: Select all

settings.h variables value
int				        WindowStyle;      =       Full Screen if FullScreen var is true;
bool				FullScreen = false;      =       triggers WindowStyle;
const int			     AINumber=35;      =       Number of Artificial Intelligence dudes.
const float	    kMoveAmount=5.0f;      =      The Speed of AI dudes.
Note that header files aren't visible in the solution since I included
them in different way which is by adding it's relative folder directory.
So if you guys wanna see the header files you'll have to go to the header files folder
and open it.

Another thing - This solution does not use the framework that our friend chili has but I use chili's window icon to make this framework that I've use in this project has a proper logo.

For Quick Settings try playing around with the variables
in the settings.h header file :-)
You can try to full screen the Demo Window if you want to :-)
You can try adding up to 500 dudes - more than 500 will give you something you wont expect.
but you can add 0.5f value to "kSpreadDownCavemen" variable to make the dude display normally.
doing so will give you freedom to add dudes for up to 500k dudes and more with no changes in frame rate al least in my computer. You don't need that much of dudes any ways - less than 50 dudes would be reasonable.

Good luck Everyone!!

hope this helped!!!! :lol: :lol: :lol:

Image

Video Preview

Here's the file download:
Attachments
GhillieSpritesDemo2.zip
(1.36 MiB) Downloaded 276 times
Last edited by ghilllie on June 3rd, 2012, 7:24 pm, edited 5 times in total.
Chili++ for President :)

User avatar
chili
Site Admin
Posts: 3948
Joined: December 31st, 2011, 4:53 pm
Location: Japan
Contact:

Re: Animated Sprites png,dds,tga,bmp Whatever img file exten

Post by chili » June 2nd, 2012, 11:53 pm

What the heck is an .iwd file? :?
Chili

ghilllie
Posts: 72
Joined: May 2nd, 2012, 3:25 am

Re: Animated Sprites png,dds,tga,bmp Whatever img file exten

Post by ghilllie » June 3rd, 2012, 2:39 am

chili wrote:What the heck is an .iwd file? :?
that's actually a .rar bro... just change the file extension to .rar or just open with winrar. Sorry for that I thought i was modding a mw2 game files. I didn't even noticed i did it that way bro... I really sorry for that...
Chili++ for President :)

User avatar
Asimov
Posts: 814
Joined: May 19th, 2012, 11:38 pm

Re: Animated Sprites png,dds,tga,bmp Whatever img file exten

Post by Asimov » June 4th, 2012, 12:49 am

Hi Ghillie,

I get an error on the #include <d3dx9.h>. A red underline which means it cannot find the header file. Of course this leads to loads more errors.

1>c:\users\thomas r williams\downloads\ghilliespritesdemo2\ghilliespritesdemo2\ghilllie's sln\sourcefiles\./headerfiles/HeadLibs.h(9): fatal error C1083: Cannot open include file: 'd3dx9.h': No such file or directory


Any idea why?

Asimov
----> Asimov
"You know no matter how much I think I have learnt. I always end up hitting brick walls"
http://www.asimoventerprises.co.uk

User avatar
LuX
Posts: 1492
Joined: April 22nd, 2012, 12:33 pm
Location: Finland

Re: Animated Sprites png,dds,tga,bmp Whatever img file exten

Post by LuX » June 4th, 2012, 1:12 am

You need to include them through the properties included files.
ʕ •ᴥ•ʔ

ghilllie
Posts: 72
Joined: May 2nd, 2012, 3:25 am

Re: Animated Sprites png,dds,tga,bmp Whatever img file exten

Post by ghilllie » June 4th, 2012, 7:28 am

Asimov wrote:Hi Ghillie,

I get an error on the #include <d3dx9.h>. A red underline which means it cannot find the header file. Of course this leads to loads more errors.

1>c:\users\thomas r williams\downloads\ghilliespritesdemo2\ghilliespritesdemo2\ghilllie's sln\sourcefiles\./headerfiles/HeadLibs.h(9): fatal error C1083: Cannot open include file: 'd3dx9.h': No such file or directory


Any idea why?

Asimov
Try to solve it using This Tutorial
Chili++ for President :)

User avatar
Asimov
Posts: 814
Joined: May 19th, 2012, 11:38 pm

Re: Animated Sprites png,dds,tga,bmp Whatever img file exten

Post by Asimov » June 4th, 2012, 10:13 am

Hi ghillie,

Thank you I will read that tutorial when I am more awake LOL. Only just got up.

Asimov
----> Asimov
"You know no matter how much I think I have learnt. I always end up hitting brick walls"
http://www.asimoventerprises.co.uk

Post Reply