I would think if you need something to happen after a set time from something else you would want to track times and compare them against a constantly ticking clock from the engine.
47 Replies - 2846 Views - Last Post: 27 August 2018 - 09:06 PM
#17
Re: 1945 game
Posted 22 August 2018 - 02:35 PM
What is drawScene_plane_two(); doing?
Forgive my criticism, but your code looks out of whack. You are calling methods from a method which should only be doing one thing, and that's drawing. You should create functions and evaluating parameters in your functions to execute the parameters or sprites you need set/drawn.
Forgive my criticism, but your code looks out of whack. You are calling methods from a method which should only be doing one thing, and that's drawing. You should create functions and evaluating parameters in your functions to execute the parameters or sprites you need set/drawn.
#18
Re: 1945 game
Posted 22 August 2018 - 02:51 PM
well drawScene_plane_two() is drawing the enemy plane. according to post #1 I am using the drawScene() function properly. thanks sheepings
This post has been edited by pbivens85: 22 August 2018 - 02:54 PM
#19
Re: 1945 game
Posted 22 August 2018 - 03:21 PM
Sorry I just read the whole topic now. Modi might be right about 3 posts back. You may need to rejig some of your logic. Incidentally seems you may be drawing over
Might I ask, what engine you are using? I have made 2 games myself in the past, its troublesome work, but keep plugging away at it.
Might I ask, what engine you are using? I have made 2 games myself in the past, its troublesome work, but keep plugging away at it.
#20
Re: 1945 game
Posted 22 August 2018 - 03:40 PM
I am using opengl and c++ I have also made pong and breakout using opengl and c++ I believe my problem is that I am drawing over the collision sprite too soon. thanks sheepings
#21
Re: 1945 game
Posted 23 August 2018 - 03:31 PM
hey sheepings are you good at opengl? can you look at post #1 and #19? I believe I am very close to solving this problem.
#23
Re: 1945 game
Posted 23 August 2018 - 03:49 PM
ok modi123 according to post #16 what functions should I use to get the ticks of the clock.
#24
Re: 1945 game
Posted 23 August 2018 - 03:52 PM
What have you looked into, looked up, or tried?
#25
Re: 1945 game
Posted 23 August 2018 - 04:47 PM
well I have found that clock_t c = clock(); might be useful to me.
#26
Re: 1945 game
Posted 24 August 2018 - 02:23 PM
is clock_t c = clock(); function good for a solution to post #16?
#27
Re: 1945 game
Posted 24 August 2018 - 03:34 PM
What have you researched about it? What have you tried doing to integrate that?
#28
Re: 1945 game
Posted 24 August 2018 - 03:39 PM
I have stubbed out some code with the clock function, I am working on integrating it in my code.
#29
Re: 1945 game
Posted 24 August 2018 - 04:29 PM
Being you are using OpenGL I would have thought that would have been the starting place, but so it goes.
#30
Re: 1945 game
Posted 25 August 2018 - 02:05 PM
well modi123 can you give me a hint on how to use the clock_t start_time = clock(); function into integrating this function into my game.