Jump to content

Dune Risk


nampigai

Recommended Posts

Hi new Here, funny you should mention this idea of a Riskbased dune game.. becouse me and my palls made on about 5 years ago, for armies we used models from the old GW game "Epic 40000" works nice when you paint them in different schemes.. We modified the rules for this game too, so that i wouldnt be to much like risk.. becouse the armies of Atreides, Harkonnen, "ordos" Sardukar, and fremen etc. etc are so different we made up our own rules. we are all veterans of warhammer games... also becouse the whole idea of the game would be the control of the spice, we also made up a political, diplomatic system that would make it even more fun to play, like having other houses of the landsraad help you by sending reinforcements, and having the sardukar shifting sides.. well what i want to have said is that i can try to get our "old" stuff sent to whom ever wants them.. you might even wnt to change some of it to work even better.. // Brian

Link to comment
Share on other sites

  • 3 weeks later...

What i was thinking:

For example you have a map, just any dune map.

This, you split into squares with each square a region. There'll be  colored DOT on the square.

For example, there are 9 squares, and 6 colors, there'll be 6 colors for region 1, 6 for 2, etc.

You can use javascript to toggle them, and the # of units located there with css i think.

Calculations you can do with PHP. Save the data using MySQL.

---

SO: You login (through IE, mozilla or whatever browser)

If it's your turn you are redirected to the MAP.

On the MAP are shown everyone's territories and how many units they have there. Clicking on a region will ATTACK it.

*calculate, calculate etc etc, rpeat till either side's units are smaller than or equal to 0. ('if' functions in php)

And after that the data is saved into the MySQL database.

Link to comment
Share on other sites

  • 3 weeks later...
  • 1 month later...

I'm not sure if this will work with whatever scripting language you finally decide to use but if I want to quickly and simply program a map/board into a game without having to resort to geometry I usually create a regional indice matrix that partitions off the map into hundreds or thousands of tiles of a uniform demention in pixels, depending on how large the map is and how accurately I want the program to interpret it.

Link to comment
Share on other sites

  • 2 weeks later...
  • 10 months later...

I was asked in Private Message to elaborate on my suggestion of how to program maps to have odd-shaped regions without having to resort to geometry.  Since someone else some day down the road might also be curious, I've decided to respond here publicly.

The gist of it is that you create a variable array to associate portions of the map to specified regions.  I generally use multidimentional arrays (i.e. matrices); however, a single dimention array is just fine and a little more memory friendly.  When you receive the X and Y coordiantes of the mouseclick, that data is used to identify a single variable of the array and that variable contains region index, preset by you.

Let's say your screen/map is 640x480 pixels in resolution.  Having a variable dedicated for each pixel could be memory consuming so we'll scale our array to a 64x48 matrix, essentially dividing the map into a grid.  Each variable in our map array will now accound for a 10x10 pixel square on our map, 100 pixels alotgether.

When the user clicks on the map we receive the X and Y coordinate of that click, let's say they clicked on coordinate 281,407.  Scaling that down we end up with coordiantes 28,41.  Now we use these scaled coordiantes to locate the correct varaable in our array.  With a matrix, we'd just plug in the numbers directly so we'd look up variable(28,41).  With a single dimention array we'd look up variable(28*48+41), that is the sum of X coordinate multiplied by the Y dimention and the Y coordinate.

The array contains the data of which region each portion of the map represents.  Since you can associate the same region to more than one part of the map, this allows you to create odd shaped regions.

I hope that helps some.

--Bashar

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...