well i know i could do it that way, but my classes are in .cpp files, and i thought you weren't supposed to #include cpp files, only header files. is there a way to do it this way, or should i just...
Type: Posts; User: m00se123
well i know i could do it that way, but my classes are in .cpp files, and i thought you weren't supposed to #include cpp files, only header files. is there a way to do it this way, or should i just...
can you do class prototypes like functions. My problem is that i have two .cpp files and one uses a class from another. i have tile.cpp, which has the class tile, and i have layer.cpp, which has...
as my game projects become bigger i find im having trouble planning them out well and keeping them organized. what kind of sytems do you guys use for keeping your code organized, like how do you...
i have gotten the paddle to ball and the wall collisions working, but i can't get the ball to block collisions working good. I think the prob is because i am usualy moving the ball 5 units at a...
are you using dbl buffer, cause when i use it there is no blur at all. also if you want to see the source for the snake game i made w/ allgero just ask. it is pretty simple, so you should be able...
i just finished a game in allegro and this i what i did to conrol game speed. you update the screen and keyboard input every loop, but you only change the objects position after so much time. heres...
this is my first game in c++, it is a snake clone called nibbles. check it out and tell me what you think. i may add a few things, but it runs good now.
...
so i can't just us cin, why not?
yes im using allegro for my gfx and other things. And im not a complete dumb ass, im just a little comfused.
no im not programming w/ win32 api, i don't know that yet, but when i started i selected win32 app in msvc++ 6.
i could post the whole code, but it prolly wouldn't help, i will put a piece of it up..
char player_name[30];
void sort_high_scores(void)
{
int i;
my game is 99.9 % complete and now i have a prob using cin.
i just need to prompt the user for their name for high score, but when i use cin, nothing happens in my program. i compiles right. what...
nevermind just had to use strcpy(.....)
heres the prob
high_score_name[i] = high_score_name[i-1];
when i compile it says "=": left operand must be l-value
my array is defined as
char high_score_name[10][30];
i tried time(), and it will only return whole seconds, it looks like gettime() does the same, only w/ hour min, sec, and i couldn't find any info on timegettime()
can some help me out some more?
Im making a snake game and i need some help figuring out how to control the snake speed, and make it the same speed on all machines. i want the snake to move a couple times every second, or...
thanks for the help
i want to make a high score list for my game, but i can't figure out how to read and write integers from a file.
ok i figured it out
x=20*((rand() % (SCREEN_X - 80)/20) + 2);
thanks for your help
that creates numbers in the rt range, but they are not factores of 20. also why is it SCREEN_X-80.
i don't know if i mentioned that my prog does end, it just doesn't ever make to the end. i used the exit function to get out, and before i call that i call my own function to clean everything up. ...
ok i am having a little trouble generating random numbers betwen a range. i want the number to be between 40 and SCREEN_X-40 and also be a factor of 20. I had it working, but i somehow screwed it...
i'm just wondering if it is bad to leave loops and then never finish them. For instance, if i was in the game loop, called the main menu, and then called the game loop, without every getting to the...
thanks for the help
ok i have been programming for a while, but started learning c++ a while ago. i am working on a graphical snake game and have a lil prob. first i will show an example so you see my prob. this is...