![]() |
| ||
| bouncing ball project first of all, I wanna say hi to u all as I'm new to daniweb. I'm a freshman in a college so I don't know much of c yet. So please be understanding in case that I will ask some n00b question later on :) So this is my problem...first one I was using this code to get input from player to move the pad right and left while(i<10)but I ended up getting right movement with anykey pressed also another problem is getting the ball move as the time passed (I have no idea how to) |
| ||
| Re: bouncing ball project > mov==getch(); > if(mov='d')//supposed to be right arrow, don't know how to You got them both wrong = is for assignment (the first one) == is for comparison (the second one) |
| ||
| Re: bouncing ball project Yay...thanks, Salem New things for me :) but how about my second question about time-based movement? or rather I called GUI in C? is it even possible? if it is, please refer me to the materials. thanks a bunch though ^^ |
| ||
| Re: bouncing ball project Which OS / Compiler are you using? Sure it's possible, but it won't be standard C anymore. |
| ||
| Re: bouncing ball project I'm using Borland C++ 5.0 in windows xp I'm not sure which version my compiler is though... What do you mean about not standard C anymore? Is it about making and using custom library? I've downloaded a source of snake game and I saw some custom *.h files included in it...what I'm curious about is how to produce our own library, I mean what kind of IDE supports making of *.h library? Can you provide me some simple examples of *.h source? I'm sorry for asking so much question XD |
| ||
| Re: bouncing ball project > What do you mean about not standard C anymore? Meaning you can no longer pick a random C compiler (say for your Cray supercomputer or your mobile phone), and have your program work on all of them. > Is it about making and using custom library? Not necessarily. It could just be using the header files which describe the API of the OS you happen to be using. The Win32 API for example has many useful things which could be used to solve this problem. Check out the console tutorials here http://www.adrianxw.dk/SoftwareSite/index.html |
| ||
| Re: bouncing ball project LoL I almost got headache. No doubt it is not standard C anymore. I haven't solved my problem yet, but as it's too advanced for me to solve, let's suppose it's solved. At least I know where to find tutorial if I confuse myself with this kind of problem in the future. Again, Tons of Thanks to Salem :) -Problem's solved- |
| All times are GMT -4. The time now is 3:43 am. |
Forum system based on vBulletin Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
©2003 - 2010 DaniWeb® LLC