Git Product home page Git Product logo

flatland's Introduction

Flatland

Flatland is an attempt at writing a game-dev IDE using Go, imgui and Ebitengine. I chose 2D because it is at least an order of magnitude less effort than 3D. See quickstart.md if you just want to start trying stuff.

I've shamelessly stolen key ideas from Unreal, such as:

Separate builds for standalone games and editor builds

Packages are organized such that editor depends on the game. The game part does not need to use anything from the editor package, or from imgui if you don't want to.

Easy editing of user defined assets

If you register a struct with the asset package (asset.RegisterAsset), then the editor package will let you create and edit the exported fields of the struct. Likewise it is trivial to load assets with asset.Load, this loading will recursively load any assets that are linked.

Custom asset editors are easy to write

If you know a little imgui, you can write custom editors for your types, see image_ed.go for an example.

Actors and Components

You are not required to use the design style in the flat package. You may only want to use the asset and editor packages. The design of flat intends to be very data-driven which results in being able to build composite objects in the editor.

Basically everything in the game should be an Actor - something that has a Transform2D and exists in the world. There are various interfaces an Actor can implement (Drawable,Updateable,Playable) to be hooked into the main game loop. Your own Actors can embed ActorBase to get the default behaviours. Components are a way to implement features - a composition over inheritance pattern. You can dynamically attach Components to Actors in the editor and they will start ticking/drawing/etc.

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.