Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kubgus/bloodline
A 2D game framework/engine for simple games and projects.
https://github.com/kubgus/bloodline
Last synced: about 11 hours ago
JSON representation
A 2D game framework/engine for simple games and projects.
- Host: GitHub
- URL: https://github.com/kubgus/bloodline
- Owner: kubgus
- License: mit
- Created: 2023-05-14T20:27:18.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2023-10-02T20:38:47.000Z (over 1 year ago)
- Last Synced: 2023-10-03T04:54:15.924Z (over 1 year ago)
- Language: C#
- Homepage:
- Size: 1.22 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# BloodlineA 2D game framework/engine for simple games and projects.
## What is Bloodline? 🖼️
I created Bloodline as my "final" C# project, before fully moving to C++. It's meant as a proof of all I've learned in C#. Bloodline can be used by anyone.## How to use it? 🧑💻
Download or compile a DLL of Bloodline, include it in your project and you're done!1. Create your game class:
```cs
using BloodlineEngine;namespace MyGame {
public class Game : BLApplication
{
public Game() : base(512f, "My First Game!", lauchWithConsoleShown: true) { }
}}
```
2. Modify your `Program.cs`:
```cs
using BloodlineEngine;namespace MyGame {
class Program
{
static void Main()
{
Bloodline.StartApplication();
}
}}
```
3. Start adding content:
```cs
using BloodlineEngine;namespace MyGame {
public class Player : Root
{
public override void Init()
{
CreateComponent()
.Col("#ff0000")
.Scl(20f);
CreateComponent();
}
}public class PlayerMovement : Component
{
readonly float Speed = 5f;public override void Update()
{
if (Input.IsKeyPressed(Keyboard.W)) { Transform.Position.Y -= Speed; }
if (Input.IsKeyPressed(Keyboard.S)) { Transform.Position.Y += Speed; }
if (Input.IsKeyPressed(Keyboard.A)) { Transform.Position.X -= Speed; }
if (Input.IsKeyPressed(Keyboard.D)) { Transform.Position.X += Speed; }
}
}}
```
4. Add core game functionality:
```cs
using BloodlineEngine;namespace MyGame {
public class Game : BLApplication
{
// Rest of the class...public override void Ready()
{
Renderer.ClearColor = (0,0,0,0);Instantiate();
}
}}
```## Cross-platform ⭐
This service is cross-platform. It should work on Windows, Mac, Linux, Android and iOS. Not thoroughly tested yet.