Search found 78 matches
- Fri Oct 15, 2010 8:34 pm
- Forum: Programming Discussion
- Topic: How do you keep interest?
- Replies: 14
- Views: 1101
How do you keep interest?
I've been trying to learn c++ for quite a while now, but i always hit the SAME problem. I love programming, but i just HATE making text based games. Im no where near ready to start messing with SDL, so what do i do? Is there an engine that handles the graphics side of things? I think that is exactly...
- Thu Sep 30, 2010 10:06 am
- Forum: Programming Discussion
- Topic: Can someone explain this?
- Replies: 7
- Views: 543
Re: Can someone explain this?
It could be a 24-bit integer converter - sometimes this is used when specifying image colours, RGBA. That could take the 4 byte size components of colour... red, green, blue, and alpha - then store them in a double word integer. yeah... but it's not exactly the best idea... it should be shifts and ...
- Thu Sep 30, 2010 8:45 am
- Forum: Programming Discussion
- Topic: Can someone explain this?
- Replies: 7
- Views: 543
Re: Can someone explain this?
It could be a 24-bit integer converter - sometimes this is used when specifying image colours, RGBA. That could take the 4 byte size components of colour... red, green, blue, and alpha - then store them in a double word integer. This actually helped me a lot. I just read an article regarding color ...
- Thu Sep 30, 2010 6:46 am
- Forum: Programming Discussion
- Topic: Can someone explain this?
- Replies: 7
- Views: 543
Can someone explain this?
I'm having a little trouble understanding this line of code: var = (16777216 * data[0]) + (65536 * data[1]) + (256 * data[2]) + data[3]; What is its use? I get that all of these numbers are powers of twos, with the power increasing by 8 every time. I just dont get what it is used for, can someone pl...
- Thu Jul 22, 2010 1:28 am
- Forum: Programming Discussion
- Topic: Weird SDL error?
- Replies: 3
- Views: 467
Re: Weird SDL error?
I've found that Visual C++ 2010 gives weird errors with things...I'm not sure if this is the case with your problem, but it might be. If no one knows a answer, you may want to try your code in Visual C++ 2008. That switch fixed a problem I had several months ago, it was weird... No luck on Dev-c++ ...
- Wed Jul 21, 2010 9:58 pm
- Forum: Programming Discussion
- Topic: Weird SDL error?
- Replies: 3
- Views: 467
Weird SDL error?
1>c:\cpp_libs\sdl-1.2.14\include\sdl\sdl_config.h(34): fatal error C1189: #error : You should copy include/SDL_config.h.default to include/SDL_config.h I've been trying to google the answer, but i really cant find out why its throwing this error at me. I followed THIS tutorial to a tea, so i dont u...
- Mon Jul 19, 2010 11:03 am
- Forum: Programming Discussion
- Topic: My first game
- Replies: 8
- Views: 771
Re: My first game
It looks like you have a few 'questions' in comments within the code, so I'll go ahead and answer them. 1.) So if you don't want to have to specify any dimensions of an array, you might want to try dynamically allocating the array itself, or since your using C++, a vector of vectors can also work w...
- Mon Jul 19, 2010 7:55 am
- Forum: Programming Discussion
- Topic: My first game
- Replies: 8
- Views: 771
My first game
Hai everyone, i made my very first game (hmm very first app for that matter) today, and decided to share the source with all of you. If something can be optimized, or you can answer one of my commented questions, please do tell me. Its just a little text-based hangman game, but im a little proud of ...
- Sun Jul 18, 2010 2:29 am
- Forum: Programming Discussion
- Topic: [SOLVED] Console application question
- Replies: 6
- Views: 395
Re: Console application question
ok lol.X Abstract X wrote:Everyone's been there, don't be afraid to ask anything.
going to add solved to the tittle now, thanks again for the help guys :D.
- Sun Jul 18, 2010 2:18 am
- Forum: Programming Discussion
- Topic: [SOLVED] Console application question
- Replies: 6
- Views: 395
Re: Console application question
Here is a simple solution. The program is sequential so what we do is return to the start of the program so long as the conditions to exit haven't been met. #include<conio.h> void main() { bool exit=false; while(!exit) { if(kbhit()) if(getch()=='q') exit=true; } } Ohh nice, thanks. EDIT: Is there a...
- Sun Jul 18, 2010 1:50 am
- Forum: Programming Discussion
- Topic: [SOLVED] Console application question
- Replies: 6
- Views: 395
Re: Console application question
Here is a simple solution. The program is sequential so what we do is return to the start of the program so long as the conditions to exit haven't been met. #include<conio.h> void main() { bool exit=false; while(!exit) { if(kbhit()) if(getch()=='q') exit=true; } } Ohh nice, thanks. EDIT: Is there a...
- Sun Jul 18, 2010 1:09 am
- Forum: Programming Discussion
- Topic: [SOLVED] Console application question
- Replies: 6
- Views: 395
[SOLVED] Console application question
I decided to take up c++ and make a simple console game. Im just wondering if there is a way to stop the console from closing until i call a certain function (maybe OnGameModeEnd) ? I know of system("pause"); but its not exactly what im looking for.
- Wed Jul 14, 2010 12:12 am
- Forum: Programming Discussion
- Topic: A small coding question
- Replies: 16
- Views: 1394
Re: A small coding question
It's almost 8:00am now, my head is spinning in all these sketches I'm making, I'm probably overcomplicating this. I'm going to bed, I'll have another look tomorow. I'm pretty sure I have this all worked out if I can figure out how to calculate one angle that I'm missing. Ok, keep me posted :D. If y...
- Tue Jul 13, 2010 5:47 am
- Forum: Programming Discussion
- Topic: A small coding question
- Replies: 16
- Views: 1394
Re: A small coding question
Hey that's too bad, ye I should have used greek letters to distinguish but I couldn't remember the alt-codes for any lol. Anyway, I'm completely confused by your situation. How can you have a player shoot a soccer ball in your game if you don't know the angle at which the ball gets kicked? I'm real...
- Tue Jul 13, 2010 5:23 am
- Forum: Programming Discussion
- Topic: A small coding question
- Replies: 16
- Views: 1394
Re: A small coding question
I look forward to hearing back with your results. I started the conversion to PAWN, when i relized that i was using X,Y,Z as the players coordinates, and that they are NOT coordinates lol / are angles. I dont have any means of getting these angles unfortunately, any way to work around this ? (every...