Skip to content

pdl/Dune-II---The-Maker

 
 

Repository files navigation

Dune II - The Maker

A.k.a. D2TM. Is a Dune 2 clone. At this moment the most known/stable version is DEMO4 and DEMO 3.5 which are very old and using Allegro & other libs. I am proud of that project, but it is time to rewrite it and build a game mostly focussing on skirmish and networking gaming.

This is an attempt to rewrite the game from scratch using SDL 1.2. If you are looking for the source code of the 'current' D2TM (with demo binaries), then you can find it here

I do this purely for fun, and try to keep it multi-platform. I test it often on Mac OSX and Ubuntu. I sometimes test it on Windows (MinGW32 and MSYS).

Current State

If you want to know what is possible with the current version, see the DONE features list. If you want to know what still has to be done, (you might want to contribute?), see the TODO list below what needs to be done.

There is no binary available, instead you need to compile it yourself.

Contributing

Check the TODO list. Create (or checkout) a feature branch. Code. And once you're finished submit it as a pull request.

Compiling

This project has makefiles for Windows (mingw32), Linux (ubuntu) and Mac OSX.

Dependencies:

  • SDL 1.2
  • SDL Image
  • SDL Gfx

After you check out this project, copy the appropiate makefile (with the extension matching your OS) as 'makefile'. After that hit make.

Example, OSX && homebrew:

  • Install XCode CLI tools
  • Using brew, install dependencies: brew install SDL sdl_image sdl_gfx
  • Then: cp makefile.osx makefile
  • make

Example, Ubuntu (inspired by Lazy Foo)

  • Fetch g++ and its dependencies with apt-get:

      apt-get install g++
    
  • Fetch SDL and its dependencies with apt-get:

      apt-get install libsdl1.2-dev libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-ttf2.0-dev libsdl-gfx1.2-dev
    
  • cp makefile.ubuntu makefile

  • make

As a player I should be able to...

Features need to be written in such a way that it is obvious what the benefit is for the player.

TODO

  • have infantry
    • with a maximum of 5 on one cell
    • can be moved seperately (like C&C)
    • can move on mountains
    • should be blocked by other infantry, only when other cell is full
    • should be blocked by units
    • can be squished by heavy units
  • modify the properties of units/structures by modifying a rules.ini file
  • move vehicles around larger obstacles (like bases, mountains, etc) (path-finding on 'really-need-it-basis')
  • move (my) units appropriately
    • sandworms should only be able to travel through sand, dunes and spice, and be blocked by rock/mountains
    • heavy vehicles should be able to move over infantry (fatal for the infantry).
    • air units should not be blocked by anything
  • defend myself with walls
    • draw walls
    • walls should obstruct terrain units of all kinds
    • walls smoothing
    • terrain smoothing adjustments with walls
  • see structures (draw them)
  • have my ground wheeled/tank vehicles be blocked by structures
  • select my structure
  • use my infantry to take over enemy structures
    • the more damaged the structure is, the more chance of taking over
    • (fatal for the infantry, but chance of capture)
  • have enemies to defeat
    • enemy units should not be visible when shrouded
    • enemy units should not be selectable
    • only show health bar when mouse hovers over enemy unit
  • see everything move in a certain pace (timed) at all time , regardless of my fps (this post is helpful)
  • destroy units so i can win the game destroying my enemy's units
  • destroy structures so i can win the game destroying my enemy's structures
  • order a unit to attack another unit in order to destroy it
  • order a unit to attack a structure in order to destroy it
  • order a unit to attack a tile so I can destroy a wall or something else (ie, a sandworm perhaps)
  • sandworms should only be able to travel through sand, dunes and spice, and be blocked by rock/mountains
  • fear the sandworm
    • sandworm eats units on sand/dunes/spice
    • sandworm can get 'full' and dissapear (? or wander around messing with your mind?)
  • send my vehicles to a repair bay in order to get the patched up and use them fully again.
  • send my harvester back to the refinery in order to get the credits earlier
  • build another structure from a Construction Yard
  • place built structures
  • build infantry from a Barracks
  • build troopers from a WOR
  • build light vehicles from a Light Factory
  • build heavy vehicles from a Heavy Factory
  • build tanks
  • tanks should be able to face their body to the adjecent cell and face their barrel to the target (as should turrets)
  • build air units from a High-Tech
  • upgrade my structures to gain access to other units
  • upgrade my units (??)
  • receive reinforcements from time to time
  • mine spice with a harvester
  • deploy an MCV
  • get my units transported much faster by a carry-all
  • scroll by holding mouse key and move from that position
  • when a unit is bored, it should turn around randomly
  • when a unit is on guard, it should target enemies within range, as should turrets
  • play on a randomized map
  • harvesters should harvest without being instructed
  • when a harvester is first deployed, it head for the nearest spice field that the player can see
  • when a harvester is deployed, it keeps using the same spice field unless instructed otherwise
  • when a harvester discovers a spice field is empty, it will head for the nearest field.
    • ... but if the harvester has spice, it will return first. (?)
  • the user can find out how much spice a harvester contains
  • when nonempty, a harvester when destroyed spills its spice
  • when full, the harvester will return to the nearest refinery, using a carryall if available
  • if the refinery is busy, the harvester will move to another one if it is nearby, otherwise it will wait (?)
  • harvesters will harvest parts of the field with a higher value, because there are no graphics for thick spice/sand boundary.
  • harvesters entering a refinery will deposit credits
  • spice will be distributed across a player's refineries and silos
  • spice will be lost if there is insufficient storage
  • User can select all units of the same type on the screen
  • User can select all units of the same type on the battlefield
  • Play using only:
  • The keyboard, or
  • The mouse
  • specifically, single-clicking the LMB (touch)

