Git Product home page Git Product logo

chronoshift's Introduction

Chronoshift Logo

Build Status Build Status

An Open Source Re-Implementation of Command and Conquer: Red Alert

This project is a bottom-up rewrite of Command and Conquer: Red Alert, a real time strategy game. This project uses the original binary to provide functions that have not been implemented yet. The intention is to allow the fixing of bugs, implementation of new features and porting to platforms unsupported by the original.

Building

In order to generate a working binary, currently you must build the project using a version of the Watcom compiler. Building using MinGW-w64 and Microsoft Visual Studio is also tested periodically, but because of differences in the compiler ABI, dll's that it generates will not work correctly with the original game binary. Once the reimplementation is complete it should be possible to build with any C++11 compiler.

In order to build, first download and install Open Watcom and CMake for windows. Make sure you add CMake to at least your users path when prompted to during the install. Next, open a command prompt window and run the following commands:

  • C:\WATCOM\owsetenv.bat Sets the environment variables for OpenWatcom, assumes default install directory.
  • git clone https://github.com/TheAssemblyArmada/Chronoshift.git Clone the repository.
  • cd Chronoshift Change to the cloned repository.
  • mkdir build Make a build directory.
  • cd build Change to the build directory.
  • cmake -G "Watcom WMake" -DCMAKE_BUILD_TYPE="Release" .. Configures the watcom build environment.
  • wmake Compiles both the launcher and the Chronoshift .dll file with Open Watcom.

Chronoshift will only work against the english 3.03 beta patch. Simply copy the launcher and .dll into your Red Alert directory and run the launcher.

Linux and macOS

Native support for Linux and macOS is planned for the future, but because of how the project is developed, a native binary will not be possible for some time. In the mean time, using Wine on Linux and macOS, should be possible but is currently untested.

Licence

The source code provided in this repository for Chronoshift is licenced under the GNU General Public License version 2 or later with an exception allowing the resulting code to be linked against a closed source binary which will be in place until Chronoshift no longer relies on the original.

Other Open-Game Projects

Below is a list of similar projects and their respective original games:

There is also the Wikipedia page for open source games.

Contributing

If you are interested in contributing to Chronoshift, you will need some knowledge of C++ as a minimum requirement. Join the developer chat listed below for more information on what else you will need such as the idc file for the current map of the binary.

You can also check the wiki for more information.

Contact

You can discuss development of this project on our Discord server.

chronoshift's People

Contributors

janisozaur avatar omniblade avatar tomsons26 avatar yazgoo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

chronoshift's Issues

Reinforcement teams can get triggered multiple times.

Example if you have one badger deliver say 5 Tanyas you could get 2 or more badgers delivering badger count * 5 Tanyas. No clue where this is coming from but seems directly related to reinforcement teams not triggers that spawn them.
Another time when another team is triggered is if a existing team is damaged, this happens even if no reinforce when damaged flags are set so something is buggy here.

Idea on managing movies better

Looking at ThemeControl in ThemeClass i had a idea that we could reuse that logic for movies.
Check which movies are available and show those in the future Movies menu, as well as have a bit for noting if a movie has been seen, thus unlocked, thus selectable to play in the Movies menu, these logics being akin to how movies are unlocked in RA2/YR.

Make Watcom not optimize returns and not reuse functions

These optimizations make debugging of our code a whole lot harder.
Adding -oc will stop Watcom from optimizing returns into jumps to another identical return.
Adding -ou will make Watcom make every function a unique function.

Values we can unhardcode and make into RulesClass options.

This isn't a complete list but it's a rough overview what I saw in YR. TS likely shows even more.
"?" are to be investigated.

Paradrop_Cargo : VOC_CHUTE1 = ChuteSound
AircraftClass::Fire_At : 9 = CameraRange
AircraftClass::Look : ?
AnimClass::AnimClass : ANIM_LZ_SMOKE = DropZoneAnim
AnimClass::AI : ANIM_LZ_SMOKE = DropZoneAnim
BuildingClass::Take_Damage : VOC_KABOOM22 or VOC_CRMBLE2 or VOC_KABOOM1 = BuildingDieSound or BuildingDamageSound, 400 = ShakeScreen
BuildingClass::Repair : VOC_SCOLDY1 = ScoldSound, VOC_RAMENU1 = GenericClick
BuildingClass::Sell_Back : VOC_RAMENU1 = GenericClick
BuildingClass::Mission_Construction : VOC_CONSTRUCTION = Construction
BuildingClass::Mission_Deconstruction : VOC_CASHTURN = SellSound
BuildingClass::Mission_Repair : ?
BuildingClass::Crew_Type : INFANTRY_ENGINEER = Engineer, Technician
BuildingClass::Factory_AI : if ( exitobj_retval <= 1 ): 45 = PlacementDelay
CellClass::Goodie_Check : ?
Wide_Area_Damage : ?
CrateClass::Put_Crate : OVERLAY_WATER_WOOD_CRATE = WaterCrateImg, OVERLAY_WOOD_CRATE = WoodCrateImg
CrateClass::Get_Crate : OVERLAY_WOOD_CRATE = WoodCrateImg, OVERLAY_STEEL_CRATE = CrateImg OVERLAY_WATER_WOOD_CRATE = WaterCrateImg
CreditClass::Graphic_Logic VOC_MONEY_UP and VOC_MONEY_DOWN = CreditTicks[up, down]
FootClass::Mission_Guard_Area : GuardModeStray?
FootClass::Active_Click_With : ANIM_MOVEFLASH = MoveFlash
FootClass::Sell_Back : VOC_CASHTURN = SellSound
HouseClass::AI : HarvesterUnit?
HouseClass::Attacked : VOX_BASER_UNDER_ATTACK = BaseUnderAttackSound
HouseClass::Place_Object : VOC_PLACE_BUILDING = BuildingSlam
HouseClass::Sell_Wall : VOC_CASHTURN = SellSound
HouseClass::Computer_Paranoid : AlliesAllowed?
InfantryClass::Enter_Idle_Mode : IdleActionFrequency?
MessageListClass::Add_Message : VOC_INCOMING_MESSAGE = IncomingMessage
ObjectClass::AI : -3 = ParachuteMaxFallRate, -100 = NoParachuteMaxFallRate
ObjectClass::In_Which_Layer : CruiseHeight?
ObjectClass::Paradrop : ANIM_PARABOMB = BombParachute, ANIM_PARACHUTE = Parachute
OptionsClass::Set_Sound_Volume : VOC_RABEEP1 = GenericBeep
OverlayClass::Mark : OVERLAY_WATER_WOOD_CRATE = WaterCrateImg, OVERLAY_STEEL_CRATE = CrateImg
RadarClass::Radar_Activate : VOC_RADAR_OFF = RadarOff, VOC_RADAR_ON = RadarOn
TeamClass::Coordinate_Move : 256 = CloseEnough
TechnoClass::Time_To_Build : ?
TechnoClass::Fire_At : ?
TechnoClass::Do_Uncloak : CloakingStages? VOC_SUB_SHOW or VOC_IRONCUR9 = CloakSound 
TechnoClass::Do_Cloak : CloakingStages? VOC_SUB_SHOW or VOC_IRONCUR9 = CloakSound 
TechnoClass::Visual_Character : 38 = CloakingStages
TechnoClass::Crew_Type : Crew, Technician
TerrainClass::Catch_Fire : ANIM_BURNMED or ANIM_BURNBIG = TreeFire
UnitClass::Harvesting : HarvesterLoadRate?
UnitClass::Mission_Unload : HarvesterDumpRate?
UnitClass::Mission_Harvest : TiberiumLongScan? TiberiumShortScan? HarvesterTooFarDistance RepairBay? HarvesterLoadRate?
AnimClass::Sort_Y : 0x10000 = YSortAdjust (read as YSortAdjust in RA2 AnimTypeClass Read_INI, passed to AnimClass)
UnitClass::Crew_Type : Crew, Technician
AircraftClass::Take_Damage - INFANTRY_E1 = Pilot
UnitClass::Take_Damage 400 = ShakeScreen
AnimClass::Do_Atom_Damage ? = NukeWarhead
BulletClass::Bullet_Explodes : ? = NukeWarhead
InfantryClass::Get_Image_Data : E1.shp = Disguise, (Type == INFANTRY_SPY) ? = Disguised
UnitClass::Try_To_Deploy : VOC_PLACE_BUILDING = BuildingDrop
BulletClass::AI : ANIM_FIREBALLFADE : ANIM_SMOKE_PUFF = Trailer

