Jump to content
  • Advertisement
markshaw001

2D need help in making a simple radar for game

This topic is 420 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

hi i am new to opengl can someone here tell me how to render this 2d shape i want to make curve or arc in 2d in between two lines its a rough sketch i made i tried the internet but could not find much help beacuse their were no specific tutorials of making arcs or curves

Untitled.png

Share this post


Link to post
Share on other sites
Advertisement

The exact same way you draw a normal line just put points on a mathematical curve.

For tutorials on this you need to search the name of the curve you want. For example I found this:  http://www.openglprojects.in/2015/12/drawing-bezier-curves-in-opengl-c.html#gsc.tab=0 while searching for " opengl bezier curve tutorial".

Edit: For a radar you will have a much easier time using sprite sheets.

Edited by Scouting Ninja

Share this post


Link to post
Share on other sites

thanks for replying @Scouting Ninja i have another question can i render an texture or draw anything behind sprite sheet 

behind the arc i need render some dots or an image can it be done.

Edited by markshaw001

Share this post


Link to post
Share on other sites
13 minutes ago, markshaw001 said:

can i render an texture or draw anything behind sprite sheet 

If it has a alpha yes. Alpha sorting is a bit of a pain when your new however it is important so learning it isn't a bad idea.

Have you considered using a engine or is learning how to do these things your main goal?

Share this post


Link to post
Share on other sites

i have not tried an engine i am a little familiar with unity developed a small game for a semester project but the main goal is to develop in opengl or some other API without using an engine 

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!