All Projects → felixangell → Strife

felixangell / Strife

Licence: mit
a simple 2d game framework

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to Strife

FWK
💎 3D game framework in C, with Luajit bindings now.
Stars: ✭ 423 (+71.95%)
Mutual labels:  game-framework, 2d
framework
The exomia/framework is used for building 2D and 3D games and more inspired by the XNA/Mono framework.
Stars: ✭ 21 (-91.46%)
Mutual labels:  game-framework, 2d
Serpent
Cross-platform gaming kit in the D programming language
Stars: ✭ 140 (-43.09%)
Mutual labels:  game-framework, 2d
Black
World's fastest HTML5 2D game engine   🛸
Stars: ✭ 174 (-29.27%)
Mutual labels:  2d
Unity Aseprite Importer
An aseprite-file importer for unity written in C#, built upon the experimental AssetImporter API
Stars: ✭ 177 (-28.05%)
Mutual labels:  2d
Cocos Game Framework
cocos-creator游戏框架,typescript版本。
Stars: ✭ 201 (-18.29%)
Mutual labels:  game-framework
Graphics32
Graphics32 is a graphics library for Delphi and Lazarus. Optimized for 32-bit pixel formats, it provides fast operations with pixels and graphic primitives. In most cases Graphics32 considerably outperforms the standard TBitmap/TCanvas methods.
Stars: ✭ 238 (-3.25%)
Mutual labels:  2d
Rgx
Modern mid-level 2D graphics library
Stars: ✭ 172 (-30.08%)
Mutual labels:  2d
Blah
A small 2d c++ game framework
Stars: ✭ 212 (-13.82%)
Mutual labels:  game-framework
Godot 3 2d Destructible Objects
A script that takes a sprite, divides it into blocks and makes them explode 💥!
Stars: ✭ 186 (-24.39%)
Mutual labels:  2d
Hitagi.js
JavaScript HTML5 game development framework
Stars: ✭ 184 (-25.2%)
Mutual labels:  game-framework
3d Bat
3D Bounding Box Annotation Tool (3D-BAT) Point cloud and Image Labeling
Stars: ✭ 179 (-27.24%)
Mutual labels:  2d
Pencil.js
✏️ Nice modular interactive 2D drawing library
Stars: ✭ 204 (-17.07%)
Mutual labels:  2d
Creature ue4
Unreal Engine 4 Runtimes for Creature, the 2D Skeletal + Mesh Animation Tool
Stars: ✭ 174 (-29.27%)
Mutual labels:  2d
Foster
a simple cross-platform game framework made in C# dotnet core
Stars: ✭ 221 (-10.16%)
Mutual labels:  game-framework
Goluwa
a game framework written in luajit
Stars: ✭ 173 (-29.67%)
Mutual labels:  game-framework
Pixieditor
PixiEditor is a lightweight pixel art editor made with .NET 5
Stars: ✭ 210 (-14.63%)
Mutual labels:  2d
Godot 3 2d Crt Shader
A 2D shader for Godot 3 simulating a CRT
Stars: ✭ 183 (-25.61%)
Mutual labels:  2d
Html5 Canvas Game Boilerplate
Provides a set of default code that makes getting up and running with an HTML5 canvas game very easy.
Stars: ✭ 182 (-26.02%)
Mutual labels:  game-framework
Webgl Plot
A high-Performance real-time 2D plotting library based on native WebGL
Stars: ✭ 200 (-18.7%)
Mutual labels:  2d

strife Build Status

A simple game framework that wraps around SDL2.

example

The largest example use of the Strife framework is the Phi text editor, a text editor written entirely from scratch with syntax highlighting, a command palette, multiple buffer support, etc.

Though there are some smaller examples demonstrating components of the Strife API in the examples/ folder.

note/disclaimer

This is a work in progress. It provides a very minimal toolset for rendering shapes, images, and text as well as capturing user input. This is not at a production level and is mostly being worked on when the needs of my other projects (that depend on this) evolve.

There is no documentation either! If you want to use it you will have to check out the examples. I may get round to writing some documentation but the API is very volatile at the moment.

installing

Simple as

$ go get github.com/felixangell/strife

Make sure you have SDL2 installed as well as the ttf and img addons:

$ brew install SDL2 SDL2_ttf SDL2_img

getting started

This is a commented code snippet to help you get started:

func main() {
	// create a nice shiny window
	window := strife.SetupRenderWindow(1280, 720, strife.DefaultConfig())
	window.SetTitle("Hello world!")
	window.SetResizable(true)
	window.Create()

	// this is our event handler
	window.HandleEvents(func(evt strife.StrifeEvent) {
		switch event := evt.(type) {
		case *strife.CloseEvent:
			println("closing window!")
			window.Close()
		case *strife.WindowResizeEvent:
			println("resize to ", event.Width, "x", event.Height)
		}
	})

	// game loop
	for {
		// handle the events before we do any
		// rendering etc.
		window.PollEvents()

		// if we have a window close event
		// from the previous poll, break out of
		// our game loop
		if window.CloseRequested() {
			break
		}

		// rendering context stuff here
		// clear and display is typical
		// all your rendering code should
		// go...
		ctx := window.GetRenderContext()
		ctx.Clear()
		{
			// ...in this section here
			ctx.SetColor(strife.Red)
			ctx.Rect(10, 10, 50, 50, strife.Fill)

			// check out some other examples!
		}
		ctx.Display()
	}
}

license

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].