The Daily Click ::. Forums ::. Non-Klik Coding Help ::. Programming Logic - Restricted Area Selection
 

Post Reply  Post Oekaki 
 

Posted By Message

HorrendousGames

Sourpuss

Registered
  31/10/2009
Points
  481

VIP MemberEvil klikerGame Of The Week Winner
11th October, 2010 at 04:12:55 -

Hey everyone, I figured I'd ask around for a question that's stumping myself and my programmer. It seems like such a simple aspect but apparantly it's not.

Basically, we're got a game board set up with several varying sized and shaped areas that are selectable. Once a player selects an area they possess, they can issue orders to that area. However, this is where our problem occurs, the player needs to be restricted to being able to give orders to the starting area itself and the areas adjacent to that area.

We have a few solutions but none of them are really as elastic as we'd like. Obviously we could load a number for each area and the neighbors for each area from a txt file or whatever, but we would rather have a one size fits all approach to this.

If you need me to explain this further, please let me know, I think I explained it correctly, but it doesn't matter what I think about how I've explained it.

 
/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/
That Really Hot Chick
now on the Xbox Live Marketplace!

http://marketplace.xbox.com/en-US/Product/That-Really-Hot-Chick/66acd000-77fe-1000-9115-d80258550942

http://www.create-games.com/project.asp?view=main&id=2160

Cecilectomy

noPE

Registered
  19/03/2005
Points
  305

Has Donated, Thank You!VIP MemberWeekly Picture Me This Winner!Cardboard BoxGhostbuster!Pokemon Ball!ComputerBox RedSanta HatSnowman
I am an April Fool
11th October, 2010 at 04:21:18 -

with more complicated questions, the use of diagrams, or psuedocode to what youre problem is, helps tremendously in getting the answer you want. the more information you get, the better answer you will get.

if im understanding the question correctly, would it not just be easiest to use a variation of a pathfinding algorithm? to find the areas selectable adjacent to the players possessed areas?

or just fill the areas with numbers recording which is the starting point, and which numbers are allocated to which areas. then decide which areas are selectable according to those?

 
n/a

UrbanMonk

BRING BACK MITCH

Registered
  07/07/2008
Points
  49566

Has Donated, Thank You!Little Pirate!ARGH SignKliktober Special Award TagPicture Me This Round 33 Winner!The Outlaw!VIP MemberHasslevania 2!I am an April FoolKitty
Picture Me This Round 32 Winner!Picture Me This Round 42 Winner!Picture Me This Round 44 Winner!Picture Me This Round 53 Winner!
11th October, 2010 at 04:23:51 -

Telling us how the data about the "areas" is stored could help too.

 
n/a

HorrendousGames

Sourpuss

Registered
  31/10/2009
Points
  481

VIP MemberEvil klikerGame Of The Week Winner
11th October, 2010 at 04:51:35 -

That'll do it Cecil, we came up with a good solution looking at it from that angle, now we just need to impliment it, I'll let you know how it goes. We've been pretty good about using flowcharts and psudocode (which is about all I'm good for when it comes to programming anyways), we were just looking at this one the completely wrong way. But thanks!

@Urbanmonk, they currently really don't have any data other than it's center point.

 
/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/
That Really Hot Chick
now on the Xbox Live Marketplace!

http://marketplace.xbox.com/en-US/Product/That-Really-Hot-Chick/66acd000-77fe-1000-9115-d80258550942

http://www.create-games.com/project.asp?view=main&id=2160

UrbanMonk

BRING BACK MITCH

Registered
  07/07/2008
Points
  49566

Has Donated, Thank You!Little Pirate!ARGH SignKliktober Special Award TagPicture Me This Round 33 Winner!The Outlaw!VIP MemberHasslevania 2!I am an April FoolKitty
Picture Me This Round 32 Winner!Picture Me This Round 42 Winner!Picture Me This Round 44 Winner!Picture Me This Round 53 Winner!
11th October, 2010 at 05:20:01 -

Maybe you should start a project page about your project here on the site.

Who knows, you might get a few fans.

 
n/a

HorrendousGames

Sourpuss

Registered
  31/10/2009
Points
  481

VIP MemberEvil klikerGame Of The Week Winner
11th October, 2010 at 06:49:06 -

Grand idea!

 
/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/
That Really Hot Chick
now on the Xbox Live Marketplace!

http://marketplace.xbox.com/en-US/Product/That-Really-Hot-Chick/66acd000-77fe-1000-9115-d80258550942

http://www.create-games.com/project.asp?view=main&id=2160

Muz



Registered
  14/02/2002
Points
  6499

VIP MemberI'm on a BoatI am an April FoolHonored Admin Alumnus
14th October, 2010 at 21:03:30 -


Originally Posted by HorrendousGames
That'll do it Cecil, we came up with a good solution looking at it from that angle, now we just need to impliment it, I'll let you know how it goes. We've been pretty good about using flowcharts and psudocode (which is about all I'm good for when it comes to programming anyways), we were just looking at this one the completely wrong way. But thanks!



Lol, if only all problems were sort of solved this easily But yeah, if you just make a flowchart to explain the thing better, sometimes you better understand how to do it.



 
Disclaimer: Any sarcasm in my posts will not be mentioned as that would ruin the purpose. It is assumed that the reader is intelligent enough to tell the difference between what is sarcasm and what is not.

Image

HorrendousGames

Sourpuss

Registered
  31/10/2009
Points
  481

VIP MemberEvil klikerGame Of The Week Winner
16th October, 2010 at 07:37:55 -


Originally Posted by Muz

Originally Posted by HorrendousGames
That'll do it Cecil, we came up with a good solution looking at it from that angle, now we just need to impliment it, I'll let you know how it goes. We've been pretty good about using flowcharts and psudocode (which is about all I'm good for when it comes to programming anyways), we were just looking at this one the completely wrong way. But thanks!



Lol, if only all problems were sort of solved this easily But yeah, if you just make a flowchart to explain the thing better, sometimes you better understand how to do it.




Damn straight!

Oh, and I guess I should've mentioned that we did get this problem fixed, like 10 minutes after my last post in this thread. It actually solved like 10 other problems as well. Maybe I'm under/over exaderating?

 
/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/
That Really Hot Chick
now on the Xbox Live Marketplace!

http://marketplace.xbox.com/en-US/Product/That-Really-Hot-Chick/66acd000-77fe-1000-9115-d80258550942

http://www.create-games.com/project.asp?view=main&id=2160
   

Post Reply



 



Advertisement

Worth A Click