Sidebar scrolls to top when prereqs get updated.

If you lose or again a building prerequisites get updated which makes the sidebar reset its scroll position, we should work out some solution that maintains the scrolled location, at least roughly.

Pathfinding fails in some cases

ra95 dat_2019-04-30_15-02-09
If i place a Ranger bellow to the tree and give a move order to the area where the cursor is to the infantry unit placed next to the tree the infantry unit won't move.

Sidebar edges have drawing issues

If any debug text is on printed on the cells and you scroll around eventually the text is gonna start at the tactical's edges.
Showing the old RA++ project screenshot as it shows best what i mean,
redalertplusplus_2017-01-19_14-19-34

however this issue is present since TD.
2016-03-03_15-15-02

This is likely due to incorrect Window dimensions that leave deadzones where no redrawing is done.

Sidebar Strip window dimensions go off screen

stripwindow
the strip window is 160x192 at 496:180
Its possible it was intended to cover the powerbar too as it is the sidebar's width which is 160 pixels.
Need to investigate how aligning it back affects drawing, and how fixing the width but keeping the position affects the drawing.

Aircraft have prebuilding issues.

When you fill say all your airstrips with Yaks you can't build more until a airstrip is free, in RA you could prebuild the next unit.

Map edges aren't redrawn

When a unit is leaving the map at the edge the visual is likely to stick around until the cell is forced to redraw.

Match C&C cloaking behaviour.

While close, the current implementation apparently doesn't quite match the behaviour of the cloak effect in the original C&C, with the haze being "right leaning" rather than "left leaning". This needs to be investigated and fixed at some point.

GameMouseClass::AI isn't resetting the cursor

This is something we caused
Steps to reproduce it always are
Move the viewport to a water area so that there's water cells behind the sidebar as well, then select a vessel near the sidebar, slide the mouse over to the sidebar, it will remain on the move cursor

Save resource state in map editor mode.

When switching to ingame from the editor the resources will grow, switching back to the editor you end up being forced to save the map with the new resources.
We should capture the resource state and restore it upon jumping into the editor. Alternatively we could make the editor load the map again instead of maintaining the existing state to prevent this all together.

Idea on Adding a visual build range indication

trans Icon contains a unidentified tile that isn't used anywhere anymore, it looks strikingly like build range indication art
trans
especially when stacked as seen in this mockup image
brnage
and with some color
brnage3

This would likely be a optional feature not something enabled by default.
From a technical point of view i see this being possible to do in the 8-bit limits by using Fading tables.

Remove redalert.ini check in Main

WinMain checks for "REDALERT.INI" which is redundant on the Windows version.
Reason for this logic is cause in DOS you HAD to run SETUP before you could start the game cause SETUP set up the sound configuration. This config, while read, isn't actually used by the Windows version.

Removing this check will solve first run freezes as the game gets stuck looking for the ini.
We should write a new ini instead if none exists.

Possible stuck in a endless read loop somewhere

At a rare chance a heavy spike in the I/O happens.
It might be when it can't play a theme, couldn't trigger it again to check
Game is still playable only abusive I/O is going on in background.

Theme is always 0 on start

This issue is also present in C&C95 It always plays track 1 on game start unless scenario specifies otherwise, this was fixed in Sole Survivor and TS.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.