Log In  
Follow
mischa_u
[ :: Read More :: ]

Cart #tankzilla-9 | 2021-03-02 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
4

TankZilla is an asymmetric sci-fi wargame, where you have to defend your outpost against the AI controlled megatank "TankZilla".

The red AI and blue player take turns controlling their units in a few phases; first there is a move phase followed by an attack phase, and some units get a secondary move phase. After this the other player goes.

TankZilla (the red megatank) wins if it destroys your outpost and then escapes southward. The blue defence force that you control can win by destroying the TankZilla unit.

Your (blue) defense units:
HOVR - Hover tank. Movement 4. Attack 3. Range 2. Defense 2. Gets a secondary movement of 3.
HVY - Heavy tank. Movement 3. Attack 4. Range 2. Defense 2.
MSL - Missile tank. Movement 2. Attack 3. Range 3. Defense 2.
ARTY - Immobile artillery. Movement 0. Attack 6. Range 8. Defense 1.
INF1-3 - One, two and three squads of infantry. Movement 2. Attack 1-3. Range 1. Defense 1-3. Can cross mountain ridges
OUTPOST - Outpost. Movement 0. Defense 0. Your main objective to defend.

TankZilla MK3
1x Primary weapon. Attack 4. Range 3. Defense 4.
4x Secondary weapons. Attack 3. Range 2. Defense 3.
2x Missiles. Attack 6. Range 5. Defense 3. Each missile can only be used once.
8x Anti-Personnel weapons. Attack 1. Range 1. Defense 1. Can only hit infantry and outpost.
45 Units of treads. Movement 3. For every 15 treads lost, your movement is reduced by 1.

Credits

GFX / Sprites by @ScrubSandwich

P#87933 2021-02-20 16:27 ( Edited 2021-03-02 12:12)

[ :: Read More :: ]

Cart #acquire-9 | 2021-02-07 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
2

PICO-8 adaption of the 1964 strategic boardgame Acquire. The objective of Acquire is to earn the most money through investing in and developing hotel chains.

Controls

  • Left/right arrow keys, select an option (tile, stocks, etc).
  • [o] / z to show (toggle) the reference stocks information.
  • [x] / x to play the selected option.

Rules

Watch this short (6:55) video on how to play Acquire

The objective of Acquire is to earn the most money through investing in and developing hotel chains (as identified by T, L, A, W, F, I, C).

Players can found hotel chains, buy stocks in them, merge chains which will give bonus payouts and expand chains to increase their stock value. Each player starts with $6000 in cash and 6 location tiles, hidden from other players. You are player 1 (P1) and will be playing against 3 AI players (P2-P4). A random player starts.

Players take turns, performing these phases:

1) Place a location tile on the board. This might found a new chain, grown an existing chain, cause a merger of two or more chains or have no special effect.

2) Buy stocks. A player can buy up to 3 stocks in founded chains.

3) Get a new random title to replace the played one. Now it is the next player's turn.

Placing tiles

Each tile on the board has up to 4 neighbors (orthogonally). Depending on them the following happens:

1) If it has no neighbors, the tile will just be placed.
2) If the neighbor(s) are not part of a chain, you will found a new chain.
3) If the neighbor(s) are from the same chain (with optional additional non-chain tiles), you will grow the chain. Growing the chain size might cause the stock price to go up.
4) If the placed tile connects two or more chains, this will cause a merger.

A tile can not be place if it would found a new chain, but there are no more chains available, or when it would cause a merger witth a safe chain (when it has 11 or more tiles). If all 6 tiles in your hand can't be placed, you can discard the full hand to get a new set of 6 tiles.

Founding a new chain

When you found a new chain, by placing a tile next to a chainless tile on the board, you get to choose which hotel chain will be formed. Note that the chains have different stock prices, see the reference chart [o]. You get a single stock as reward.

Merging chains

When you merge chains, by placing a tile to connect two or more chain tiles on the board, the larger chain will take over the other(s). If multiple chains have the same size, the tile placer gets to pick which chain is the acquirer. A chain with 11 or more tiles is "safe" and can't be taken over in mergers.

Payout of bonuses: The largest stockholders will get 10x the stock price of the acquired chain. The second largest stockholder will get 5x the stock price. If there is a tie, the bonuses will be split. If there is only a single stockholder, they will get both bonuses.

Disposition of stocks: Stockholders can chooose what they want to do with the acquired stocks, from a combination of trade, sell and keep.

Keep the player will retain the stocks, which might become valuable if a new chain under the acquired chain gets created.

Sell the player can sell some or all of their stock for the current stock price.

Trade the player can exchange two of the acquired stocks for one of the acquiring stocks.

After this all the acquired chain's tiles are replaced with the acquiring chain.

When there are multiple mergers, the largest chain takes over the second largest chain first. After which the next-largest gets merged in, etc.

Buying stocks

After placing your tile, you can buy 1, 2 or 3 stocks of chains that are on the board. The price will depend on the size of the chain and some chains are more expensive than others. Up to 25 stocks for a single chain can be sold.

