Skip to content

Commit

Permalink
Update readme, add contribution guide
Browse files Browse the repository at this point in the history
  • Loading branch information
Rampastring committed Jan 8, 2024
1 parent 6d05973 commit ced5cab
Show file tree
Hide file tree
Showing 3 changed files with 181 additions and 29 deletions.
150 changes: 150 additions & 0 deletions Contributing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
# Contributing

This file lists the contributing guidelines that are used in the project.

### Commit style guide

Commits start with a capital letter and don't end in a punctuation mark.

Right:
```
Treat usernames as case-insensitive in user collections
```

Wrong:
```
treat usernames as case-insensitive in user collections.
```

Use imperative present tense in commit messages instead of past tense.

Right:
```
Add null-check for GameMode
```

Wrong:
```
Added null-check for GameMode
```

### Game Support

When writing code or planning a feature, consider that WAE supports a broad number of games: Tiberian Sun and Red Alert 2 and all of their mods. Try to make features beneficial to all games as far as possible.

WAE supports all target games through a single executable. All submitted code _must_ be compatible with all games. If a specific feature is not available in a game, make it so the feature can be disabled in the editor's configuration for the game.

There are 3 branches: `master` is for Dawn of the Tiberium Age, `tsclient` is for Tiberian Sun (CnCNet Client version), and `yr` is for Yuri's Revenge. Code-wise these branches are identical, but `tsclient` and `yr` have one additional commit that gives them different INI configurations compared to `master`.

### Pull Requests

Make sure that the scope of your pull request is well defined. Pull requests can take significant developer time to review and very large pull requests or pull requests with poorly defined scope can be difficult to review.

One pull request should _only implement one feature_ or _fix one bug_, unless there is a good reason for grouping the changes together.

Do not heavily refactor the style of existing code in a pull request, unless the refactored code fits to the scope of the pull request (feature or bug fix). Rather, if you want to refactor existing code just for the sake of refactoring or getting rid of technical debt, create a secondary pull request for that purpose.

**Make sure your code and commits match this style guide before you create your pull request.**

Pull requests that are not well defined in their scope or pull requests that don't otherwise match this guide can end up rejected and closed by the staff.

### Code style guide

