Mathematics with Zillions Log Out | Topics | Search
Moderators | Register | Edit Profile

Zillions of Games Discussion Forum » Designing Games for Zillions » Mathematics with Zillions « Previous Next »

Author Message
Karl Scherer (Karl)
Posted on Sunday, April 15, 2001 - 4:23 am:   

If you are interested in finding out how to do
maths in Zillions, you might want to study
the games "Roulette" and "Roulette For Two"
(the latter coming out next week),
where I had to implement multiplications
of bigger numbers.

To give you an idea of the complexity of such an undertaking:
The 'turn-order" statement in "Roulette For Two"
has not less than 152 entries!

This was necessary due to the fact that Zillions has still many limitations, for example it only allows 252 change-type statements per expanded code in a move; Zillions includes in this count even those change-type statements which are not used in the current move because they are in one of the many if-statements that are not true for this specific move...
Keith Carter (Keithc)
Posted on Friday, July 13, 2001 - 7:22 pm:   

I am interested in adding scoring to Reversi so the game tracks how many pieces each player has after every move and gives a final score. I have studied the scoring features in Karl's games and, with limited understanding, attempted to modify Reversi. I have attempted to use a macro that is called every time a piece is flipped during move generation after determining which player gets incremented and which gets decremented. The macro is a series of nested If statements that increment/decrement the score counters by one each time. For example if white is being incremented:

(if (piece? white0)(change-type white1))
(if (piece? white1)(change-type white2))
(if (piece? white2)(change-type white3))
(if (piece? white3)(change-type white4))


and so on where white# refers to white's scoreboard ones digit and there is additional code for handling the tens place.

Suppose two pieces will be flipped and White's score it 02. When the first piece is flipped the macro starts going through the if statements and upon finding white2 to be true is directed to change it to a white3. When the second piece is flipped the macro starts going through the if statements and finds that white2 is still true. The change-type to white3 does not occur until an add command is reached. Do I need to count all of the flips somehow so just one increment, in this example 2, is done? I would like to get some advice on how to proceed or learn that someone else is pursuing the same project.

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: