| | |
Space Invaders - Game
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Oct 2008
Posts: 32
Reputation:
Solved Threads: 4
I need to create a Space Invaders kind of game and I have a demo I need to copy the main features from. The invaders have to be of at least 3 different types and they change color.
So I figured the invaders are 3 child classes from a parent 'Invader' class that will have the methods of painting, moving, etc. What would be the best way to control the destruction of the invaders? I've read on this forum that a 'linked list' would be a way of doing just that. I don't know what a linked list is. So should I create an array that will store the position of the bullets (with a maximum of maybe 40 bullets). Is there a way to dynamically allocate memory for the bullets' position as they are created so I don't have an array of say 100 and use only 40?
The game will have sounds and the demo we've been given uses sound files located in the same folder the .exe is in, so they're not embedded (if that's how you would call it) or anything of that sort. The .exe is also got an icon.
We've been using PaintBox to draw stuff on application forms in Borland Builder so I think that's how it will be this time around too.
If you wish I can attach the demo folder.
Thanks in advance
So I figured the invaders are 3 child classes from a parent 'Invader' class that will have the methods of painting, moving, etc. What would be the best way to control the destruction of the invaders? I've read on this forum that a 'linked list' would be a way of doing just that. I don't know what a linked list is. So should I create an array that will store the position of the bullets (with a maximum of maybe 40 bullets). Is there a way to dynamically allocate memory for the bullets' position as they are created so I don't have an array of say 100 and use only 40?
The game will have sounds and the demo we've been given uses sound files located in the same folder the .exe is in, so they're not embedded (if that's how you would call it) or anything of that sort. The .exe is also got an icon.
We've been using PaintBox to draw stuff on application forms in Borland Builder so I think that's how it will be this time around too.
If you wish I can attach the demo folder.
Thanks in advance
•
•
Join Date: Oct 2008
Posts: 32
Reputation:
Solved Threads: 4
How can I move a form by dragging a label or a panel?
I've made the form borderless but as expected it can't be moved by mouse dragging. I know there is a way but I can't figure out how to move it by dragging the panel/label I'm using as the title bar, I don't know what properties to look at to perform this action and I haven't been able to find something useful on the net.
I'm using Borland Builder C++.
I've made the form borderless but as expected it can't be moved by mouse dragging. I know there is a way but I can't figure out how to move it by dragging the panel/label I'm using as the title bar, I don't know what properties to look at to perform this action and I haven't been able to find something useful on the net.
I'm using Borland Builder C++.
•
•
Join Date: Oct 2008
Posts: 40
Reputation:
Solved Threads: 6
The Standard Template Library has a dynamically sizable array type, a linked list type, and generally a whole bunch of useful stuff that makes this easy, called the STL. The problem with STL is that it can be a bit confusing to people familiar with only C or new to C++, but since you are already talking inheritance, it's C++. The *other* issue with STL is that it is written pretty densely, and errors can be huge and hard to deal with, but I would suggest you look into it for what you are planning.
Thanx...
Sean
Thanx...
Sean
![]() |
Similar Threads
- Old but greate game (Game Development)
- the "or" game (Posting Games)
- Sokoban game help needed (java) (Java)
- java 2d games problem (collision, well prevention) (Java)
- how long does it take to learn assembler and how difficult is it? (Assembly)
- New To Programming = ME!! (C++)
Other Threads in the C++ Forum
- Previous Thread: What header do I look at for...
- Next Thread: please help, this is what i have done so far
| Thread Tools | Search this Thread |
api array arrays based beginner binary c++ c/c++ calculator char char* class classes code compile compiler console conversion count delete deploy desktop directshow dll download dynamic dynamiccharacterarray encryption error file forms fstream function functions game givemetehcodez google graph gui homeworkhelp homeworkhelper iamthwee ifstream input int integer java lib linkedlist linker linux list loop looping loops map math matrix memory news number numbertoword output parameter pointer problem program programming project python random read recursion recursive reference return rpg sorting string strings struct temperature template templates test text text-file tree unix url variable vector video visual visualstudio win32 windows winsock wordfrequency wxwidgets