Unit types

  • Soldier
  • Infantry (Perhaps we want to do this the C&C way.)
  • Trooper
  • Troopers (Perhaps we want to do this the C&C way.)
  • Trike
  • Raider Trike
  • Quad
  • Tank
  • Harvester
  • MCV
  • Siege Tank
  • Rocket Launcher
  • Deviator
  • Devastator
  • Sonic Tank
  • Carryall
  • Ornithopter
  • Frigate
  • Saboteur
  • Fremen (C&C style?)

Structures

  • Concrete 1x1
  • Concrete 4x4
  • Wall
  • Windtrap
  • Refinery
  • Silos
  • Radar Outpost
  • Barracks
  • WOR
  • Light Factory
  • Heavy Factory
  • Hi-Tech Factory
  • Gun Turret
  • Rocket Turret
  • Repair Facility
  • Starport
  • House of IX
  • Palace

DONE

  • move the camera around
  • pixel perfect scrolling instead of cell by cell
  • scroll by holding arrow keys instead of having to press/release all the time
  • scroll by 'hitting mouse' on screen borders
  • see units (draw them)
  • see units drawn in center when bigger than 32x32 pixels
  • see a shadow of a unit
  • see units of my own color (palette trickery)
  • select one unit
  • draw a rectangle by holding left mouse button
  • select multiple units by dragging rectangle over units and releasing left mouse button
  • order a unit to move to a position
  • explore the terrain by clearing a shroud
  • enjoy the terrain smoothened (smoothing algorithm)
  • load a map from file
  • have my ground wheeled/tank vehicles be blocked by other vehicles, and mountains
  • have air units not being blocked by any terrain type
  • have an arbitrary number of units
  • have air units not be blocked by any units
  • have air units always be drawn over ground units

Controls

Thus far the following controls work:

Press q to quit anytime. Move camera around with arrow keys or with mouse hitting borders of screen.

Right mouse click deselects all unit. Left mouse click selects a unit. Hold left mouse button and drag a rectangle over units to select them.

About

A clone of Dune 2 - The Building of a Dynasty (by Westwood Studios)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 82.2%
  • Java 9.1%
  • C 5.1%
  • Objective-C 3.6%