[AI] Warcraft 1

Data retrieved from haroldo-ok.itch.io

Warcraft 1 for Sega 32X by haroldo-ok

Homebrew,
Pixel Art,
Real time strategy,
sega-32x

Warcraft 32X

A native C/SH-2 port of the WinWar Warcraft: Orcs & Humans reimplementation to Sega 32X. It uses the user-supplied Warcraft demo DATA.WAR; no DOS executable code is used.

Github repo: https://github.com/haroldo-ok/warcraft-32x
What is implemented

Boots as a valid 1.5 MiB Sega 32X cartridge.
Original Warcraft demo main-menu, briefing, map, tile, UI, and sprite resources.
Six selectable demo scenarios: Human and Orc missions 1–3.
Gamepad cursor, unit selection, movement, attack orders, hit points, death, resources, worker construction, mission victory/defeat, pause, and restart flow.
WinWar-style idle aggro scans, attack-move acquisition, retaliation on damage, target pursuit, attack ranges, one-second cooldowns, armor mitigation, and type-specific randomized damage for both player and enemy units.
Timed attack windups, visible ranged arrows with travel time, impact-time damage, hit flashes, three-stage death animation, and persistent non-blocking corpse sprites.
Directional idle, walk, attack, and three-stage death animation sequences using all 65 warrior/worker frames and all 50 archer/spearman frames, including west-facing horizontal flips.
Twelve-frame sub-tile visual interpolation between A* cells for smooth movement while collision remains deterministic on the 64×64 grid.
Eight-direction A* pathfinding with an octile heuristic, no diagonal corner cutting, building footprints, blocked-destination fallback, dynamic-unit avoidance, and stuck-path replanning.
Three-state fog of war (Unknown, remembered Fog, current Visible) driven by the player's live units/buildings, with hidden enemies/projectiles and a discovery-aware minimap.
Mission-specific rules: Mission 1 construction goals, Mission 2 enemy-base destruction, Human Mission 3 town-hall defense plus enemy defeat, and Orc Mission 3 total opposition defeat.
Same-race campaign progression (Human 1→2→3 or Orc 1→2→3) after victory, with end-of-demo return to the main menu.
Native cartridge-SRAM save/load: pause-menu Save/Load, boot-time validation, main-menu Continue, corruption detection, compact entity/resource/construction/training state, and sparse forest depletion storage.
Worker economy loop: gold-mine targeting, lumber harvesting from original passability-128 forest tiles, carried resources, automatic return/deposit at the town hall, finite resource nodes, repeated gathering, and traversable/visually cleared depleted trees.
Timed farm/barracks construction with footprint validation, progressive hit points, and completion bars.
Barracks unit training with resource cost, queue timer, progress display, and adjacent spawn-cell selection.
320×224, 8-bit indexed, double-buffered 32X rendering.
68000 joypad supervisor; primary SH-2 gameplay/rendering; secondary SH-2 command/cache service.
Deterministic ROM header and checksum generation.
Host asset invariants plus PicoDrive point-to-point screenshots and black-screen detection.

This is a playable demo-campaign adaptation, not full feature parity with desktop WinWar. Audio, multiplayer, spellcasting, additional building/unit types, catapult area damage, and advanced scripted mission events are not yet ported. Economy costs and some combat rules remain streamlined for a three-button controller.
Controls

D-pad
Menu navigation / move map cursor
A
Select menu item / select friendly unit
B
Back / issue move, attack, or build order
C
Worker: cycle Move → Harvest → Build Farm → Build Barracks; completed Barracks: train Footman/Grunt
Start
Start mission / pause or resume
A while paused
Save to cartridge SRAM
C while paused
Load from cartridge SRAM
X
Build Farm at cursor (six-button shortcut)
Y
Build Barracks at cursor (six-button shortcut)

Action

Choose Continue on the main menu to restore a valid SRAM save. In-game, press Start, then A to save or C to load.

Select a Peasant/Peon with A, choose an order with C, move the cursor to a target, and press B. For Harvest, target a gold mine or a forest tile; the worker gathers 100 units, returns to the town hall, deposits them, and repeats. Farm cost: 50 gold/40 lumber. Barracks cost: 200 gold/150 lumber. Select a completed barracks and press C to train a Footman/Grunt for 400 gold.
Architecture

source/32x/main.c — screen flow, renderer, directional/death animation, projectiles, combat rules, economy, production, aggro/retaliation AI, objectives
source/32x/pathfinding.c — hardware-independent eight-direction A* used by the ROM and host tests
source/32x/mission_rules.c — mission victory/defeat evaluation and same-race campaign progression
source/32x/savegame.c — bounded 2 KiB SRAM format, checksum, encoder, and decoder
source/32x/assets_meta.c — generated mission/entity, multi-frame sprite, and ROM asset metadata
source/32x/assets.s — generated .incbin cartridge assets
source/32x/marshw.c, _crt0.s, secondary.c — Chilly Willy/viciious 32X hardware layer
source/md/ — 68000 bootstrap and controller supervisor
tools/build_assets.py — WinWar resource conversion pipeline
tests/run_picodrive_p2p.sh — front-end emulator point-to-point test
tests/run_behavior_p2p.sh — autonomous aggro, movement, animation, and combat test
tests/run_economy_p2p.sh — gold gather/carry/return/deposit test
tests/run_lumber_p2p.sh — forest targeting and lumber gather/deposit test
tests/run_save_p2p.sh — hardware SRAM save, Continue, and restored-scene test
tests/pathfinding_test.c, mission_rules_test.c, savegame_test.c — native tests against the ROM's A* and campaign logic
tests/check_screens.py, check_behavior.py, check_economy.py, check_lumber.py — black-screen, transition, autonomous-motion, gold, and lumber assertions

Large immutable graphics remain in cartridge ROM. Mutable game state is kept in 32X SDRAM, within the 256 KiB hardware limit.
Legal

WinWar code is MIT-licensed by its author. The 32X support code retains its original notices. Warcraft artwork and data remain the property of Blizzard Entertainment and are not covered by the source-code licenses. See THIRD_PARTY_NOTICES.md.

Screenshots

/img/md/warcraft1forsega32xbyharoldook-06.png
/img/md/warcraft1forsega32xbyharoldook-03.png
/img/md/warcraft1forsega32xbyharoldook-05.png
/img/md/warcraft1forsega32xbyharoldook-02.png
/img/md/warcraft1forsega32xbyharoldook-01.png
/img/md/warcraft1forsega32xbyharoldook-04.png


Permalink :
https://md.jmus.fr/warcraft1forsega32xbyharoldook.html