GithubHelp home page GithubHelp logo

stregasgate / gateenginedemos Goto Github PK

View Code? Open in Web Editor NEW
30.0 3.0 5.0 353 KB

Example projects for GateEngine, a cross platform game engine for Swift developers.

License: Apache License 2.0

Swift 100.00%
2d-game-engine 2d-game-framework 3d-game-engine 3d-game-framework engine2d engine3d game-development gamedev spm swift

gateenginedemos's Introduction

GateEngine Demos

Example projects for GateEngine, a cross platform game engine for Swift developers.

CI

Navigating this Package

Projects are organized as their own executable. Each project is a single swift source file.
There are no "helper" functions or dependences.

Available Examples

General

  1. User Input: Show text when using certain user inputs.
  2. Multiple Windows: Open multiple windows on compatible platforms.
  3. Save State: Save and restore game state.

2D

  1. Animated Sprite: An animated sprite loaded from assets.
  • Pong: A virtual table tenis clone.
  • JRPG: Uses Sprite, TileMap, Scripting, and StateMachine.

3D

  1. Rotating Cube: A textured cube loaded from assets.
  2. Skinned Character: An animated character loaded from assets.
  3. Mouse Picking: Changes the color of an object under the mouse cursor.
  • First Person: Move around a level with mouse and keyboard controls.

Support GateEngine!

If you appreciate this project, and want it to continue, then please consider putting some currency into it.
Every little bit helps! Support With: GitHub, Ko-fi, or Patreon.

Community & Followables

Discord Twitter YouTube Reddit

gateenginedemos's People

Contributors

mgrider avatar strega avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

gateenginedemos's Issues

The README has a bunch of broken links (to demos).

When you click on three of the hyperlinks in the README that link to the individual demos, you get a GitHub 404 page instead. The first three demos (User Input, Multiple Windows and Save State) have broken links. The links for the 2D and 3D demos are fine.

Error in `IOKitGamePadInterpreter.swift` causes build failure

I'm seeing the following error:

Access level on imports require '-enable-experimental-feature AccessLevelOnImport'

I first saw it in my own project after updating to 0.2.0, but it also happens when I try and build this demo repo. I can build again by reverting my project to GateEngine 0.1.2.

Assertion Failure Upon Launch for one 2D and All 3D Demos

Project cloned from this repository. Running 2D_01_AnimatedSprite executable runs into assertion failure upon launch:
GateEngine/Entity.swift:50: Assertion failed: Component "SpriteComponent" is not a member of this entity.

Stack trace:

* thread #2, queue = 'com.apple.root.user-initiated-qos.cooperative', stop reason = Assertion failed: Component "SpriteComponent" is not a member of this entity.
    frame #0: 0x00000001b58c896c libswiftCore.dylib`_swift_runtime_on_report
    frame #1: 0x00000001b59719f8 libswiftCore.dylib`_swift_stdlib_reportFatalErrorInFile + 208
    frame #2: 0x00000001b5567330 libswiftCore.dylib`closure #1 (Swift.UnsafeBufferPointer<Swift.UInt8>) -> () in closure #1 (Swift.UnsafeBufferPointer<Swift.UInt8>) -> () in Swift._assertionFailure(_: Swift.StaticString, _: Swift.String, file: Swift.StaticString, line: Swift.UInt, flags: Swift.UInt32) -> Swift.Never + 104
    frame #3: 0x00000001b5566428 libswiftCore.dylib`Swift._assertionFailure(_: Swift.StaticString, _: Swift.String, file: Swift.StaticString, line: Swift.UInt, flags: Swift.UInt32) -> Swift.Never + 260
  * frame #4: 0x0000000100054b2c 2D_01_AnimatedSprite`Entity.subscript.getter(type=GateEngine.SpriteComponent, self=0x0000600000c75800) at Entity.swift:50:13
    frame #5: 0x0000000100055604 2D_01_AnimatedSprite`Entity.configure<T, ResultType>(type=GateEngine.SpriteComponent, config=0x100c93dd8, self=0x0000600000c75800) at Entity.swift:100:29
    frame #6: 0x00000001000072ec 2D_01_AnimatedSprite`AnimatedSpriteSystem.setup(game=0x000060000330c460, input=0x000060000175c080, self=0x0000600000246d80) at AnimatedSprite.swift:55
    frame #7: 0x00000001000600a8 2D_01_AnimatedSprite`System.willUpdate(game=0x000060000330c460, input=0x000060000175c080, deltaTime=0.0280027911, self=0x0000600000246d80) at System.swift:31
    frame #8: 0x0000000100050bd0 2D_01_AnimatedSprite`ECSContext.shouldRenderAfterUpdate(deltaTime=0.0280027911, self=0x000060000290c380) at ECSContext.swift:251
    frame #9: 0x0000000100076c4c 2D_01_AnimatedSprite`closure #1 in Game.gameLoop(self=0x000060000330c460) at Game.swift:141
    frame #10: 0x0000000100077284 2D_01_AnimatedSprite`partial apply for closure #1 in Game.gameLoop() at <compiler-generated>:0
    frame #11: 0x000000010005d5fc 2D_01_AnimatedSprite`thunk for @escaping @callee_guaranteed @Sendable @async () -> (@out A) at <compiler-generated>:0
    frame #12: 0x000000010005dbd4 2D_01_AnimatedSprite`thunk for @escaping @callee_guaranteed @Sendable @async () -> (@out A)partial apply at <compiler-generated>:0

Similar crashes for all 3D demos, but rather with component Transform3Component:
GateEngine/Entity.swift:50: Assertion failed: Component "Transform3Component" is not a member of this entity.

Crashes occurred on simulator as well, so I'm hoping it's just an issue with the logic. Nonetheless here is machine details:
2021 MacBook Pro (M1 Pro chip)
macOS Ventura 13.5.1
Swift version 5.7.2
Xcode 14.2

CodeSign error when compiling for iOS simulator

CodeSign /Users/admin/Library/Developer/Xcode/DerivedData/GateEngineDemos-eysqrhopcpvdfdbownbigsjgzdig/Build/Products/Debug-iphonesimulator/2D_01_AnimatedSprite.app (in target '2D_01_AnimatedSprite' from project 'GateEngineDemos' at path '/Users/admin/Documents/xcode_projects/GateEngineDemos/Xcode/GateEngineDemos.xcodeproj')
    cd /Users/admin/Documents/xcode_projects/GateEngineDemos/Xcode
    
    Signing Identity:     "-"
    
    /usr/bin/codesign --force --sign - --entitlements /Users/admin/Library/Developer/Xcode/DerivedData/GateEngineDemos-eysqrhopcpvdfdbownbigsjgzdig/Build/Intermediates.noindex/GateEngineDemos.build/Debug-iphonesimulator/2D_01_AnimatedSprite.build/2D_01_AnimatedSprite.app.xcent --timestamp\=none --generate-entitlement-der /Users/admin/Library/Developer/Xcode/DerivedData/GateEngineDemos-eysqrhopcpvdfdbownbigsjgzdig/Build/Products/Debug-iphonesimulator/2D_01_AnimatedSprite.app

/Users/admin/Library/Developer/Xcode/DerivedData/GateEngineDemos-eysqrhopcpvdfdbownbigsjgzdig/Build/Products/Debug-iphonesimulator/2D_01_AnimatedSprite.app: code object is not signed at all
In subcomponent: /Users/admin/Library/Developer/Xcode/DerivedData/GateEngineDemos-eysqrhopcpvdfdbownbigsjgzdig/Build/Products/Debug-iphonesimulator/2D_01_AnimatedSprite.app/Assets.car
Command CodeSign failed with a nonzero exit code

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.