Coder Social home page Coder Social logo

valks-games / sankari Goto Github PK

View Code? Open in Web Editor NEW
53.0 3.0 16.0 13.7 MB

A open source 2D platformer being made in Godot 4 beta C#

License: MIT License

C# 100.00%
game godot godot-engine godot-game csharp csharp-game game-2d game-dev game-development gamedev

sankari's Introduction

Discord

Preview.1.mp4
Preview.3.mp4
Preview.4.mp4

What is Sankari?

Sankari ("hero" in Finnish) is a non-profit F2P 2D Platformer about a hero whose village gets raided by the evil king. The hero goes on a journey to free back the villagers that were captured and defeat the evil king.

This project was created to gain experience in the C# Godot environment for the 2D Platform genre and to prove to myself that I can make a complete game. I hope in making this open source that others will also learn some things that I have learned.

The project will be considered complete when there is around 2 to 3 hours of fun and memorable content. Some of the major goals of the project include getting multiplayer to a playable state and making the code as flexible and as readable as possible.

If you have any questions or suggestions about the project or just want to talk to me in general, my Discord username is va#9904. You can also find me on the Sankari Discord.

Changelog

Roadmap

  • Use Godot scenes instead of one big master node handling all scene nodes. This will allow for easier testing of inidivual scenes in the future.
  • Wrap my head around the current codebase. Make the code look nicer. Make it less confusing to the reader.
  • Figure out why "Load First Level" option is not working as intended. (First level is loaded but map screen is hiding the level)
  • Tinker with the player movement more to get that more snappier platformer like feel.
  • Introduce new water tiles.

Project Setup

  1. Install the latest Godot 4 C# release
  2. Install .NET SDK 6.0
  3. Install .NET Framework 4.7.2
  4. In Godot Editor > Editor Settings > Mono > Builds: Make sure Build Tool is set to dotnet CLI

Contributing

License

Project

This project is under the MIT license

Assets

Credit

Thank you to the following wonderful people that helped make this project something even better

AdamLaine
Dunkhan
Muftwin
Policiu

sankari's People

Contributors

adamlaine avatar dunkhan avatar muftwin avatar policiu avatar valkyrienyanko 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

Watchers

 avatar  avatar  avatar

sankari's Issues

Saving The Game

What information should be saved when saving the game?

  • should there be icons the map that save the game like in super mario world?
  • should saving be available at all times and save the players exact position along with enemies current positions?

Parallax Backgrounds For Each Map Region

Each map region should have one or more parallax backgrounds. Grassy plains will be a region for sure in the game.

Parallax Background Checklist

Here is an example of what a parallax background looks like

Parallax.mp4

The tileset art is currently 16x16 in size. This may change in the future. Why does this matter? The higher the tile resolution, the higher the parallax background resolution. In the video above the tileset is 8x8 so you can see the super low resolution of the parallax background here.

Player Should Not Go Into Wall Jumping Mode When Near Walls That Should Not Be Wall Jumpable

Issue

If you look at 2.mp4 you can see how annoying this really is.

Possible Solutions

  • Only make certain tiles wall jumpable (hard to do since you can only reference tiles by their IDs and tiles IDs like to change if you change the order of the tiles. In other words you can't do if this tile is the sand tile then do this, you can only do the following in code if this tile is 1 then do this

  • Don't make tiles wall jumpable, but rather use collision box areas that are wall jumping zones

1.mp4
2.mp4

ENet-CSharp

Reminder to myself to implement ENet-CSharp from the Godot Modules project to here.

Platforms That Move Back And Fourth With Tween Node

The Goal

Click on the image below to watch a video from Game Endeavor explaining how to create platforms that move back and fourth with the Tween node.

name

What do the platforms look like right now?

1.mp4
2.mp4
3.mp4

What the code looks like right now?

Nothing fancy at the moment

namespace MarioLikeGame;
public class MovingPlatform : KinematicBody2D
{
public override void _PhysicsProcess(float delta)
{
var pos = Position;
pos.x += 0.1f;
Position = pos;
}
}

What Should Coins Do?

I want to add some kind of collectible (coins or gems or something shiny you know) to each level but I'm not sure what they should do. Should they increase the game score? Affect player lives? Act as a currency for a shop? Or do nothing and just increase a number on your screen that you can brag about to your friends.

Level 1 is too easy

Level 1 needs to be more difficult. Perhaps this is due to a lack of game assets right now. Feel free to try making the level more difficult with the current games assets.

Dynamic Camera

image

If you're a player at the top of this slope, you can't see what's ahead below of you.

Player Dashing Is Not The Best Right Now

I want to do something similar to Celestes player dashing

Issue

Dashing feels clunky right now. In the video below you see what dashing looks like however it was hard to achieve this as most times dashing does not work as it's based on the players current velocity so most dashes are super weak or even go in the opposite direction you want sometimes.

What dashing looks like right now

Dashing.mp4

Code

// dash
if (_inputDash && _dashReady)
{
_dashReady = false;
_currentlyDashing = true;
_timerDashDuration.Start();
_timerDashCooldown.Start();
}
if (_currentlyDashing)
{
var sprite = Prefabs.PlayerDashTrace.Instance<Sprite>();
sprite.GlobalPosition = GlobalPosition;
GetTree().Root.AddChild(sprite);
_velocity += _moveDir * 1000;
_gravity = 0;
}
else
_gravity = GRAVITY_AIR;

Map Movement Could Be Considered Tedious?

Right now with map movement you have to tap the right arrow twice to get to the next level. Tapping the right arrow once to get to the next level would be nice. Keep in mind that the map level placements are not just left to right, they could be placed in all 4 directions up, down, left, right. Look at how Super Mario World (SNES) does it. I want to do something similar to that where you tap right arrow (or whatever direction) once, and you see the animation of the player lerping to the new level but always following the path. Or should the game map be kept as is?

Player Stomp

Player should thrust themselves downwards and smash whatever is below them.

Game Lighting

Point light sources / dynamic sun sets etc.

Created this issue as a reminder. Not much to see here right now.

Crusher AI

image

Crusher should automatically find the point where it needs to crush based on the tiles created under it. Detection of tiles should start from A to B.

And of course try to crush the player if it detects the player underneath it.

I can do all of this, I'm just creating this issue as a reminder to myself.

Should I Use A State Machine For The Player Code?

I have seen people use state machines in tutorials for player movement but this often involves a lot of duplicate code but I guess the main player state manager script would have a bunch of methods to reduce the duplicate code. I have tried this before but it made the player logic much more complicated and many issues arose. For example the player was not jumping because they were not in a state that would allow jumping. (The switching of states was too slow, a frame behind causing big annoyance)

Level placement of coins is tedious. Helpers should be made to help with this.

Placing coins requires the level designer to copy paste coins which in Godot can prove to become tedious. There should be scripts to help automate this.

There should be a script that places coins in a circle (whether it be just the outline or the full circle) and a script for placing coins in a row. Disabled Area2D's should be used to get the radius / width of where the coins should go. To get an idea of how Area2D's are to be used, have a look at the prefab in res://Scenes/Prefabs/Platforms/Platform Circle.tscn

For the circle coin helper the properties should look something as follows

[Export] public bool onlyOutline; // if disabled, circle and outline are filled with coins distributed evenly
// no need for radius property as it's handled by the Area2D

For the row coin helper the properties should look something as follows

// no properties as Area2D tells script everything it needs to know (where the coins need to go)

Need level designer to make levels 2, 3, 4

Follow this template when making a new level

  • Make sure the LevelScene.cs script is attached to the node called Level A1 (or whatever the level is called, change the node name to that)
    image

  • Each level has a long blue rect called "Bottom" that kills the player if they touch it preventing them from falling endlessly out of the level

  • You will also notice a yellow rect, this is the camera limit (bounds) of the level, the camera won't go past these lines, set them to the bounds of the level
    image

For platforms once you for e.g. copy in a "MovingPlatform" scene, make the scene have editable children and drag the target position where you want the platform to go to.

Circle platforms circle around the point in which they are placed.

Take note platforms have public variables you can edit to set their delays and speeds.

If you have any questions please ask in the Discord.

Different Size Variations Of Same Enemy

This enemy should have different size variations. Maybe a size a little smaller and a few variations of sizes much bigger than it is now. A script should be thought of to make life easier when dealing with this. Perhaps a abstract script called "ABasicEnemy.cs" that all BasicEnemy.cs inherit from. I'm not sure.

image

Question About Using Modot (C# Godot Mod Loader)

I found this but I'm not sure how to use it to its full potential https://github.com/Carnagion/Modot

I see in the wiki they give an example of how to access the main scene tree but what if I wanted to for e.g. modify the player jumps to be more powerful through a mod? Or spawn more enemies in a level in specific locations? All the things mods can do, what are the limitations of this modloader?

Dependency Injection or Static? And what about singletons?

Should I have a game manager super class that has references to all the other manager scripts like audio manager and level manager and pass this reference of game manager to everything and access everything through game manager script OR should I make game manager and/or some of the other managers static as well and just watch out for cleanup after using static. Also what's the deal with singletons, what's the point of them? I feel like singletons make readability worse. Why not make everything static in the class so it's easier to type?

SFX / Music files need to be sorted better

At first I thought sorting the assets in folders by the artists names would work but this is proving to be very messy and hard to find stuff. Sorting them by their attributes would be a lot better. For example, a icy soundtrack should go into a folder called "Ice". A player dash should go into a folder called "Movement" or "Player/Movement"

Make sure you also edit the path names in Audio.cs script

image

image

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.