Ending the game

The game ends when one of the chains has 41 or more tiles, there are no more tiles left to draw or all chains on the board are safe (have 11 or more tiles).

When this happens, the primary and secondary bonuses are paid out to the stockholders. Then all shares are sold. The player(s) with the highest amount of cash wins.

Official Rules PDF

P#86398 2021-01-12 16:06 ( Edited 2021-02-07 15:11)

[ :: Read More :: ]

Cart #corewar-8 | 2021-01-13 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
10

Corewar is played between two programs written in Redcode, a low-level language similar to assembly.

Players write a program to eliminate all opponents in the memory (core) of the virtual computer.

The "sandbox" goal of Corewar is to write code that will cause your opponent code to terminate.
A set of challenges with incremental difficulty (like in all Zachlikes) is yet to be created.

This game is part of the Zachlike Jam and currently work in progress.

The above screen with the dancing letters shows a 800 cell memory (core), with 1 instruction per memory
location. The letters represent the first character of the opcode stored in that memory location
(so D=DAT, M=MOV, J=JMP, etc). The blue/red color shows who "owns" (has written) that memory cell and
the highlights show the instructions pointers for all the processes of that color.

Example warrior code

This program will overwrite every 4th memory position with a DAT instruction, potentially corrupting
& killing the other process:

 0000:  ADD #   4, $   3
 0001:  MOV $   2, @   2
 0002:  JMP $  -2, #   0
 0003:  DAT #   0, #   0

Learning Redcode

Read the beginners' guide to Redcode for a thorough
introduction to the Corewar language. Further below you will find an overview of the supported
opcodes and address modes in this version of Corewar.

User Interface

main menu screenshot

When running the cartridge, you enter in the main menu with the following options:

  • Missions - Complete a list of challenges (work in progress)
  • Simulator - run a fight between two warriors
  • Editor - write the code for a warrior
  • Manual - In-game details on the instructions.

Missions

mission select screenshot

Select one of the available missions, they are in more-or-less increasing difficulty and challenge you to explore the Corewar system.

mission details screenshot

For each mission a short introduction is given, followed by the core objective and a list of goals that need to be completed in order for the mission to succeed. From here you can create/edit the warrior solution
using the in-game editor (see below for details on the editor). Once you have created your solution,
you can run it in the Simulator and test it against the mission objectives (see the next section for more
on the Simulator).

Simulator

warrior selector screenshot

Select which two warriors (blue and red) will fight against each other. You can also have a warrior
fight a copy of itself.

simulator intro screenshot

