ok.. thnks for the rep... but iam having some thought right now... and since iam a beginner in GD ima wondering if any of you could help..
1. i have seen a map editor called tile studio and i am wondering if i could use it in conjunction to gd.. is there any tutorial for it???
2. i have also found a sound library called hekkus... i believe it is made for pf but iam wondering if it is compatible with gd... are any sample sourcecode for gapidraw that uses it... by the way can i use it with pocketpc emulator 2003.. i cant find any lib for ppc2003 emu in the lib folder of hekkus...
3. iam also wondering how i could make a side scroller with gapidraw... because i have read that whn i draw an image that will be outside of the screen it will not be drawn... so how can i draw a background that is larger than the current screen if it will not be drawn because it is larger than the screen...
4. i am also thinking of writing a basic sprite class... it consists of these attributes..
- an x,y coordinate member
- a frame width and frame height member
- a function that could make an array of rects
it will look something like this...
public void extractRect(int framesWide, framesHigh, framesWidth, framesheight)
the framesWide and framesHigh argument are the number of frames across and down the image... the framesWidth and frameHeight are the width and height of each frame... for example if i have an image that have 4 frames across and 4 frames down and each frames are 16x16, i would call that function with this arguments:
RECT moveFrame[4][4]; // one state
extractRect(4, 4, 16, 16);
this will be its body...
- Code:
public void extractRect(int wide, int high, int width, int height) {
for (int h=0; h<high; h++) {
for (int w=0; w<wide; w++) {
moveFrame[w][h].left = w * width;
moveframe[w][h].right = (w * width) + width;
moveframe[w][h].top = h * height;
moveframe[w][h].top = (h * height) + height;
}
}
then i could put it into an array that contains different states for example that moveFrame is for the moving state and i could put it to another array that holds different states for my sprite class.. i could put an extract an exploding frame and add it to my state array...
i also want to include a function that detects for collision in that sprite class... well maybe you guys could give some insight for this sprite class..
5. i am also wondering what is the best storage for an array of enemies or bullets?? is it alright to use vector to store those... because in vector i could add and remove obejects dynamically... but i have heard that using vectors might use too much processing.. and slow thins down....
well so hope you guys could answer some of my questions....and maybe you could hel me to enhance my sprite class... thanks....