Skip to content

seppedelanghe/Crapper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Crapper: A 2D Game Engine in Go

Crapper is a lightweight, crappy 2D game engine written in Go, leveraging Ebiten for rendering. Its goal is to provide essential game development functionality while maintaining a clean, modular architecture for building cross-platform 2D games.

Features

  • Entity-Component System: Flexible object composition
  • Physics: Collision detection and resolution
  • Path Finding: A* and Dijkstra's algorithms
  • Vector Math: Comprehensive 2D vector operations
  • Event System: Decoupled communication between systems
  • Animation: Sprites, spritesheets and animations
  • Resource Management: Efficient asset loading and caching
  • Input Handling: Keyboard, mouse, and gamepad support
  • Scene Management: Organize game objects and logic

Todo List

General

  • Implement vector math operations and utilities
  • Set up basic project structure
  • Main game object
  • Create and manage scenes
  • Transition between scenes
  • Entity creator template
  • Camera

Algorithms

  • Heuristic functions
  • Develop node and priority queue systems for path finding
  • Implement A* algorithm
  • Implement Dijkstra's algorithm
  • Collision detection

Components

  • Position
  • Velocity
  • Acceleration
  • Size
  • Sprite
  • AnimatedSprite
  • UserInput
  • MouseClickFollow
  • Health
  • Collision
  • Targeting

Systems

Split by responsibility, not by mechanism.

  • Interface
  • Movement
    • Acceleration
    • Velocity
    • MouseClickFollow
  • Debug
  • Rendering
    • Sprite
    • AnimatedSprites
    • HealthBar
  • UserInput
  • Health
  • TargetAcquisition
    • Multi layer

Assets

  • SpriteManager
  • SpriteSheetManager

Getting Started

package main

import (
    "github.com/seppedelanghe/crapper/pkg/engine/core"
)

func main() {
	gameOpts := game.GameOptions{
		Width: 640,
		Height: 480,
		Vsync: true,
		WindowResize: false,
	}
    game := core.NewGame()

    // Configure your game...

    if err := game.Run(); err != nil {
        panic(err)
    }
}

About

A crappy game engine written in Go

Topics

Resources

Stars

Watchers

Forks

Contributors

Languages