-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update Pong to use Emscripten 1.38.22 + remove submodules to use old …
…version of Jackbengine (commit d5a3adde470f79ee0e67065a6813b6ad2805a64c).
- Loading branch information
Showing
173 changed files
with
22,460 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +0,0 @@ | ||
[submodule "external/jackbengine"] | ||
path = external/jackbengine | ||
url = [email protected]:Jackbenfu/Jackbengine.git | ||
branch = master | ||
ignore = all | ||
[submodule "external/resourceGenerator"] | ||
path = external/resourceGenerator | ||
url = [email protected]:Jackbenfu/ResourceGenerator.git | ||
branch = master | ||
ignore = all | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule jackbengine
deleted from
b05f3d
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Mac OS | ||
.DS_Store | ||
|
||
# CLion | ||
.idea/ | ||
cmake-build-debug/ | ||
cmake-build-minsizerel/ | ||
cmake-build-release/ | ||
cmake-build-relwithdebinfo/ | ||
|
||
# Jackbengine library | ||
libjackbengine.bc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
cmake_minimum_required(VERSION 3.9) | ||
project(jackbengine) | ||
|
||
# CMake configuration | ||
set(CMAKE_CXX_STANDARD 17) | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wpedantic") | ||
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake) | ||
|
||
# SDL2 include directories | ||
include_directories(${SDL2_INCLUDE_DIR}) | ||
include_directories(${SDL2_IMAGE_INCLUDE_DIR}) | ||
include_directories(${SDL2_TTF_INCLUDE_DIR}) | ||
include_directories(${SDL2_MIXER_INCLUDE_DIR}) | ||
|
||
# SDL2 library references | ||
find_package(SDL2 REQUIRED) | ||
find_package(SDL2_image REQUIRED) | ||
find_package(SDL2_ttf REQUIRED) | ||
find_package(SDL2_mixer REQUIRED) | ||
|
||
# Jackbengine include directories | ||
include_directories(${PROJECT_SOURCE_DIR}/external) | ||
include_directories(${PROJECT_SOURCE_DIR}/src) | ||
|
||
# Jackbengine source files | ||
set(SOURCE_FILES | ||
external/easywsclient/easywsclient.cpp | ||
external/tinyxml/tinystr.cpp | ||
external/tinyxml/tinyxml.cpp | ||
external/tinyxml/tinyxmlerror.cpp | ||
external/tinyxml/tinyxmlparser.cpp | ||
src/application/abstract/abstractApplication.cpp | ||
src/application/application.cpp | ||
src/component/audio/audioSourceComponent.cpp | ||
src/component/body/shape/boxShapeComponent.cpp | ||
src/component/body/transformComponent.cpp | ||
src/component/body/velocityComponent.cpp | ||
src/component/input/mouseListenerComponent.cpp | ||
src/component/layout/containerComponent.cpp | ||
src/component/layout/zOrderComponent.cpp | ||
src/component/misc/nameComponent.cpp | ||
src/component/misc/tagComponent.cpp | ||
src/component/view/colorComponent.cpp | ||
src/component/view/spriteComponent.cpp | ||
src/component/view/textComponent.cpp | ||
src/component/generic/stringComponent.cpp | ||
src/core/sdl/io/sdlRwops.cpp | ||
src/core/sdl/surface/sdlSurface.cpp | ||
src/core/audio/sound.cpp | ||
src/core/audio/sound.impl.cpp | ||
src/core/input/input.cpp | ||
src/core/input/input.impl.cpp | ||
src/core/render/color32.cpp | ||
src/core/render/cursor/cursor.cpp | ||
src/core/render/cursor/cursor.impl.cpp | ||
src/core/render/font/defaultFont.cpp | ||
src/core/render/font/font.cpp | ||
src/core/render/font/font.impl.cpp | ||
src/core/render/renderer/renderer.cpp | ||
src/core/render/renderer/renderer.impl.cpp | ||
src/core/render/texture/texture.cpp | ||
src/core/render/texture/texture.impl.cpp | ||
src/core/render/window/window.cpp | ||
src/core/render/window/window.impl.cpp | ||
src/core/state/stateMachine.cpp | ||
src/core/time/timer.cpp | ||
src/core/time/timer.impl.cpp | ||
src/core/tmx/tmxImage.cpp | ||
src/core/tmx/tmxLayer.cpp | ||
src/core/tmx/tmxMap.cpp | ||
src/core/tmx/tmxObject.cpp | ||
src/core/tmx/tmxObjectGroup.cpp | ||
src/core/tmx/tmxProperty.cpp | ||
src/core/tmx/tmxPropertyGroup.cpp | ||
src/core/tmx/tmxText.cpp | ||
src/core/tmx/tmxTileset.cpp | ||
src/entity/entityManager.cpp | ||
src/scene/scene.cpp | ||
src/scene/loader/tmxSceneLoader.cpp | ||
src/system/animation/motionSystem.cpp | ||
src/system/debug/debugProfileSystem.cpp | ||
src/system/debug/debugSpriteSystem.cpp | ||
src/system/debug/debugTextSystem.cpp | ||
src/system/input/mouseEventTriggerSystem.cpp | ||
src/system/physic/aabbCollisionSystem.cpp | ||
src/system/render/spriteRenderSystem.cpp | ||
src/system/render/textRenderSystem.cpp | ||
src/system/system.cpp | ||
src/system/systemManager.cpp | ||
${PLATFORM_SOURCE_FILES} | ||
) | ||
|
||
add_library(jackbengine ${SOURCE_FILES}) | ||
target_link_libraries(jackbengine ${SDL2_LIBRARY}) | ||
target_link_libraries(jackbengine ${SDL2_IMAGE_LIBRARY}) | ||
target_link_libraries(jackbengine ${SDL2_TTF_LIBRARY}) | ||
target_link_libraries(jackbengine ${SDL2_MIXER_LIBRARY}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
CC = emcc | ||
|
||
CFLAGS = -Oz \ | ||
-Wall -Wextra -Wpedantic \ | ||
-std=c++17 \ | ||
-s USE_SDL=2 \ | ||
-s USE_SDL_TTF=2 \ | ||
-s USE_SDL_MIXER=2 \ | ||
-s USE_SDL_IMAGE=2 \ | ||
-s SDL2_IMAGE_FORMATS='["png"]' \ | ||
-s DEMANGLE_SUPPORT=1 \ | ||
-s WARN_ON_UNDEFINED_SYMBOLS=1 | ||
|
||
INCLUDES = -Iexternal \ | ||
-Isrc | ||
|
||
SOURCES = external/easywsclient/easywsclient.cpp \ | ||
external/tinyxml/tinystr.cpp \ | ||
external/tinyxml/tinyxml.cpp \ | ||
external/tinyxml/tinyxmlerror.cpp \ | ||
external/tinyxml/tinyxmlparser.cpp \ | ||
src/application/abstract/abstractApplication.cpp \ | ||
src/application/application.cpp \ | ||
src/component/audio/audioSourceComponent.cpp \ | ||
src/component/body/shape/boxShapeComponent.cpp \ | ||
src/component/body/transformComponent.cpp \ | ||
src/component/body/velocityComponent.cpp \ | ||
src/component/input/mouseListenerComponent.cpp \ | ||
src/component/layout/containerComponent.cpp \ | ||
src/component/layout/zOrderComponent.cpp \ | ||
src/component/misc/nameComponent.cpp \ | ||
src/component/misc/tagComponent.cpp \ | ||
src/component/view/colorComponent.cpp \ | ||
src/component/view/spriteComponent.cpp \ | ||
src/component/view/textComponent.cpp \ | ||
src/component/generic/stringComponent.cpp \ | ||
src/core/sdl/io/sdlRwops.cpp \ | ||
src/core/sdl/surface/sdlSurface.cpp \ | ||
src/core/audio/sound.cpp \ | ||
src/core/audio/sound.impl.cpp \ | ||
src/core/input/input.cpp \ | ||
src/core/input/input.impl.cpp \ | ||
src/core/render/color32.cpp \ | ||
src/core/render/cursor/cursor.cpp \ | ||
src/core/render/cursor/cursor.impl.cpp \ | ||
src/core/render/font/defaultFont.cpp \ | ||
src/core/render/font/font.cpp \ | ||
src/core/render/font/font.impl.cpp \ | ||
src/core/render/renderer/renderer.cpp \ | ||
src/core/render/renderer/renderer.impl.cpp \ | ||
src/core/render/texture/texture.cpp \ | ||
src/core/render/texture/texture.impl.cpp \ | ||
src/core/render/window/window.cpp \ | ||
src/core/render/window/window.impl.cpp \ | ||
src/core/state/stateMachine.cpp \ | ||
src/core/time/timer.cpp \ | ||
src/core/time/timer.impl.cpp \ | ||
src/core/tmx/tmxImage.cpp \ | ||
src/core/tmx/tmxLayer.cpp \ | ||
src/core/tmx/tmxMap.cpp \ | ||
src/core/tmx/tmxObject.cpp \ | ||
src/core/tmx/tmxObjectGroup.cpp \ | ||
src/core/tmx/tmxProperty.cpp \ | ||
src/core/tmx/tmxPropertyGroup.cpp \ | ||
src/core/tmx/tmxText.cpp \ | ||
src/core/tmx/tmxTileset.cpp \ | ||
src/entity/entityManager.cpp \ | ||
src/scene/scene.cpp \ | ||
src/scene/loader/tmxSceneLoader.cpp \ | ||
src/system/animation/motionSystem.cpp \ | ||
src/system/debug/debugProfileSystem.cpp \ | ||
src/system/debug/debugSpriteSystem.cpp \ | ||
src/system/debug/debugTextSystem.cpp \ | ||
src/system/input/mouseEventTriggerSystem.cpp \ | ||
src/system/physic/aabbCollisionSystem.cpp \ | ||
src/system/render/spriteRenderSystem.cpp \ | ||
src/system/render/textRenderSystem.cpp \ | ||
src/system/system.cpp \ | ||
src/system/systemManager.cpp | ||
|
||
|
||
OUT = libjackbengine.bc | ||
|
||
all: | ||
EMCC_DEBUG=1 $(CC) $(CFLAGS) $(INCLUDES) $(SOURCES) -o $(OUT) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# Jackbengine | ||
A multi-platform C++ 2D game engine. | ||
|
||
## Features | ||
|
||
#### Multi-platform | ||
The engine runs and was successfully tested on the following platforms: | ||
- OS X, macOS | ||
- Windows (MinGW) | ||
- Web (Emscripten) | ||
|
||
#### ECS pattern implementation | ||
Summary of the Entity-component-system approach: | ||
- _Entities_ are made up of one or more components | ||
- _Components_ contain data to store the state of an entity | ||
- _Systems_ contain the logic and operate on entities that have the required components | ||
|
||
The engine provides standard components and systems usually needed in a game: | ||
* Components: `Transform`, `Velocity`, `BoxShape`, `Sprite`, `Text`, `MouseListener`, `AudioSource` etc. | ||
* Systems: `Motion`, `SpriteRender`, `TextRender`, `MouseEventTrigger`, `AABBCollision`, `DebugProfile`, `DebugSprite` etc. | ||
|
||
This collection of components and systems can be extended. | ||
|
||
#### Scene management | ||
- Scenes can be used to split the game in logical parts (menus, in-game, options etc.) and/or functional parts (levels, screens etc.). | ||
- A scene has its own context and cannot interact with other scenes. | ||
- Transitions between scenes is possible by loading a scene from the current one (the previous scene being automatically unloaded). | ||
|
||
#### Resource management | ||
- Resources can be loaded from files or embedded resources. | ||
- Embedded resources can be generated using the [ResourceGenerator](https://github.com/Jackbenfu/ResourceGenerator) tool. | ||
|
||
#### Tile Map XML basic support (see [official reference](http://doc.mapeditor.org/reference/tmx-map-format/)) | ||
* Current implementation supports loading of following nodes: | ||
* `Map` | ||
* `Tileset` (only one per file) | ||
* `Layer` | ||
* `Object` and `ObjectGroup` | ||
* `Property` and `Properties` | ||
* `Text` | ||
|
||
#### WebSocket client | ||
- The class `WebSocket` wraps a web socket connection and allows to bind one `deserializer` and one `callback` per typed network message. | ||
|
||
## Development information | ||
- All targets (except Web) are compiled using [CMake](https://cmake.org/). | ||
- Web targets are compiled using [Emscripten](http://emscripten.org/) and Makefiles. | ||
- My main IDE is [CLion](https://www.jetbrains.com/clion/), the powerfull cross-platform C/C++ IDE from JetBrains! | ||
|
||
## External dependencies | ||
The engine relies on the following awesome libraries and tools: | ||
- [Emscripten](http://emscripten.org/) | ||
- [SDL2](https://www.libsdl.org/) | ||
- [SDL2_image](https://www.libsdl.org/projects/SDL_image/) | ||
- [SDL2_ttf](https://www.libsdl.org/projects/SDL_ttf/) | ||
- [SDL2_mixer](https://www.libsdl.org/projects/SDL_mixer/) | ||
- [TinyXML](https://sourceforge.net/projects/tinyxml/) | ||
- [easywsclient](https://github.com/dhbaird/easywsclient) |
Oops, something went wrong.