feat: Add a new template: 2D Platformer#3042
Conversation
|
Is the PR done? Or still WIP? |
Done and ready to be reviewed. |
Ethereal77
left a comment
There was a problem hiding this comment.
I have made some comments on things you can improve.
Sorry for all the nitpicking, it is to mantain a common code style along Stride codebase.
Nice work overall!
Eideren
left a comment
There was a problem hiding this comment.
Looks really good ! Just a few minor things to show best practices
|
As a last step after having done all of that (to avoid too much hassle), but before calling it done, I would propose to rename the template and its related files and projects to |
This makes sense. I had to do the same in the toolkit.. many things are now Something2D.. |
|
Alright, but before I create a new project with the same settings: Is there an easy way to renaming? Because I assume with projects there are always some kind of references set somewhere that relate to the name and I can't just go through each file and So what I'm saying is, it's easiest to just create a new project with Platformer2D as it's name + namespace. |
|
Whatever is easier for you. For these kind of things, I usually do this:
This way, the history of the files is correctly preserved. |
|
@Eideren so I pushed the code changes, but I guess the required fields set via the editor are saved in a different file. Looking through the files like scene and prefabs I am unable to see where exactly those values are saved (what has been selected for the required fields). Any idea? The only difference I see between my local project and the template is a difference in UUIDs |
|
@D4rkDuck Maybe you forgot to reload the code or something broke during reload, but here is the required property highlighted in the editor on your coin prefab |
Yes I commented about 20minutes ago that the required fields are missing haha. How would I get the changes? I am testing the code in a local project and then copy stuff into the template-repo. So just copying the code from the .cs files isn't enough for the component selection in the editor. |
|
Ah, right, my bad, I didn't understand your issue. All objects and properties in prefabs and scenes are saved in their respective |
hmm what exactly is needed to be overwritten? Taking just the content of the coin prefab and scene is not enough and seems to break the project (assets can't be found and scene doesn't exist). I assume that is because of conflicting IDs set in those files (main ID at the top and all ref ids). So the simplest would be:
|
|
Right, you could copy/paste the whole asset directory, best to open the project directly in the sample directory and correct it there though, which I did and pushed in this PR to avoid wasting your time ;) |
Ah I see, new things learned. Thanks! |
|
Finally took the time to merge it in, thanks a bunch @D4rkDuck |




PR Details
This PR adds a new template to the stride launcher.
The template adds very basic functionality with no specialized code architecture, making it perfect for newbies to get into creating a new 2D project.
This template uses new assets from two new CC0 licensed asset packs:
Related Issue
Feat: 2D Platformer Template #3030
Types of changes
Checklist
When rebuilding the solution there are 3 error messages related to tests. I believe these are unrelated to my changes. Stride.GameStudio launches with no problems.
Visuals
Here are screenshots of the launcher and launched game: