• Stars
    star
    217
  • Rank 182,446 (Top 4 %)
  • Language
    C++
  • Created about 9 years ago
  • Updated 9 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

2D engine / framework built around SFML

xygineXT

Github Actions

The next iteration of xygine....

Logo by Baard

2D Game Engine Framework built around SFML. xygine implements a scene graph along with an Entity Component System. I use this as the starting point for new projects, as it evolves slowly over time. The source for xygine is released under the zlib license in the hope that it may be useful for other people - but offers no warranty that it is fit for any particular purpose, even those for which it was specifically written...

This version provides an overhauled API and, as such, is not compatible with existing versions of xygine - hence the slightly different naming. The biggest changes are to the Entity Component System for flexible, modular development of systems with a data-driven approach, as well as the removal of 3D support. If you're interested in a 3D, crossplatform, mobile compatible framework with a very similar API, check out crogine.

xygine uses C++17 features so an up to date compiler is required, for example XCode 10 on macOS, Visual Studio 2017 on windows or recent versions of gcc and clang.

A full tutorial covering the process of creating a xygine game can be found in the tutorial directory of the repository.

See some of the games I've made with xygine here!

What's new?

All new modular ECS providing a flexible and performant API for implementing custom components and systems, which compliment the systems included in the library

Reworked CMake build system, courtesy of Jonny 'The Machine' Paton, using modern CMake syntax as well as being Visual Studio compatible.

All new reliable network connection classes dedicated to creating gameplay oriented connections based upon the indomitable Enet

There is also a collection of utilites which may be useful for development of projects in the 'extras' directory.

Contributions

Contributions should be acknowledged and are gratefully accepted from:
Jonny Paton (Build system and CI setup and many usability improvements)
Jean-Sebastien Fauteux (macOS Testing)
Baard (Awesome Logo)

FAQ

Where's the 3D stuff gone?

While it had the potential to look very pretty the 3D API did not mesh (pun intended ;) ) well with the 2D rendering. Mixing custom OpenGL, particularly non-core 2.1 level, with SFML meant that it did not perform optimally, as well as not working on macOS which doesn't support compatibility profiles. If you really want 3D there are many better engines/frameworks out there, including crogine, another framework by myself which is optimised for 3D, particularly on mobile devices. It features a very similar API to xygine too.

What about physics stuff?

The physics binding of Box2D has been removed, mostly because I wasn't using it. It may return in the future, but thanks to the new ECS API implementing your own binding to any physics engine of choice, or even implementing your own collision detection is super easy. There's an example of a Chipmunk2D binding in the 'extras' directory.

...and the Tiled map support?

This had already been spun out into tmxlite and maintaining two versions of it seemed an unnecessary amount of work. Tmxlite works easily with any project, and is even used in the demo project included in this repository.

So I can't use the old version any more?

Sure you can. From now on the old revision is referred to in the documentation as 'legacy', and can be found in its own branch. The wiki pages remain available, although the doxy generated content is offline and will need to be generated from the docs directory using doxygen.

Why xygine?

The name is simply derived from the fact that this is a 2D framework - hence xy, followed by the gine part of engine (although technically xygine isn't really an engine).

xygine uses native file dialogue
https://github.com/mlabbe/nativefiledialog
and dear imgui
https://github.com/ocornut/imgui
https://github.com/eliasdaler/imgui-sfml

/*********************************************************************
(c) Matt Marchant & contributors 2017 - 2021
http://trederia.blogspot.com

xygineXT - Zlib license.

This software is provided 'as-is', without any express or
implied warranty. In no event will the authors be held
liable for any damages arising from the use of this software.

Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute
it freely, subject to the following restrictions:

  1. The origin of this software must not be misrepresented;
    you must not claim that you wrote the original software.
    If you use this software in a product, an acknowledgment
    in the product documentation would be appreciated but
    is not required.

  2. Altered source versions must be plainly marked as such,
    and must not be misrepresented as being the original software.

  3. This notice may not be removed or altered from any
    source distribution.
    *********************************************************************/

More Repositories

1

tmxlite

lightweight C++14 parser for Tiled tmx files
C++
359
star
2

sfml-tmxloader

SFML 2.x based tmx tilemap parser for files created with Tiled tile map editor
C++
105
star
3

crogine

SDL2 Based Game Framework
C++
55
star
4

pseuthe

Casual Survival Game
C++
47
star
5

crush

2D Competitive Platform Game written using C++ / SFML
C++
45
star
6

sdl2vs

Example Visual Studio Solution for SDL2 projects on Android.
Java
34
star
7

osgc

Open Source Game Collection - mini games created with xygine and SFML!
C++
22
star
8

xyExperimental

Experimental projects made with xygine
C++
11
star
9

CHIP8

A CHIP-8 interpreter for SFML supported platforms
C++
10
star
10

gp3d-water

Source to accompany article on creating water in OpenGL
C++
8
star
11

sfchat

Simple network chat protocol built on SFML
C++
7
star
12

CHUF

Carefully Handcrafted Unnamed Framework
C++
6
star
13

spin

Intel 8080 emulator
C++
5
star
14

LunarMooner

Simple arcade game built with xygine and SFML
C++
4
star
15

scratchvaders

sound powered space invaders!
C++
3
star
16

sms-slinger-update

Updated source to the Sega Master System emulator found at codeslinger.co.uk
C++
2
star
17

RoboMower

Programmable lawn mowing fun!
C++
2
star
18

RS232_Wrap

Wraps OS native functions on Windows and Linux into a single cross platform C++ class for maintaining RS232 connections
C++
1
star
19

xyDocs

doxygen generated API docs for xygine
HTML
1
star
20

sfwaveform

SFML based audio file player which also renders a waveform
C++
1
star
21

AVRpp

small selection of 8-bit AVR utilities written in C++
C++
1
star
22

VideoTexture

Renders an MPEG1 video to an SFML Texture using the pl_mpeg library
C
1
star