Ultimate Amiga

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: define area like defender of the crown  (Read 3133 times)

0 Members and 1 Guest are viewing this topic.

rednova

  • A600
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 225
    • http://www.feryogi.com
define area like defender of the crown
« on: February 11, 2015, 02:21:07 AM »

Dear Amos Friends:

I want to make a strategy amos game in amiga. I would like to make a map with different countries,
and then, like in defender of the crown, to be able to as you move the mouse thru a defined area,
be able to pick the right country. Is it possible to do this in amospro ?  I have both v 1 and v2 amospro.
Please help me !!!
Logged
-mobilis in mobile-

SamuraiCrow

  • compile-time wierdo
  • Forum Mod
  • A1200
  • *****
  • Karma: 5
  • Offline Offline
  • Gender: Male
  • Posts: 946
  • Compile-time wierdo
Re: define area like defender of the crown
« Reply #1 on: February 11, 2015, 06:30:40 AM »

This is done using discrete math.  It is called graph theory.

The way it works is to define an "arc" between each adjacent border.  If there is a cost difference that will be the "weight" of each arc.

To be able to highlight the countries individually you'll need to define each one as a bob.  You can use collision detection to figure out which the mouse is over.
« Last Edit: February 11, 2015, 06:36:53 AM by SamuraiCrow »
Logged

rednova

  • A600
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 225
    • http://www.feryogi.com
Re: define area like defender of the crown
« Reply #2 on: February 12, 2015, 01:13:39 AM »

Hi:
Your suggestion is excellent and I believe I can do it now.
Great idea to make each country as a bob and then use collision detection to know which
is which. Thank you !!!
Logged
-mobilis in mobile-
Pages: [1]   Go Up
 

TinyPortal 2.2.2 © 2005-2022