The warriors are loaded into the core at equal distance (but with a random offset).
The default coresize is 800 cells and will run for 8000 cycles. On the bottom row you can see the
current cycle (white #0), the number of blue processes (#1) and the number of red processes (#1).

When a warrior doesn't have any processes anymore (#0) it loses, if both warriors are still running
after 8000 cycles the game is a tie.

The characters M,J,D,S,A, etc are the first characters of the opcode in the memory, giving you an
idea for the "fingerprint" of the each warrior. The highlighted character is the current active
instruction from the process queue.

Press ❎ to run / pause the simulation. Press πŸ…ΎοΈ to step through it one cycle at a time. When
the simulation is paused, you can inspect the memory by moving the debug cursor (yellow square)
with the arrow keys.

simulator pause screenshot

When paused, you can see the memory around the debug cursor (yellow highlighted). The blue and
red active instructions are also shown.

simulator pause screenshot

After running for a while, you can see that both warriors have spawned multiple processes and
filled the core with their data / instructions.

simulator run screenshot

Running ❎ the simulation at full speed.

simulator end screenshot

The simulation has ended at 8000 cycles, both warriors are still alive (blue with 7 processes and red
with 26), resulting in a draw. You can restart ❎ the simulation of go back πŸ…ΎοΈ to the main menu.
If you want to exit the simulation before it has ended, press both the ❎ and πŸ…ΎοΈ buttons at the
same time while paused.

simulator mission result screenshot

If you are running the simulator for a mission solution, you will see if you succeeded to complete the objective of the mission. Any completed or failed goals are listed, allowing you to understand what went wrong.

Editor

editor screenshot

After starting the editor, you can see and change the instructions for the current warrior. Editing
is done with the 6 PICO-8 buttons; the 4 arrow keys and the ❎ and πŸ…ΎοΈ buttons. Within the scope of
the editor, the ❎ button is commonly used to edit / confirm and the πŸ…ΎοΈ button for undo / save &
back to the main menu.

At the top of the screen you can see the name of the current warrior (MICE), the starting position
(also indicated by the -> arrow at line 001) and the size (8) of the code.

The first column are the line numbers (000), followed by the instruction / opcode (DAT), the
A-address modifier (#), the A number (0), the B-address modifier (#) and the B address (0).

edit line screenshot

Use the up/down buttons to change the current line, you can enter the line edit mode by pressing
the ❎ button, which lets you add a new line above/below (up/down) the current line, delete the
current line (left) and set the start position (right) to the current line. You can make multiple
changes while you are in the edit line mode. Press ❎ to confirm the changes or press πŸ…ΎοΈ to undo.

Use the left/right buttons to select a column on the current line, you can then edit the column
value by pressing the ❎ button.

edit opcode screenshot

When editing the opcode, you can cycle through the opcodes with the up/down button.
Press ❎ to confirm the change or press πŸ…ΎοΈ to undo.

edit address mode screenshot

When editing the opcode, you can cycle through the opcodes with the up/down button.
Press ❎ to confirm the change or press πŸ…ΎοΈ to undo.

edit number screenshot

When editing the A or B number, you can change the number in steps of 1 with the up/down buttons
and in steps of 10 with the left/right buttons. Press ❎ to confirm the change or press πŸ…ΎοΈ to undo.

Redcode

This version of Corewar attempts to follow the Redcode ICWS '94 standard,
with the following limitations for the sake of simplicity and PICO-8 limitations:

  • only modes #$@<
  • no opcode modifiers (using ICWS'88 defaults)
  • no expressions
  • no macros
  • no ORG, EQU or END pseudo-instructions
  • no comments

Redcode instruction set

Each location in memory contains an instruction and two values A and B. A and B are used as address
pointers when the instruction is executed. A and B may also be used as data when referenced by
another instruction.

Opcodes can be divided into six groups:

Data:

DAT - stores data, the process executing DAT is terminated

Copying:

MOV - copy the contents of A to B

Simple Maths:

ADD - add the contents of A to the contents of B
SUB - subtract the contents of A from the contents of B
MUL - multiply the contents of A by the contents of B
DIV - divide the contents of B by the contents of A
MOD - divide the contents of B by the contents of A, taking the remainder

Flow Control:

JMP - transfer control to A (the contents of B is ignored)
JMZ - transfer control to A if the contents of B are zero
JMN - transfer control to A if the contents of B are non-zero
DJN - decrement the contents of B then transfer control to A if non-zero
SEQ - skip the next instruction if the contents of A and B are equal
SNE - skip the next instruction if the contents of A and B are not equal
SLT - skip the next instruction if the contents of A is less than B

Process Control:

SPL - create a new process at A (the contents of B is ignored)

Miscellaneous:

NOP - do nothing (for debugging purposes)

Addresses

Each address has an addressing mode and a pointer. All pointers are relative to where the address
is stored. 0 refers to the current location. 1 refers to the next location and -1 to the previous.
There are 4 addressing modes:

$ - direct - address is the location at pointer
# - immediate - address is the current instruction
@ - B indirect - the B value of the location at pointer points to the address
< - pre decrement B indirect - decrement the B value of the location at pointer then use B indirect
addressing

All values are taken modulo the size of memory (CORESIZE). Values range from 0 to CORESIZE-1. For
example if the CORESIZE is 800, -3 is stored as 797 (CORESIZE-3).

P#86209 2021-01-06 15:23 ( Edited 2021-01-13 15:19)

[ :: Read More :: ]

Cart #onitama01-4 | 2021-01-01 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
22

Onitama is a chess-like abstract strategy boardgame.

The game is played on a 5x5 board. Each player has five pawns, with the master pawn starting in the middle. At the begin of the game, 5 move cards are randomly selected out of the total of 16 animal moves. The goal is to capture the opponent's master pawn or to move on top of their master's starting position.

You can play against an AI with 3 difficulty levels, or "pass 'n play" against another human.

Controls

  • Arrow keys, move the board cursor for pawn / destination selection.
  • [o] / z to switch between move cards.
  • [x] / x to select a pawn / destination.

Rules

During each turn the player chooses one out of two available move cards, and moves a pawn according to the chosen card. This move card will then be passed to the opposite player where it will become active next turn.

You can capture an opponent's pawn. By capturing the opponent's master pawn, or moving your master pawn to the opponent's master pawn starting space, you win the game.

Watch the short (3:24) instruction video on How To Play Onitama.

All movement cards

Credits

Thanks to @Krystman / Pico Checkmate for the reference Chess AI. Find more about programming Chess AI on http://chessprogramming.org/

Changelog

v0.5
Internal AI improvements: faster moves, position key, benchmarks
AI: purge bad moves, award PV
Logging bugfix

v0.4
Menu with opponent and difficulty selection

v0.3
Negamax with alpha / beta pruning
Quiescence
Position and move evaluation
AI thinking indicator...
Take turns after each game
Game statistics

v0.2
Naive AI player
Bugfix: moves shown on top of own pieces

v0.1
Table with 16 cards
Use different indexes
Board as table
Place / remove stone
Show mini board
Show opponent mini board
Show 5th card
Shuffle cards to begin with
Select active card
Rotate cards when playing
Show valid moves
Play move
Limit to valid moves
Detect win condition
Reset game
Draw Temples

P#85695 2020-12-22 20:08 ( Edited 2021-01-04 09:53)

Follow Lexaloffle:          
Generated 2024-04-19 01:31:14 | 0.087s | Q:23