mischa_u [Lexaloffle Blog Feed]https://www.lexaloffle.com/bbs/?uid=49874 TankZilla: defend against the AI controlled megatank <p> <table><tr><td> <a href="/bbs/?pid=87933#p"> <img src="/bbs/thumbs/pico8_tankzilla-9.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=87933#p"> TankZilla v0.10</a><br><br> by <a href="/bbs/?uid=49874"> mischa_u</a> <br><br><br> <a href="/bbs/?pid=87933#p"> [Click to Play]</a> </td></tr></table> </p> <p>TankZilla is an asymmetric sci-fi wargame, where you have to defend your outpost against the AI controlled megatank &quot;TankZilla&quot;.</p> <p>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.</p> <p>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.</p> <p><strong>Your (blue) defense units:</strong><br /> HOVR - Hover tank. Movement 4. Attack 3. Range 2. Defense 2. Gets a secondary movement of 3.<br /> HVY - Heavy tank. Movement 3. Attack 4. Range 2. Defense 2.<br /> MSL - Missile tank. Movement 2. Attack 3. Range 3. Defense 2.<br /> ARTY - Immobile artillery. Movement 0. Attack 6. Range 8. Defense 1.<br /> INF1-3 - One, two and three squads of infantry. Movement 2. Attack 1-3. Range 1. Defense 1-3. Can cross mountain ridges<br /> OUTPOST - Outpost. Movement 0. Defense 0. Your main objective to defend.</p> <p><strong>TankZilla MK3</strong><br /> 1x Primary weapon. Attack 4. Range 3. Defense 4.<br /> 4x Secondary weapons. Attack 3. Range 2. Defense 3.<br /> 2x Missiles. Attack 6. Range 5. Defense 3. Each missile can only be used once.<br /> 8x Anti-Personnel weapons. Attack 1. Range 1. Defense 1. Can only hit infantry and outpost.<br /> 45 Units of treads. Movement 3. For every 15 treads lost, your movement is reduced by 1.</p> <h2>Credits</h2> <p>GFX / Sprites by <a href="https://www.lexaloffle.com/bbs/?uid=30036"> @ScrubSandwich</a></p> https://www.lexaloffle.com/bbs/?tid=41681 https://www.lexaloffle.com/bbs/?tid=41681 Sat, 20 Feb 2021 16:27:53 UTC Acquire: Invest, divest, and stage hostile takeovers <p> <table><tr><td> <a href="/bbs/?pid=86398#p"> <img src="/bbs/thumbs/pico8_acquire-9.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=86398#p"> Acquire v0.10</a><br><br> by <a href="/bbs/?uid=49874"> mischa_u</a> <br><br><br> <a href="/bbs/?pid=86398#p"> [Click to Play]</a> </td></tr></table> </p> <p>PICO-8 adaption of the 1964 strategic boardgame <a href="https://boardgamegeek.com/boardgame/5/acquire">Acquire</a>. The objective of Acquire is to earn the most money through investing in and developing hotel chains.</p> <h1>Controls</h1> <ul> <li>Left/right arrow keys, select an option (tile, stocks, etc).</li> <li>[o] / z to show (toggle) the reference stocks information.</li> <li>[x] / x to play the selected option.</li> </ul> <h1>Rules</h1> <p>Watch this short (6:55) video on <a href="https://www.youtube.com/watch?v=AVoUPu5O1os">how to play Acquire</a></p> <p>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).</p> <p>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.</p> <p>Players take turns, performing these phases:</p> <p>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.</p> <p>2) Buy stocks. A player can buy up to 3 stocks in founded chains.</p> <p>3) Get a new random title to replace the played one. Now it is the next player's turn.</p> <h2>Placing tiles</h2> <p>Each tile on the board has up to 4 neighbors (orthogonally). Depending on them the following happens:</p> <p>1) If it has no neighbors, the tile will just be placed.<br /> 2) If the neighbor(s) are not part of a chain, you will found a new chain.<br /> 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.<br /> 4) If the placed tile connects two or more chains, this will cause a merger.</p> <p>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.</p> <h2>Founding a new chain</h2> <p>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.</p> <h2>Merging chains</h2> <p>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 &quot;safe&quot; and can't be taken over in mergers.</p> <p><strong>Payout of bonuses:</strong> 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.</p> <p><strong>Disposition of stocks:</strong> Stockholders can chooose what they want to do with the acquired stocks, from a combination of <strong>trade</strong>, <strong>sell</strong> and <strong>keep</strong>.</p> <p><strong>Keep</strong> the player will retain the stocks, which might become valuable if a new chain under the acquired chain gets created.</p> <p><strong>Sell</strong> the player can sell some or all of their stock for the current stock price.</p> <p><strong>Trade</strong> the player can exchange two of the acquired stocks for one of the acquiring stocks.</p> <p>After this all the acquired chain's tiles are replaced with the acquiring chain.</p> <p>When there are multiple mergers, the largest chain takes over the second largest chain first. After which the next-largest gets merged in, etc.</p> <h2>Buying stocks</h2> <p>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.</p> <h2>Ending the game</h2> <p>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).</p> <p>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.</p> <p><a href="http://media.wizards.com/2015/downloads/ah/acquire_rules.pdf">Official Rules PDF</a></p> https://www.lexaloffle.com/bbs/?tid=41150 https://www.lexaloffle.com/bbs/?tid=41150 Tue, 12 Jan 2021 16:06:56 UTC Corewar: compete for control of a virtual computer <p> <table><tr><td> <a href="/bbs/?pid=86209#p"> <img src="/bbs/thumbs/pico8_corewar-8.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=86209#p"> Corewar v0.9</a><br><br> by <a href="/bbs/?uid=49874"> mischa_u</a> <br><br><br> <a href="/bbs/?pid=86209#p"> [Click to Play]</a> </td></tr></table> </p> <p>Corewar is played between two programs written in Redcode, a low-level language similar to assembly.</p> <p>Players write a program to eliminate all opponents in the memory (core) of the virtual computer.</p> <p>The &quot;sandbox&quot; goal of Corewar is to write code that will cause your opponent code to terminate.<br /> A set of challenges with incremental difficulty (like in all Zachlikes) is yet to be created.</p> <p>This game is part of the <a href="https://itch.io/jam/zachlike-jam">Zachlike Jam</a> and currently work in progress.</p> <img style="margin-bottom:16px" border=0 src="/media/49874/corewar_2.gif" alt="" /> <p>The above screen with the dancing letters shows a 800 cell memory (core), with 1 instruction per memory<br /> location. The letters represent the first character of the opcode stored in that memory location<br /> (so D=DAT, M=MOV, J=JMP, etc). The blue/red color shows who &quot;owns&quot; (has written) that memory cell and<br /> the highlights show the instructions pointers for all the processes of that color.</p> <h2>Example warrior code</h2> <p>This program will overwrite every 4th memory position with a DAT instruction, potentially corrupting<br /> &amp; killing the other process:</p> <div> <div class=scrollable_with_touch style="width:100%; max-width:800px; overflow:auto; margin-bottom:12px"> <table style="width:100%" cellspacing=0 cellpadding=0> <tr><td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> <td background=/gfx/code_bg0.png> <div style="font-family : courier; color: #000000; display:absolute; padding-left:10px; padding-top:4px; padding-bottom:4px; "> <pre> 0000: ADD # 4, $ 3 0001: MOV $ 2, @ 2 0002: JMP $ -2, # 0 0003: DAT # 0, # 0</pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <h1>Learning Redcode</h1> <p>Read <strong><a href="http://vyznev.net/corewar/guide.html">the beginners' guide to Redcode</a></strong> for a thorough<br /> introduction to the Corewar language. Further below you will find an overview of the supported<br /> opcodes and address modes in this version of Corewar.</p> <h1>User Interface</h1> <img style="margin-bottom:16px" border=0 src="/media/49874/corewar_v07 p8_000.png" alt="" /> <p><em>main menu screenshot</em></p> <p>When running the cartridge, you enter in the main menu with the following options:</p> <ul> <li><strong>Missions</strong> - Complete a list of challenges (work in progress)</li> <li><strong>Simulator</strong> - run a fight between two warriors</li> <li><strong>Editor</strong> - write the code for a warrior</li> <li><strong>Manual</strong> - In-game details on the instructions.</li> </ul> <h2>Missions</h2> <img style="margin-bottom:16px" border=0 src="/media/49874/corewar_v08 p8_000.png" alt="" /> <p><em>mission select screenshot</em></p> <p>Select one of the available missions, they are in more-or-less increasing difficulty and challenge you to explore the Corewar system.</p> <img style="margin-bottom:16px" border=0 src="/media/49874/corewar_mission_details.png" alt="" /> <p><em>mission details screenshot</em></p> <p>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<br /> using the in-game editor (see below for details on the editor). Once you have created your solution,<br /> you can run it in the Simulator and test it against the mission objectives (see the next section for more<br /> on the Simulator). </p> <h2>Simulator</h2> <img style="margin-bottom:16px" border=0 src="/media/49874/corewar_001.png" alt="" /> <p><em>warrior selector screenshot</em></p> <p>Select which two warriors (blue and red) will fight against each other. You can also have a warrior<br /> fight a copy of itself.</p> <img style="margin-bottom:16px" border=0 src="/media/49874/corewar_002.png" alt="" /> <p><em>simulator intro screenshot</em></p> <p>The warriors are loaded into the core at equal distance (but with a random offset).<br /> The default coresize is 800 cells and will run for 8000 cycles. On the bottom row you can see the<br /> current cycle (white #0), the number of blue processes (#1) and the number of red processes (#1).</p> <p>When a warrior doesn't have any processes anymore (#0) it loses, if both warriors are still running<br /> after 8000 cycles the game is a tie.</p> <p>The characters M,J,D,S,A, etc are the first characters of the opcode in the memory, giving you an<br /> idea for the &quot;fingerprint&quot; of the each warrior. The highlighted character is the current active<br /> instruction from the process queue.</p> <p>Press ❎ to run / pause the simulation. Press πŸ…ΎοΈ to step through it one cycle at a time. When<br /> the simulation is paused, you can inspect the memory by moving the debug cursor (yellow square)<br /> with the arrow keys.</p> <img style="margin-bottom:16px" border=0 src="/media/49874/corewar_003.png" alt="" /> <p><em>simulator pause screenshot</em></p> <p>When paused, you can see the memory around the debug cursor (yellow highlighted). The blue and<br /> red active instructions are also shown.</p> <img style="margin-bottom:16px" border=0 src="/media/49874/corewar_004.png" alt="" /> <p><em>simulator pause screenshot</em></p> <p>After running for a while, you can see that both warriors have spawned multiple processes and<br /> filled the core with their data / instructions.</p> <img style="margin-bottom:16px" border=0 src="/media/49874/corewar_005.png" alt="" /> <p><em>simulator run screenshot</em></p> <p>Running ❎ the simulation at full speed.</p> <img style="margin-bottom:16px" border=0 src="/media/49874/corewar_006.png" alt="" /> <p><em>simulator end screenshot</em></p> <p>The simulation has ended at 8000 cycles, both warriors are still alive (blue with 7 processes and red<br /> with 26), resulting in a draw. You can restart ❎ the simulation of go back πŸ…ΎοΈ to the main menu.<br /> If you want to exit the simulation before it has ended, press both the ❎ and πŸ…ΎοΈ buttons at the<br /> same time while paused.</p> <img style="margin-bottom:16px" border=0 src="/media/49874/corewar_mission_result.png" alt="" /> <p><em>simulator mission result screenshot</em></p> <p>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.</p> <h2>Editor</h2> <img style="margin-bottom:16px" border=0 src="/media/49874/corewar_007.png" alt="" /> <p><em>editor screenshot</em></p> <p>After starting the editor, you can see and change the instructions for the current warrior. Editing<br /> is done with the 6 PICO-8 buttons; the 4 arrow keys and the ❎ and πŸ…ΎοΈ buttons. Within the scope of<br /> the editor, the ❎ button is commonly used to edit / confirm and the πŸ…ΎοΈ button for undo / save &amp;<br /> back to the main menu.</p> <p>At the top of the screen you can see the name of the current warrior (MICE), the starting position<br /> (also indicated by the -&gt; arrow at line 001) and the size (8) of the code.</p> <p>The first column are the line numbers (000), followed by the instruction / opcode (DAT), the<br /> A-address modifier (#), the A number (0), the B-address modifier (#) and the B address (0).</p> <img style="margin-bottom:16px" border=0 src="/media/49874/corewar_008.png" alt="" /> <p><em>edit line screenshot</em></p> <p>Use the up/down buttons to change the current line, you can enter the line edit mode by pressing<br /> the ❎ button, which lets you add a new line above/below (up/down) the current line, delete the<br /> current line (left) and set the start position (right) to the current line. You can make multiple<br /> changes while you are in the edit line mode. Press ❎ to confirm the changes or press πŸ…ΎοΈ to undo.</p> <p>Use the left/right buttons to select a column on the current line, you can then edit the column<br /> value by pressing the ❎ button.</p> <img style="margin-bottom:16px" border=0 src="/media/49874/corewar_009.png" alt="" /> <p><em>edit opcode screenshot</em></p> <p>When editing the opcode, you can cycle through the opcodes with the up/down button.<br /> Press ❎ to confirm the change or press πŸ…ΎοΈ to undo.</p> <img style="margin-bottom:16px" border=0 src="/media/49874/corewar_010.png" alt="" /> <p><em>edit address mode screenshot</em></p> <p>When editing the opcode, you can cycle through the opcodes with the up/down button.<br /> Press ❎ to confirm the change or press πŸ…ΎοΈ to undo.</p> <img style="margin-bottom:16px" border=0 src="/media/49874/corewar_011.png" alt="" /> <p><em>edit number screenshot</em></p> <p>When editing the A or B number, you can change the number in steps of 1 with the up/down buttons<br /> and in steps of 10 with the left/right buttons. Press ❎ to confirm the change or press πŸ…ΎοΈ to undo.</p> <h1>Redcode</h1> <p>This version of Corewar attempts to follow the Redcode <a href="http://corewar.co.uk/standards/icws94.htm">ICWS '94 standard</a>,<br /> with the following limitations for the sake of simplicity and PICO-8 limitations:</p> <ul> <li>only modes #$@&lt;</li> <li>no opcode modifiers (using ICWS'88 defaults)</li> <li>no expressions</li> <li>no macros</li> <li>no ORG, EQU or END pseudo-instructions</li> <li>no comments</li> </ul> <h2>Redcode instruction set</h2> <p>Each location in memory contains an instruction and two values A and B. A and B are used as address<br /> pointers when the instruction is executed. A and B may also be used as data when referenced by<br /> another instruction.</p> <p>Opcodes can be divided into six groups:</p> <h3>Data:</h3> <p>DAT - stores data, the process executing DAT is terminated</p> <h3>Copying:</h3> <p>MOV - copy the contents of A to B</p> <h3>Simple Maths:</h3> <p>ADD - add the contents of A to the contents of B<br /> SUB - subtract the contents of A from the contents of B<br /> MUL - multiply the contents of A by the contents of B<br /> DIV - divide the contents of B by the contents of A<br /> MOD - divide the contents of B by the contents of A, taking the remainder</p> <h3>Flow Control:</h3> <p>JMP - transfer control to A (the contents of B is ignored)<br /> JMZ - transfer control to A if the contents of B are zero<br /> JMN - transfer control to A if the contents of B are non-zero<br /> DJN - decrement the contents of B then transfer control to A if non-zero<br /> SEQ - skip the next instruction if the contents of A and B are equal<br /> SNE - skip the next instruction if the contents of A and B are not equal<br /> SLT - skip the next instruction if the contents of A is less than B</p> <h3>Process Control:</h3> <p>SPL - create a new process at A (the contents of B is ignored)</p> <h3>Miscellaneous:</h3> <p>NOP - do nothing (for debugging purposes)</p> <h2>Addresses</h2> <p>Each address has an addressing mode and a pointer. All pointers are relative to where the address<br /> is stored. 0 refers to the current location. 1 refers to the next location and -1 to the previous.<br /> There are 4 addressing modes:</p> <p>$ - direct - address is the location at pointer<br /> # - immediate - address is the current instruction<br /> @ - B indirect - the B value of the location at pointer points to the address<br /> &lt; - pre decrement B indirect - decrement the B value of the location at pointer then use B indirect<br /> addressing</p> <p>All values are taken modulo the size of memory (CORESIZE). Values range from 0 to CORESIZE-1. For<br /> example if the CORESIZE is 800, -3 is stored as 797 (CORESIZE-3).</p> https://www.lexaloffle.com/bbs/?tid=41088 https://www.lexaloffle.com/bbs/?tid=41088 Wed, 06 Jan 2021 15:23:04 UTC Onitama: chess-like abstract strategy boardgame <p> <table><tr><td> <a href="/bbs/?pid=85695#p"> <img src="/bbs/thumbs/pico8_onitama01-4.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=85695#p"> Onitama v0.5</a><br><br> by <a href="/bbs/?uid=49874"> mischa_u</a> <br><br><br> <a href="/bbs/?pid=85695#p"> [Click to Play]</a> </td></tr></table> </p> <p>Onitama is a chess-like abstract strategy boardgame.</p> <p>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.</p> <img style="margin-bottom:16px" border=0 src="/media/49874/onitama_v03 p8_1.gif" alt="" /> <p>You can play against an AI with 3 difficulty levels, or &quot;pass 'n play&quot; against another human.</p> <img style="margin-bottom:16px" border=0 src="/media/49874/onitama_003.png" alt="" /> <h1>Controls</h1> <ul> <li>Arrow keys, move the board cursor for pawn / destination selection.</li> <li>[o] / z to switch between move cards.</li> <li>[x] / x to select a pawn / destination.</li> </ul> <h1>Rules</h1> <p>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.</p> <p>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.</p> <p>Watch the short (3:24) instruction video on <a href="https://youtu.be/IFRewjcngwU">How To Play Onitama</a>.</p> <img style="margin-bottom:16px" border=0 src="/media/49874/onitama_002.png" alt="" /> <h1>All movement cards</h1> <img style="margin-bottom:16px" border=0 src="/media/49874/onitama_001.png" alt="" /> <h1>Credits</h1> <p>Thanks to <a href="https://www.lexaloffle.com/bbs/?uid=16423"> @Krystman</a> / <a href="https://www.lexaloffle.com/bbs/?tid=31213">Pico Checkmate</a> for the reference Chess AI. Find more about programming Chess AI on <a href="http://chessprogramming.org/">http://chessprogramming.org/</a></p> <h1>Changelog</h1> <p><em>v0.5</em><br /> Internal AI improvements: faster moves, position key, benchmarks<br /> AI: purge bad moves, award PV<br /> Logging bugfix</p> <p><em>v0.4</em><br /> Menu with opponent and difficulty selection</p> <p><em>v0.3</em><br /> Negamax with alpha / beta pruning<br /> Quiescence<br /> Position and move evaluation<br /> AI thinking indicator...<br /> Take turns after each game<br /> Game statistics</p> <p><em>v0.2</em><br /> Naive AI player<br /> Bugfix: moves shown on top of own pieces</p> <p><em>v0.1</em><br /> Table with 16 cards<br /> Use different indexes<br /> Board as table<br /> Place / remove stone<br /> Show mini board<br /> Show opponent mini board<br /> Show 5th card<br /> Shuffle cards to begin with<br /> Select active card<br /> Rotate cards when playing<br /> Show valid moves<br /> Play move<br /> Limit to valid moves<br /> Detect win condition<br /> Reset game<br /> Draw Temples</p> https://www.lexaloffle.com/bbs/?tid=40893 https://www.lexaloffle.com/bbs/?tid=40893 Tue, 22 Dec 2020 20:08:32 UTC