Tips and tricks Log Out | Topics | Search
Moderators | Register | Edit Profile

Zillions of Games Discussion Forum » Designing Games for Zillions » Tips and tricks « Previous Next »

Author Message
Mats W (Kålroten)
Posted on Friday, April 14, 2006 - 3:49 am:   

I'd like to point out the method whereby I stimulate the engine to castle when programming chess variants. I simply add links from the king's squares and around them. This makes the king feel uncomfortable on those squares and he castles to get away. It works remarkably well. In many chess variants castling is imperative to connect the rooks and to survive the middlegame. In my latest Elephant Chess, note also how I've managed to increase the value of the Elephant compared with the knight (otherwise the engine underestimates the Elephant). This is simply by adding move function calls ("tweak_shift") to dummy squares beside the board, occupied by dummy pieces. These are important tricks for Zillions chess variant programmers. Have a look in the zrf.

Mats
Karl Scherer (Karl)
Posted on Saturday, April 15, 2006 - 8:22 pm:   

How to create "random" closed loops,

For the game Febu (from "fence building")
I needed a random closed loop (representing the fence which the player has to reconstruct).

My first idea how to accomplish this task, namely
to start at a random point of the board and walk randomly, does not work, because one can paint yourself into a corner and not come back to the starting point.

I am not even sure whether - strictly mathematically speaking - there is a constructive method to create a 'random closed walk'. (Of course one could say that a 'random closed walk' is a random walk which accidentally comes back to its starting point at some time, but this does not help to effectively CONSTRUCT a closed random walk, because most of the random walks would fail in this respect.)

The method I finally used works quite well:
I start with a small rectangular closed path
(choosing randomly between a few fixed rectangles)
and apply some basic pulls and tugs at random places (making sure of course that these operations do not cause the path to touch or cross itself). After about 20 or 40 tugs the loop
looks quite random.

The method also runs quite fast under Zillions.

Cheers, Karl
Mats W (Kålroten)
Posted on Tuesday, April 25, 2006 - 3:09 pm:   

Creating icons

It's easy to create icons for use with shortcuts. For instance, some games have interesting pieces, like the BlueKnight.bmp in Camelot, for instance. One simply renames it to BlueKnight.ico. Then one can create a shortcut to Camelot.zrf, right-click on the shortcut and choose Properties/Change Icon. It's a good idea to provide such shortcuts when one submits a zrf. One can also save the thumbnail (which is used in the Zillions online game list) as bmp and change extension to ico. The user can then place the shortcut on the desktop, or whatever. The game is easy to recognize because of its special icon.

Mats

Add Your Message Here
Post:
Username: Posting Information:
This is a private posting area. Only registered users and moderators may post messages here.
Password:
Options: Enable HTML code in message
Automatically activate URLs in message
Action: