Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Reading pixels

Author
Message
Techathon
14
Years of Service
User Offline
Joined: 26th Apr 2010
Location:
Posted: 11th Sep 2010 22:51
I am making a nation game based on a forum game that I started. Would it be possible to have the game be able to distinguish the water colour (blue) and also the borders (black)? I want it to be able to not want to put a nation in the water, and move the borders.

Ever want to take part in the best game series ever to grace Geek Culture? Then join the Nation Fourm Game.
Current Game: NFG: Peak of Confusion
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 11th Sep 2010 22:57
You can use the POINT function to read the colour of a pixel on a bitmap or the screen.

That's the simple answer, but depending on exactly how you place these nations, that may not be the best way - you haven't provided enough info to tell though.

Utility plug-ins (26-JUL-2010)
I'm applying terms of use that require you to wear a red nose and honk a horn whenever you use the Internet
Techathon
14
Years of Service
User Offline
Joined: 26th Apr 2010
Location:
Posted: 11th Sep 2010 23:08
I plan on making them be placed in a different Image software and a 1px thick black line would be the border.(for now) and then the game read the borders placed and determine the nations.

Ever want to take part in the best game series ever to grace Geek Culture? Then join the Nation Fourm Game.
Current Game: NFG: Peak of Confusion
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 11th Sep 2010 23:28
Ah, I understand - you are drawing a map with the nations already marked out.

Do you have a method of determining which nation is selected?
That problem is one of the reasons that a lot of games with countries or nations use either a square or hex grid - it makes it easier to identify which nation is selected.

Utility plug-ins (26-JUL-2010)
I'm applying terms of use that require you to wear a red nose and honk a horn whenever you use the Internet
Techathon
14
Years of Service
User Offline
Joined: 26th Apr 2010
Location:
Posted: 11th Sep 2010 23:36
It is a simulator.

Ever want to take part in the best game series ever to grace Geek Culture? Then join the Nation Fourm Game.
Current Game: NFG: Peak of Confusion

Login to post a reply

Server time is: 2024-09-28 22:25:55
Your offset time is: 2024-09-28 22:25:55