What's The Right Forum...
-
Pick a bitmap of a world-map. Give each country a unique color. When the user clicks on the bitmap, request the color of the pixel that has been clicked. Lookup in the dictionary which country the color was mapped to.
Bastard Programmer from Hell :suss: if you can't read my code, try converting it here[^]
That is a great answer. Very practical for many purposes.
-
Probably the forum that fits whatever language you are developing the game with. There isn't a forum specific for XNA here at CP. Maybe Microsoft has forums for XNA, it's been a while since I've played around with XNA. As far as being able to tell where someone is clicking on a map in a game, it can't be any more than checking an event handler for the click and seeing what the coordinates are on the screen.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
Actually, in XNA, you don't get event handlers if you're not mixing it with WPF/WinForms/whatever, so that's more complicated than that. And yes, there is an official XNA forum to discuss and get help: http://forums.create.msdn.com/forums/[^]
'As programmers go, I'm fairly social. Which still means I'm a borderline sociopath by normal standards.' Jeff Atwood 'I'm French! Why do you think I've got this outrrrrageous accent?' Monty Python and the Holy Grail
-
CDP1802 wrote:
you can use the same data structures to render the polygons and perform the hit test on the GPU.
Exactly, like I said, you seldom have to roll your own.
So how do you learn? Of course, there are many full featured engines out there, that doesn't mean one shouldn't learn at least partly how they work.
'As programmers go, I'm fairly social. Which still means I'm a borderline sociopath by normal standards.' Jeff Atwood 'I'm French! Why do you think I've got this outrrrrageous accent?' Monty Python and the Holy Grail
-
Kevin Your best bet would be the App Hub forums for XNA at http://forums.create.msdn.com/forums/[^] Stack Overflow also provide pretty good XNA support. Be prepared for a lot of frustration getting started......
www.it-workplace.com
"If a man speaks in a forest where there is no woman to hear him, is he still wrong?"Andrew Wiles wrote:
Stack Overflow also provide pretty good XNA support.
And gamedev.stackexchange.com[^] too.
'As programmers go, I'm fairly social. Which still means I'm a borderline sociopath by normal standards.' Jeff Atwood 'I'm French! Why do you think I've got this outrrrrageous accent?' Monty Python and the Holy Grail
-
Pick a bitmap of a world-map. Give each country a unique color. When the user clicks on the bitmap, request the color of the pixel that has been clicked. Lookup in the dictionary which country the color was mapped to.
Bastard Programmer from Hell :suss: if you can't read my code, try converting it here[^]
That might be a very good or a terrible solution, depending on the scale of the map ;) I would add that you would probably use two bitmaps: one to display a nice looking map, and one with flat colors to do the hit-testing.
'As programmers go, I'm fairly social. Which still means I'm a borderline sociopath by normal standards.' Jeff Atwood 'I'm French! Why do you think I've got this outrrrrageous accent?' Monty Python and the Holy Grail
-
That might be a very good or a terrible solution, depending on the scale of the map ;) I would add that you would probably use two bitmaps: one to display a nice looking map, and one with flat colors to do the hit-testing.
'As programmers go, I'm fairly social. Which still means I'm a borderline sociopath by normal standards.' Jeff Atwood 'I'm French! Why do you think I've got this outrrrrageous accent?' Monty Python and the Holy Grail
-
Do you all guys have too much memory and don't know what to do with it?
At least artificial intelligence already is superior to natural stupidity
My PC has 16GB yes ;p I've started my post by saying this using bitmaps could be a terrible idea, it all depends on the project (design, hardware target, etc...).
'As programmers go, I'm fairly social. Which still means I'm a borderline sociopath by normal standards.' Jeff Atwood 'I'm French! Why do you think I've got this outrrrrageous accent?' Monty Python and the Holy Grail
-
CDP1802 wrote:
you can use the same data structures to render the polygons and perform the hit test on the GPU.
Exactly, like I said, you seldom have to roll your own.
-
My PC has 16GB yes ;p I've started my post by saying this using bitmaps could be a terrible idea, it all depends on the project (design, hardware target, etc...).
'As programmers go, I'm fairly social. Which still means I'm a borderline sociopath by normal standards.' Jeff Atwood 'I'm French! Why do you think I've got this outrrrrageous accent?' Monty Python and the Holy Grail
-
Who does not at least have an i7, 16 GB and a GTX 580? :)
At least artificial intelligence already is superior to natural stupidity
Me, my graphic card is rather old ;p The Xbox360 and Windows Phones too (possible targets for XNA).
'As programmers go, I'm fairly social. Which still means I'm a borderline sociopath by normal standards.' Jeff Atwood 'I'm French! Why do you think I've got this outrrrrageous accent?' Monty Python and the Holy Grail
-
Uhm, you do know that that means that he must set up custom data structures and custom shaders?
At least artificial intelligence already is superior to natural stupidity
I think we might have a language issue here. You seem to be saying he can use the same data structures as those "ou find in a pixel shader or a vertex shader" and perform the hit test on the GPU, right?
-
Me, my graphic card is rather old ;p The Xbox360 and Windows Phones too (possible targets for XNA).
'As programmers go, I'm fairly social. Which still means I'm a borderline sociopath by normal standards.' Jeff Atwood 'I'm French! Why do you think I've got this outrrrrageous accent?' Monty Python and the Holy Grail
-
Do you all guys have too much memory and don't know what to do with it?
At least artificial intelligence already is superior to natural stupidity
1 Gb physical, and some swap-space. A 320x200 bitmap, scaled to 640x400 would still look "decent". Not much wasted space if you only use a few colours. As for practicality; you might want to use two worldmaps, one where you can select a continent, then a version where you select the country. That way you limit the colours you need :) Next!
Bastard Programmer from Hell :suss: if you can't read my code, try converting it here[^]