>> and i dont think im better than you...
i know you dont think you KNOW
>> and i dont think im better than you...
i know you dont think you KNOW
What is C++?
here is a screen shot of an intense battle between me and nothing....
What is C++?
That looks good, way better than my bullets. I think I recognize that plane from somewhere, say Total Annihilation? Does your ship move diagonaly? I quit working on my shooter, like I do everything, like the Sniper game, like this Windows text editor I was making. You ever read Pixelate? I think it is cool, I would like to write my own online game programming magazine, but I do not know enough, yet... I am trying to learn to do sprite animation, know any resources?
gcc -lalleg
http://www.ciusa.net/~jrgrant/
it doesnt move diagonally but it has b4...
and... I actually got that ship by taking a screen shot of a game called space rocks and then i modified it a bit and poof...
umm... i dont know of anywhere to find animation help...
u know where hasnt helped?
What is C++?
does any one know how to make one bitmap
BITMAP* baddy = NULL;
and use it for multiple ships?
i tried just using multiple draw_sprites with different X coords but then i couldnt do collision detection on em...
the only other way i know of would be
BITMAP* baddy1;
BITMAP* baddy2;
ect...
What is C++?
Just use one and draw the where you need it.
Code:BITMAP *badguy = load_bitmap("badguy.bmp", NULL); struct enemy { int x, y; bool exists; } enemies[10]; enemies[0].x = 20; enemies[0].y = 20; enemies[1].x = 200; enemies[1].x = 200; draw_sprite(badguy, enemies[0].x, enemies[0].y); draw_sprite(badguy, enemies[1].x, enemies[1].y);
gcc -lalleg
http://www.ciusa.net/~jrgrant/
thanx... arrays... doh, i should have thought of that
What is C++?
Arrays of structures are very usefull. You can use them to create different ships, bullets, starts, power ups or anything. You can even save space my using 'new'.
I think it would go something like that. I am gonna learn to use linked list, so there is no limit on the amount of bullets.Code:struct bullet { int x, y; } *bullets[100]; bullets[0] = new bullet;
gcc -lalleg
http://www.ciusa.net/~jrgrant/
Josh, I changed all of my code from when you first looked at my program so that all of the flickering would be gone (I used a buffer). The last piece of code I posted I still have no idea why it doesn't work. Thanks for the help with your code, though.
Both of your games look really good.
But a lot of the credit has to go to Josh.
yup, josh did help us out here.. i dunno how he got so friggen smart all of a sudden...
[edit]
how did you use a background josh?
[/edit]
[edit2]
oh, this will just be a test game.. not the full complete game...
after i get the collision detection right i might either work on the complete game... or attempt a test puzzle game (tetris, tetris attack... )
[/edit2]
[edit3]
u guys find it wierd that were almost the only ones to post on this thread?
[/edit3]
Last edited by Vicious; 06-09-2002 at 05:05 PM.
What is C++?
What he did was before he drew the sprites to the buffer he blit the background to the buffer.
Wow, just a few days ago I would have had no idea what any of that meant. Pretty cool.
I think I'm going to stick with this game for now. I'm kind of going to make it like an Asteroids style of game. Like if you press ctrl+arrow key the plane will turn in that direction instead of move in that direction.
um... y ctrl + arrow?
why not arrow roteates or (pivot_sprite) and up thrusts?
that would be hard...
What is C++?
how about scrolling the background?
What is C++?
I think with allegro, sometimes it will not let you see if two keys are being pressed at the same time. So it will not always work testing if the user is holding control while he hits the arrow keys.
By the way, I do not know if KEY_CTRL is the right name, it could be KEY_CONTROL.Code:if(key[KEY_LEFT] && key[KEY_CTRL]) // Will not always work
You should do it like origional asteroids, when you press left or right, it rotates the ship, press up to accelerate, press down to slow down. Making it wrap around to the other side of the screen would not be hard either. Good luck to you, let me know if you need any help.
I can never think of any games to create. I just made one where you walk down the road, you have a joint, if you press space, it shows him hit the joint and blow out smoke. Once you hit the joint a certain amount of times the colors get distorted, once you hit it alot more, the guy grows huge, and starts to spin. Everything works on it now, except for the spinning part, I could not figure out rotate_sprite(). If you are interested in this game, I could upload it to my site, it is too big to upload to this forum. Sorry if you are offended by any of that.
I suck at art, I can not find many free sprites. If you know where I can find alot of various sprites (rpgs, spaceships, cars, anything) please let me know. I want to make a topview racing game next, I think that is a little (a lot) beyond my skill though.
I do not know how to do scrolling, where can I learn how to do this? Would I create a bitmap as large as my map, and when I blit it, only blit the portion to be seen to the screen? I could do that, but it seems an awfull waste of memory. I am gonna get to coding on my racing game I guess, if you know how to use rotate_sprite() please let me know.
gcc -lalleg
http://www.ciusa.net/~jrgrant/
I just looked in includes/allegro/keyboard.h, it is KEY_LCONTROL and KEY_RCONTROL.
gcc -lalleg
http://www.ciusa.net/~jrgrant/