ChipWits: Robot-Programming Fun - Bring Your Brain!

ChipWits Game Community
Registers - Variables for ChipWits

 
Post new topic   Reply to topic    ChipWits: Robot-Programming Fun - Bring Your Brain! Forum Index -> Improving ChipWits
View previous topic :: View next topic  
Author Message
dougsharp
Site Admin


Joined: 16 Feb 2007
Posts: 193

PostPosted: Sat Apr 28, 2007 6:23 pm    Post subject: Registers - Variables for ChipWits Reply with quote

I'd love to hear some reaction to this design idea:

Classic ChipWits has only the 3 data-typed Stacks for memory. In keeping with the nerdly heritage of ChipWits I propose adding a set of 8 Registers for use as directly addressable memory. These Registers will all hold signed 16-bit integers. Along with these registers I propose adding a Thing that has a numeric value - the Counter. Counters can be distributed in Mazes like any other Thing like Pies and Electrocrabs.

In keeping with the IBOL design goal of having only a single Argument for each Operator, all arithmetic operators will use a single register, the Accumulator. The other 7 registers (Registers A-G) will be used strictly for storage.

New Register Operators and Argument Types

ACC is Accumulator.
NUMBER data type includes unsigned 16-bit Integers, NUMBER0-NUMBER7, registers (ACCUMULATOR, REGA-REGG), Number Stack, Damage, Fuel, Rangefinder, NaN.


* ACCGET NUMBER - Places a Number in the Accumulator
* ACCPUT REGISTER/NUMBERSTACK - Puts the Accumulator value in a Register or on the Stack.
* ACCADD NUMBER - Adds a Number to the Accumulator.
* ACCSUBTRACT NUMBER - Subtracts a Number from the Accumulator
* ACCDIVIDE NUMBER - Integer divide. Rounds down.
* ACCMULTIPLY NUMBER - Yep.
* IFACCEQUALS NUMBER - Performs T/F branch. TRUE if ACCUMULATOR == NUMBER.
* IFACCLESSTHAN NUMBER - Performs T/F branch. TRUE if ACCUMULATOR < NUMBER.

* DROP_COUNTER - Drops a Counter Thing holding the value in the ACCUMULATOR
* PICKUP - Will be modified so that when the ChipWit picks up a Counter its value is placed in the Accumulator.

Design issues - How to handle Division by ZERO and Integer wrap? Simple solution - NaN? (special Not a Number value) placed in the Accumulator.

Counters can be used in Missions to give directions to Things.
A new type of Mission goal will be to arrive at a specified value in the Accumulator.
Back to top
View user's profile Send private message
trojo
NoobWit


Joined: 26 Feb 2007
Posts: 33
Location: Huntsville, Alabama

PostPosted: Sun Apr 29, 2007 6:32 am    Post subject: Reply with quote

So a Counter is like a...bread crumb that the ChipWit drops when mapping out a maze, ala Hansel and Gretel?

Will the Accumulator take the place of the existing Number stack? If not, will you be able to push the Rangefinder into the Accumulator?

Stacks in general are not terribly useful currently, possibly due to their high (IMO) cycle cost. If Accumulator operations cost a similar amount, then I'm thinking they won't see much use except as novelties. I can't think of a killer app for simple arithmetic for a ChipWit at the moment anyway, aside from what's already possible with the existing number stack.
Back to top
View user's profile Send private message
dougsharp
Site Admin


Joined: 16 Feb 2007
Posts: 193

PostPosted: Sun Apr 29, 2007 8:59 pm    Post subject: Reply with quote

Registers will be in addition to the Stacks. And I will adjust the cost of the stacks to encourage people to use them.

Counters can be used as bread-crumbs, or as as solutions to some Missions (goal Count the baddies and drop a Counter). We will also preposition them in some Mazes as clues to the whereabouts of goodies.

I put stacks in the original ChipWits because I programmed it in FORTH, which is stack-centric. Very geeky.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    ChipWits: Robot-Programming Fun - Bring Your Brain! Forum Index -> Improving ChipWits All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


© 2007-2008 Informe.com. Get Free Forum Hosting
Powered by phpBB © 2001, 2005 phpBB Group
 :: 

RedSilver 1.01 Theme was programmed by DEVPPL HTML Forum
Images were made by DEVPPL Photoshop Forum