SunQuest
           Older Contests
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsPHP ContestsOlder Contests

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old July 3rd, 2003, 04:16 PM
gatopeich gatopeich is offline
Contributing User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Madrid, Spain / Boston, MA
Posts: 96 gatopeich User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 m 54 sec
Reputation Power: 2
Send a message via Yahoo to gatopeich
[Risk] KISS Risk Map output

Following K.I.S.S. philosophy, I made a map for Risk contest using HTML tables.

Please have a look at it
http://gato.vze.com/RiskTab1.html
http://gato.vze.com/RiskTab2.html

First one is the map with land numbers.

Second has some troops in some lands, each troop is a number in a team-color rectangle. There are 11 red troops on land 2...

It woudn't be hard to base on this tables to show a rather useful map.

I hope you like it!

Reply With Quote
  #2  
Old July 3rd, 2003, 04:44 PM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
[Risk] RE: KISS Risk Map output

Really nice idea ! Surely helpful.
I think you should use more light color for the continents, so you can see the coloured troups easier. For example: Asia => #BBFFAA, North America => #FFFFBB, ...

Reply With Quote
  #3  
Old July 3rd, 2003, 08:38 PM
webhappy webhappy is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Silicon Valley, CA, USA
Posts: 203 webhappy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
[Risk] RE: KISS Risk Map output

Here you go everyone...
Pretty obvious how to use it... I used the same variables that Xs0 made.
I wrote a script to parse Gatopeich's HTML to place PHP code in appropriate places.

Oof, I've placed it here:
http://codewalkers.com/seecode/338.html

IT looks the same, just saves you about 20 minutes (or if you're a master at regexps, you could possibly integrate the PHP faster)

Reply With Quote
  #4  
Old July 4th, 2003, 03:10 PM
gatopeich gatopeich is offline
Contributing User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Madrid, Spain / Boston, MA
Posts: 96 gatopeich User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 m 54 sec
Reputation Power: 2
Send a message via Yahoo to gatopeich
[Risk] Having a look at the game with my KISS map

I made three scripts:

http://gato.vze.com/Risk-showgame.zip

They let you have a look at a log file "gamelog.txt", step by step, with a table-based map.

You put them to the same directory as "gamelog.txt", then open "showgame.php" on your browser, or "showgame.php?turn=23" to check out turn 23.

"showgame.php" scans "gamelog.txt" for desired turn, extracts the url and then calls "showmap.php" with the same GET string, so it can show the current map...

More or less ;-)

I find it nice, at least.

Reply With Quote
  #5  
Old July 4th, 2003, 04:39 PM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
[Risk] RE: KISS Risk Map output

cool !!

but it can't display the last turn (winner turn), because the script runs in a maximum execution time exceed error. Bug ?

I use these stylesheets for better reading the map. Perhaps you also want to use it:
php Code:
Original - php Code
  1.  
  2. <style type="text/css">
  3.        td { text-align: left; vertical-align: top;}
  4.         .N_America { background-color: #ffff99;font-size:11px}
  5.         .S_America { background-color: #bbbbff;font-size:11px}
  6.         .Europe { background-color: #ffbbff;font-size:11px}
  7.         .Asia { background-color: #bbffbb;font-size:11px}
  8.         .Africa { background-color: #eeaa66;font-size:11px}
  9.         .Oceania { background-color: #ffccbb;font-size:11px}
  10.         .bridge { background-color: #a0a0a0;font-size:11px}
  11.         .A { background-color: #ff0000;font-size:14px;font-weight:bold;}
  12.         .B { background-color: #00ff00;font-size:14px;font-weight:bold;}
  13.         .C { background-color: #0000ff;font-size:14px;font-weight:bold;}
  14.         .D { background-color: #ffff00;font-size:14px;font-weight:bold;}
  15.         .X { background-color: #808080;font-size:14px;font-weight:bold;}
  16. </style> 

Reply With Quote
  #6  
Old July 4th, 2003, 04:48 PM
gatopeich gatopeich is offline
Contributing User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Madrid, Spain / Boston, MA
Posts: 96 gatopeich User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 m 54 sec
Reputation Power: 2
Send a message via Yahoo to gatopeich
[Risk] RE: RE: KISS Risk Map output

Quote:
but it can't display the last turn (winner turn), because the script runs in a maximum execution time exceed error. Bug ?

Well, I didn't care about that, I was in a hurry!

Reply With Quote
  #7  
Old July 8th, 2003, 04:05 PM
gatopeich gatopeich is offline
Contributing User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Madrid, Spain / Boston, MA
Posts: 96 gatopeich User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 m 54 sec
Reputation Power: 2
Send a message via Yahoo to gatopeich
[Risk] RE: KISS Risk Map output

Hi, I just put an update of my 'showgame.php'

gato.vze.com/Risk-showgame.zip

Now you can look at last turn (added EOF check).

Also, I changed the map a little so lands 16 and 17 look connected.

I hope it's been useful for somebody out there!

Reply With Quote
Reply

Viewing: Codewalkers ForumsPHP ContestsOlder Contests > [Risk] KISS Risk Map output


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway