hiya - i'm making a new game and want to know how to make a simple rounded race track. i've done everything else but want to know what to use.
I've tried g.fillRoundRect(left.x,left.y,left.width,left.height,left.arcWidth,left.arcHeight);
but an error pops up
can anyone help - i want to make a simple race track like this one.
cambridgegal300 0
Newbie Poster
Recommended Answers
Jump to PostWhy not g.fillOval()?
Also, will repainting be an issue? How much detail will be displayed on your screen? Are you at all using images?
A lot of questions come to mind since this seems like an interesting project.
Jump to PostThere are a lot of questions...
First, will resizing the screen be an issue at all? If not then you could make a custom track using GeneralPath and Graphics2D fairly easily.
You could do so even with resizing but it would be a bit harder.
What error …
Jump to PostThese two parameter define if you are getting circle or oval/ellipse shape. So if the width and height are equal you drawing circle, if they are of different size you get oval. More on topic can be found at Sun tutorial:
All 11 Replies
Alex Edwards 321
Posting Shark
cambridgegal300 0
Newbie Poster
Alex Edwards 321
Posting Shark
cambridgegal300 0
Newbie Poster
peter_budo 2,532
Code tags enforcer Team Colleague Featured Poster
cambridgegal300 0
Newbie Poster
Ezzaral 2,714
Posting Sage Team Colleague Featured Poster
cambridgegal300 0
Newbie Poster
peter_budo 2,532
Code tags enforcer Team Colleague Featured Poster
cambridgegal300 0
Newbie Poster
Ezzaral 2,714
Posting Sage Team Colleague Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.