Ok so I wish to make a 2D defending game where you control a archer or ballista and fire at incoming units. But for the aiming it would be really useful for some kind of guide that shows you approx where the projectile would go more or less, something like this
So before you even have shot you can see kinda where its going to land
Whats the "best" method for this? At least any method...?
Aiming guideline?
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
- jag_e_nummer_ett
- Citizen
- Posts: 52
- Joined: Thu May 16, 2013 6:31 pm
- Location: Stockholm, Sweden
Re: Aiming guideline?
That depends a bit on how you made the bullet. Also you should post questions and "help me" stuff in the "Support and Development" Sub forum and not in "General".jag_e_nummer_ett wrote:Ok so I wish to make a 2D defending game where you control a archer or ballista and fire at incoming units. But for the aiming it would be really useful for some kind of guide that shows you approx where the projectile would go more or less, something like this
So before you even have shot you can see kinda where its going to land
Whats the "best" method for this? At least any method...?
- jag_e_nummer_ett
- Citizen
- Posts: 52
- Joined: Thu May 16, 2013 6:31 pm
- Location: Stockholm, Sweden
Re: Aiming guideline?
the projectiles will vary in speed, damage, and size/design, but i think only speed is relevant to this question.Jeeper wrote: That depends a bit on how you made the bullet. Also you should post questions and "help me" stuff in the "Support and Development" Sub forum and not in "General".
sorry forgot about that, is there a way to move it or do i remake it?
Re: Aiming guideline?
Somewhere in your code you have a function that simulates the bullet for one frame (with dt). Put this into a loop (within one frame) to simulate multiple frames. That way you can for example predict the position of the bullet after one second, after two seconds and so on. Use these points to draw a line.
Check out my blog on gamedev
- jag_e_nummer_ett
- Citizen
- Posts: 52
- Joined: Thu May 16, 2013 6:31 pm
- Location: Stockholm, Sweden
Re: Aiming guideline?
Alright I have to try that!micha wrote:Somewhere in your code you have a function that simulates the bullet for one frame (with dt). Put this into a loop (within one frame) to simulate multiple frames. That way you can for example predict the position of the bullet after one second, after two seconds and so on. Use these points to draw a line.
Who is online
Users browsing this forum: Ahrefs [Bot], Semrush [Bot] and 6 guests