We have established a couple of code style rules to keep things consistent. Please check your code style before committing the code.
- We use spaces instead of tabs to indent code.
- Curly braces are always to be placed on a new line. One of the reasons for this is to clearly separate the end of the code block head and body in case of multiline bodies:
```cs
if (SomeReallyLongCondition() ||
ThatSplitsIntoMultipleLines())
{
DoSomethingHere();
DoSomethingMore();
}
```
- Braceless code block bodies should be made only when both code block head and body are single line. Statements that split into multiple lines and nested braceless blocks are not allowed within braceless blocks:
```cs
// OK
if (Something())
DoSomething();

// OK
if (SomeReallyLongCondition() ||
ThatSplitsIntoMultipleLines())
{
DoSomething();
}

// OK
if (SomeCondition())
{
if (SomeOtherCondition())
DoSomething();
}

// OK
if (SomeCondition())
{
return VeryLongExpression()
|| ThatSplitsIntoMultipleLines();
}
```
- Only empty curly brace blocks may be left on the same line for both opening and closing braces (if appropriate).
- If you use `if`-`else` you should either have all of the code blocks braced or braceless to keep things consistent.
- Code should have empty lines to make it easier to read. Use an empty line to split code into logical parts. It's mandatory to have empty lines to separate:
- `return` statements (except when there is only one line of code except that statement);
- local variable assignments that are used in the further code (you shouldn't put an empty line after one-line local variable assignments that are used only in the following code block though);
- code blocks (braceless or not) or anything using code blocks (function or hook definitions, classes, namespaces etc.)
```cs
// OK
int localVar = Something();
if (SomeConditionUsing(localVar))
...

// OK
int localVar = Something();
int anotherLocalVar = OtherSomething();

if (SomeConditionUsing(localVar, anotherLocalVar))
...

// OK
int localVar = Something();

if (SomeConditionUsing(localVar))
...

if (SomeOtherConditionUsing(localVar))
...

localVar = OtherSomething();

// OK
if (SomeCondition())
{
Code();
OtherCode();

return;
}

// OK
if (SomeCondition())
{
SmallCode();
return;
}
```
- Use `var` with local variables when the type of the variable is obvious from the code or the type is not relevant. Never use `var` with primitive types.
```cs
// OK
var list = new List<int>();

// Not OK
var something = 6;
```
- A space must be put between braces of empty curly brace blocks.
- Local variables, function/method args and private class fields are named in `camelCase` and a descriptive name, like `houseType` for a local `HouseType` variable.
- Classes, namespaces, and properties are always written in `PascalCase`.
- Class fields that can be set via INI tags should be named exactly like the related INI tags.

Note: The style guide is not exhaustive and may be adjusted in the future.
60 changes: 31 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,35 +1,26 @@
![Dawn of the Tiberium Age Logo](https://github.com/Rampastring/TSMapEditor/raw/master/dtalogo.png "DTA Logo")
# C&C World-Altering Editor (WAE)

# World-Altering Editor (WAE)
Modern open-source map and scenario editor for

Work-in-progress scenario editor for

- Dawn of the Tiberium Age (DTA) https://www.moddb.com/mods/the-dawn-of-the-tiberium-age
- Command & Conquer: Tiberian Sun
- Command & Conquer: Red Alert 2 Yuri's Revenge
- Command & Conquer: Tiberian Sun
- Dawn of the Tiberium Age (DTA) https://www.moddb.com/mods/the-dawn-of-the-tiberium-age

## Motivation

The purpose of the World-Altering Editor project is to develop a new scenario editor for
Dawn of the Tiberium Age, Tiberian Sun and Red Alert 2,
replacing the old FinalSun map editor developed in the TS/RA2 modding community in the early 2000s.
I think it has been sad to see the ancient map editor restrict the community as much as it has done,
and instead of developing a proper replacement for it (which could be achieved relatively quickly),
the community has instead started writing complex hacks for the old editor by reverse-engineering it,
modifying its executable and injecting code into the editor in the form of custom DLLs.

I think it'd be much better in the long term to focus these efforts on building a new editor
instead of modifying one that has no available source and that is based on a very outdated technological base.
The World-Altering Editor is a new map editor for the second-generation classic Command & Conquer games,
designed to replace the old FinalSun/FinalAlert (FS/FA) map editor developed in the TS/RA2 modding community in the early 2000s.

To make it familiar for existing mappers, the editor is designed to follow the FinalSun UI design,
To make it familiar for existing mappers, the editor is designed to follow the FS/FA UI design,
but with modernizations and changes to make the editor smoother and more efficient to use.

## Current state of the project
## State of the project

The editor includes nearly all tools present in FinalSun and a significant number of
new ones. Many familiar tools have also been improved with significant quality-of-life improvements.
Some tools might still require some testing and tweaking to achieve perfection. New functionality
and helpful features are being constantly added to make the mapping experience smoother and more efficient.
The editor includes practically all tools present in FS/FA and a significant number of
new ones. Many familiar tools have also been improved with significant quality-of-life improvements.
These improvements make it much more efficient to create maps with WAE than the old FS/FA map editors.

New functionality and helpful features are being constantly added to make the mapping experience smoother and more efficient.

Graphically the editor is better than FinalSun aside from lacking voxel support
and requiring a higher-end system. However, if you do have a powerful system, the editor
Expand All @@ -43,28 +34,39 @@ If you absolutely need a 32-bit build, you can modify the source to produce one.

The editor needs considerable VRAM, as the sprite graphics of the game are currently
converted into full 32-bit ARGB textures prior to drawing. In case of
Dawn of the Tiberium Age, the editor appears to allocate roughly 500 MB of VRAM.

The renderer is also relatively heavy on both the CPU and GPU.
Dawn of the Tiberium Age, the editor appears to allocate roughly 1 GB of VRAM.

## Downloads

There is a build workflow on new commits being pushed, which allows you to download the editor from the build artifacts:
For most end-users, it is recommended that you download our latest official release: https://github.com/Rampastring/TSMapEditor/releases

Development builds are available through our automated build workflow which is run whenever new commits are pushed. You can download the editor from the build artifacts:
https://github.com/Rampastring/TSMapEditor/actions

Aside from that, there is currently no publicly hosted download other than the editor being included with Dawn of the Tiberium Age.
If you need a separate download, you can contact me and ask for one on DTA's Discord server: https://discord.gg/6UtC289
If you are mapping for Dawn of the Tiberium Age, the editor is bundled with the mod.

## Contributing

We gladly accept contributions as long as they are well made and we deem them as beneficial for a significant part of the editor's userbase.

Follow the guidelines in `Contributions.md` when creating pull requests.

## License

The editor is licensed under the GNU General Public License, version 2.
The editor is licensed under the GNU General Public License, version 3.
If you create and publish a derivate, you need to also release your source code for the fork.
Please see LICENSE.txt for more details.

EA has not endorsed and does not support the World-Altering Editor.

## Screenshot

![Screenshot of the editor](https://github.com/Rampastring/TSMapEditor/raw/master/mapeditor.jpg "Map Editor Screenshot")

## Introduction video

[![Dawn of the Tiberium Age Scenario Editor Introduction](https://github.com/Rampastring/TSMapEditor/raw/master/videopreview.jpg)](https://www.youtube.com/watch?v=jIcr3nCqx7M "Dawn of the Tiberium Age Scenario Editor Introduction")

The World-Altering Editor was originally developed by the Dawn of the Tiberium Age staff for their mod. TS and YR support were added later to offer a boost in mapping efficiency to the rest of the second-generation C&C community.

[![Dawn of the Tiberium Age Scenario Editor Introduction](https://github.com/Rampastring/TSMapEditor/raw/master/dtalogo.png)](https://www.moddb.com/mods/the-dawn-of-the-tiberium-age "Dawn of the Tiberium Age Homepage")
Binary file modified mapeditor.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit ced5cab

Please sign in to comment.