Simple DirectMedia Layer (SDL) is easy to learn and I reccomend it if you're trying to get started with graphics. I'm assuming this is what you mean by 2D.
Type: Posts; User: Vorok
Simple DirectMedia Layer (SDL) is easy to learn and I reccomend it if you're trying to get started with graphics. I'm assuming this is what you mean by 2D.
I learned how to use allegro first, but I recently tried SDL and I've found I like it better and it's just as easy to use (maybe even easier).
If you mean a password-like effect, I know that you can use getch() in a loop and output '*' through cout every time.
#edit: getch() is from conio.h. But it may or may not work depending on the...
Thanks a lot. That really helped to put it in perspective and that's definately the kind of flexibility I was thinking about. Right now before I start writing classes and functions, I'm reading "Data...
As a practice project, I'm working on a turn-based battle game with a hexagonal map.
Right now I'm in an early design phase. I'm trying to figure out how to structure everything before I start...
Alright, I sat down and did a little playing around, and then it hit me. If you use the getch() function in conio.h, you should be able to take single characters as input, which will not be displayed...
I would absolutely reccomend at least some design phase before working on a project of any length beyond something absolutely trivial. You'll find that the larger the program, the more revising...
Never mind. I figured it out! I just made this tiny change after reading the list functions more carefully at cppreference.com.
if((*ptr)->destroyed())
{
...
I'm not sure what the cause of this problem is.
I'm working on a space shooter for practice.
I have a list called "object" of all the ships and weapon shots that are active (in my...
Well, I understand the whole point of it, with the whole keeping game speed constant across systems and all. My problem is the concept involved in the implimentation of it.
For example, one...
I'm working on a space shooter to learn Allegro, but working with regulating game speed is still a bit hazy.
I understand volatiles and locking just fine. I was able to program the game to display...
According to the manual at allegro.cc, the rotate_sprite function is as follows:
void rotate_sprite(BITMAP *bmp, BITMAP *sprite, int x, int y, fixed angle);
What exactly is the problem you're...
Were there any blaring nonstandard pieces of code in there that I should avoid in the future? I want to make sure that I'm write code that will compile for everyone else.
I'll do that for now on. Sorry for my lack of compliance with those standards. I'm still trying to get all of those into my head.
-edit-
I've finally got this working. What I did was use a static...
Yup. For every single class I use that.
-edit-
I think I may solve this problem by using integer values to designate the ID of a room, item, or character, and then having a static vector in each...
Where'd you get 319 from?
I can't figure out how to break out of that messed up loop. Room HAS to print out the items in the room, and in order for doors and other "goables" to work, they HAVE to...
I tried your suggestion, Eibro, but it seems to have sent my compiler spiriling into an infinite loop.
The #include's in Item, Room, and Destination all seem to lead the compiler in a big circle....
That's exactly what I do, though. I have the class and its prototypes in a .h file, and then the functions themselves in a .cpp, with an #include of the header at the top.
My current working...
Do you mean that when I include the header from another class, I should put the #include in the .cpp file, not the .h file?
I forgot to post the source. There's a bit of mess in the actual code (I haven't finished neatening it up), but I'm pretty sure the problem is in my implimentation of #include anyway.
I'm making a heavily object oriented text based RPG as a refinement of my skills (I've posted a lot on the game and C++ boards because of problems I've had).
I've been neatening up my code and...
Thank you so much! I hadn't even considered that there was a problem like that in my Room class. When I was doing some rewrites I must have forgotten to put a number in there.
Here's the source. I cleaned it up a bit to make it easier to understand. And as you figured, the change to my setDesc() function didn't solve the problem. For my future reference, why is "const...
I've done some extensive testing on my program since I posted the above problem and am now even more baffled. It will mess up even when I seperate the item data into its own file, load it in an...
This is really, really odd. For a game I'm working on, I'm trying to load the attributes of rooms, items, etc. from a file. I get a very, very strange problem during my loading process.
I've done...