Skip to content

Draft: implement ice material with new material layer type #3069

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 34 commits into from

Conversation

AssassinTee
Copy link
Contributor

@AssassinTee AssassinTee commented Feb 12, 2022

This draft is the follow-up/combination of #3068 and #2804 which implements ice and allows to add all kinds of other stupid materials you can imagine without a version break into 0.7.x!

Usage:

Map creation

Open any ctf map in the editor
Right click on the gameGROUP
Add a material layer
paint ice over all tiles that you want to be ice

Server

Start server with a map that has a Material layer

Client

Use the new Client!

Enjoy

Problems

What does happen to an old client on ice, I guess a lot of prediction errors due to other tuning variables
Solution: send a tuning package on changes

Screenshots

You can paint your material simply over EVERYTHING (solids, deathtiles, air, pickups, ...) and if a behaviour is programmed it will do stuff 😆 For example ice does ice stuff only on solids (hookable and unhookable)

screenshot_2022-02-13_11-06-31

@AssassinTee AssassinTee marked this pull request as draft February 12, 2022 16:48
@C0D3D3V
Copy link

C0D3D3V commented May 27, 2022

What is the reason for CLayerCustom? And also what is the status of this PR?

@AssassinTee
Copy link
Contributor Author

AssassinTee commented May 28, 2022

What is the reason for CLayerCustom? And also what is the status of this PR?

This PR is fully implemented and based upon #3068. The custom layer has nothing directly to do with the material layer but(see edit) allows to load mod specific non visual layers of any type. I managed to load Tele-layers and Water-layers (shoutouts to @Stiopa866 ) with it.

While #2804 adds a custom solid hookable block for ice, this PR uses an entire new layer for materials (in general) and implements the ice variant. You can simply paint materials like ice over the standard game layer. This would allow for ice-solids[1], ice-unhookables[1], ice-death[2], ice-spawns[3], ice-grenade-spawns[3], ice-ninjas[3] and all other ice-types of standard gametiles.

[1] other physics
[2] other animation(s)
[3] whatever that means 😆

Edit: I remembered 🤦‍♂️ : The custom layer Is a general layer which allows to add any non-visual game layer. A Material layer is a SUBTYPE of a custom layer. BUT WHY? DDNet was adding flags for every new gamelayer they added. In order to be compatible to mods and ddnet I decided to determine the layer type by it's NAME, so if I create a custom layer, name it "Material" and use it, it gets recognized as material layer. Technically this could allow multiple layers of the same type (e.g. multiple water layers for example)

@@ -21,13 +22,15 @@ class CCollision
COLFLAG_SOLID=1,
COLFLAG_DEATH=2,
COLFLAG_NOHOOK=4,
COLFLAG_ICE=8,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this, shit should not be needed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants