1945 game

  • (4 Pages)
  • +
  • 1
  • 2
  • 3
  • 4

47 Replies - 1781 Views - Last Post: 27 August 2018 - 09:06 PM Rate Topic: *---- 2 Votes

#16 modi123_1   User is offline

  • Suitor #2
  • member icon



Reputation: 14693
  • View blog
  • Posts: 58,724
  • Joined: 12-June 08

Re: 1945 game

Posted 22 August 2018 - 02:24 PM

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.
Was This Post Helpful? 0
  • +
  • -

#17 Sheepings   User is offline

  • Senior Programmer
  • member icon

Reputation: 173
  • View blog
  • Posts: 1,029
  • Joined: 05-December 13

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.
Was This Post Helpful? 0
  • +
  • -

#18 pbivens85   User is offline

  • D.I.C Addict

Reputation: -13
  • View blog
  • Posts: 507
  • Joined: 22-October 13

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

Was This Post Helpful? 0
  • +
  • -

#19 Sheepings   User is offline

  • Senior Programmer
  • member icon

Reputation: 173
  • View blog
  • Posts: 1,029
  • Joined: 05-December 13

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.
Was This Post Helpful? 0
  • +
  • -

#20 pbivens85   User is offline

  • D.I.C Addict

Reputation: -13
  • View blog
  • Posts: 507
  • Joined: 22-October 13

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
Was This Post Helpful? 0
  • +
  • -

#21 pbivens85   User is offline

  • D.I.C Addict

Reputation: -13
  • View blog
  • Posts: 507
  • Joined: 22-October 13

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.
Was This Post Helpful? 0
  • +
  • -

#22 modi123_1   User is offline

  • Suitor #2
  • member icon



Reputation: 14693
  • View blog
  • Posts: 58,724
  • Joined: 12-June 08

Re: 1945 game

Posted 23 August 2018 - 03:42 PM

Post #19 is not your most recent code.

You have also not addressed the straight forward issue of your two sprites drawing on top of each other at the same time by what I said in post 16.
Was This Post Helpful? 0
  • +
  • -

#23 pbivens85   User is offline

  • D.I.C Addict

Reputation: -13
  • View blog
  • Posts: 507
  • Joined: 22-October 13

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.
Was This Post Helpful? 0
  • +
  • -

#24 modi123_1   User is offline

  • Suitor #2
  • member icon



Reputation: 14693
  • View blog
  • Posts: 58,724
  • Joined: 12-June 08

Re: 1945 game

Posted 23 August 2018 - 03:52 PM

What have you looked into, looked up, or tried?
Was This Post Helpful? 0
  • +
  • -

#25 pbivens85   User is offline

  • D.I.C Addict

Reputation: -13
  • View blog
  • Posts: 507
  • Joined: 22-October 13

Re: 1945 game

Posted 23 August 2018 - 04:47 PM

well I have found that clock_t c = clock(); might be useful to me.
Was This Post Helpful? 0
  • +
  • -

#26 pbivens85   User is offline

  • D.I.C Addict

Reputation: -13
  • View blog
  • Posts: 507
  • Joined: 22-October 13

Re: 1945 game

Posted 24 August 2018 - 02:23 PM

is clock_t c = clock(); function good for a solution to post #16?
Was This Post Helpful? 0
  • +
  • -

#27 modi123_1   User is offline

  • Suitor #2
  • member icon



Reputation: 14693
  • View blog
  • Posts: 58,724
  • Joined: 12-June 08

Re: 1945 game

Posted 24 August 2018 - 03:34 PM

What have you researched about it? What have you tried doing to integrate that?
Was This Post Helpful? 0
  • +
  • -

#28 pbivens85   User is offline

  • D.I.C Addict

Reputation: -13
  • View blog
  • Posts: 507
  • Joined: 22-October 13

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.
Was This Post Helpful? 0
  • +
  • -

#29 modi123_1   User is offline

  • Suitor #2
  • member icon



Reputation: 14693
  • View blog
  • Posts: 58,724
  • Joined: 12-June 08

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.
Was This Post Helpful? 0
  • +
  • -

#30 pbivens85   User is offline

  • D.I.C Addict

Reputation: -13
  • View blog
  • Posts: 507
  • Joined: 22-October 13

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.
Was This Post Helpful? -1
  • +
  • -

  • (4 Pages)
  • +
  • 1
  • 2
  • 3
  • 4