-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'procedural_generation' into develop
- Loading branch information
Showing
112 changed files
with
4,150 additions
and
1,169 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
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,3 +1,27 @@ | ||
# Pyro | ||
|
||
Engine that I will use for the AI project and for the | ||
# Ember Editor [](https://opensource.org/licenses/MIT) [](https://ci.appveyor.com/project/L4ZZA/pyro-procedural-gen/branch/procedural_generation) | ||
================== | ||
|
||
|
||
> A small piece of burning or glowing coal or wood in a dying fire. | ||
Real-time 2D level editor using Pyro engine. | ||
|
||
### How to build code | ||
|
||
- Clone the repository using `git clone --recurse-submodules -j8` | ||
- `recurse-submodules` will automatically initialize and update each submodule. | ||
- `j8` tells git to use different _jobs_ to download and updated the submodules, hence makes it faster. | ||
- Generate the solution running `scripts/generate_solution_*.bat` [double-click or run from cmd]. | ||
- Open `pyro.sln` solution just generated and build usin Visual Studio [other build systems are not supported yet]. | ||
- Run the solution (press F5). | ||
[WARNING: if you want to run the application from the output folder you'll need to copy the assets folder from the project directory and paste in the same folder of the executable] | ||
|
||
### How to build the installer | ||
|
||
> **Requirements** | ||
> - Install [NSIS: Nullsoft Scriptable Install System](https://sourceforge.net/projects/nsis/) to its default location `C:\Program Files (x86)\NSIS` | ||
> - Add the install directory to your system path like so: | ||
- Run the `create_installer.bat`, thie will generate the installer in the bin directory. | ||
- go to `bin\Release-windows-x86_64\installers` and run `LevelEditorSetup.exe`. |
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,152 @@ | ||
# | ||
# Reference list | ||
# - https://raw.githubusercontent.com/malaterre/GDCM/master/appveyor.yml | ||
# | ||
# | ||
# http://www.appveyor.com/docs/build-cache#caching-chocolatey-packages | ||
# https://github.com/kvirc/KVIrc/blob/master/.appveyor.yml | ||
cache: | ||
- C:\Tools\vcpkg\installed -> appveyor.yml | ||
# caching binries and intermediates to allow incremental build | ||
- C:\dev\source\bin -> appveyor.yml | ||
- C:\dev\source\inter -> appveyor.yml | ||
# - 'C:\Program Files (x86)\NSIS' | ||
# - C:\ProgramData\chocolatey\bin -> appveyor.yml | ||
# - C:\ProgramData\chocolatey\lib -> appveyor.yml | ||
|
||
# Set build version format here instead of in the admin panel. | ||
version: '{build}' | ||
|
||
environment: | ||
matrix: | ||
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 | ||
ROOT: c:\dev\source | ||
SCRIPTS: '%ROOT%\scripts\' | ||
CONFIG_PARTIAL: 'Release' | ||
OS_PARTIAL: 'windows' | ||
PLAT_PARTIAL: 'x86_64' | ||
PRODUCT_NAME: Ember | ||
RELEASE_VERSION: 0.0 | ||
OUTPUT_FOLDER: 'bin\$(CONFIG_PARTIAL)-$(OS_PARTIAL)-$(PLAT_PARTIAL)' | ||
FILE_VERSION: 'v%RELEASE_VERSION%.$(appveyor_build_version)-beta' | ||
GITHUB_TOKEN: | ||
secure: ShOkS4UEj4aiSabXwn0u0d0d3BoaVF0wW7TO4JyFdmMfdckHk5IbF1rAJO3aaSRg | ||
|
||
image: | ||
- Visual Studio 2019 | ||
|
||
# branches to build | ||
branches: | ||
# whitelist | ||
only: | ||
- procedural_generation | ||
|
||
#---------------------------------# | ||
# scripts that are called at # | ||
# very beginning, before # | ||
# repo cloning # | ||
#---------------------------------# | ||
|
||
init: | ||
# Updating build version with correct values | ||
# [has to be done here as environment variable are evaluated later in the process] | ||
- cmd: appveyor UpdateBuild -Version "%RELEASE_VERSION%.%APPVEYOR_BUILD_NUMBER%" | ||
# Print environment info ( set / systeminfo) | ||
# - set PATH=%JAVA_HOME%\bin;%PYTHONHOME%;%PATH% | ||
- msbuild /version | ||
# https://github.com/chocolatey/chocolatey/issues/431 | ||
# - del c:\programdata\chocolatey\bin\cpack.exe | ||
# separating output | ||
- cmd: '' | ||
|
||
clone_folder: $(ROOT) | ||
|
||
configuration: | ||
- Release | ||
|
||
#---------------------------------# | ||
# scripts that install/setup # | ||
#---------------------------------# | ||
|
||
install: | ||
# Recursively remove all outadet vcpkg packages | ||
- cmd: vcpkg remove --outdated --recurse | ||
# Install boost package | ||
- cmd: vcpkg install boost-test:x64-windows-static | ||
# Update all submodules | ||
- cmd: git submodule update --init | ||
|
||
#---------------------------------# | ||
# scripts to run before build # | ||
#---------------------------------# | ||
|
||
before_build: | ||
# Generate VS2019 solution | ||
- cmd: '%SCRIPTS%\generate_solution_vs2019.bat -s' | ||
|
||
|
||
#---------------------------------# | ||
# build step # | ||
#---------------------------------# | ||
|
||
build: | ||
parallel: true # enable MSBuild parallel builds | ||
project: pyro.sln # path to Visual Studio solution or project | ||
|
||
|
||
#---------------------------------# | ||
# scripts to run after build # | ||
#---------------------------------# | ||
|
||
after_build: | ||
# Run test manually [until appveyor ] | ||
- cmd: '%ROOT%/bin/%CONFIG_PARTIAL%-%OS_PARTIAL%-%PLAT_PARTIAL%/tests/tests.exe' | ||
# Create installer [it works because appveyor image comes with NSIS installed] | ||
- cmd: '%SCRIPTS%\create_installer.bat -s' | ||
# Renaming installer to include version in its name | ||
- cmd: 'ren %OUTPUT_FOLDER%\installers\%PRODUCT_NAME%Setup.exe "%PRODUCT_NAME%-%FILE_VERSION%-setup.exe"' | ||
|
||
test_script: | ||
- cmd: vstest.console /logger:Appveyor %OUTPUT_FOLDER%\tests\tests.exe | ||
|
||
#---------------------------------# | ||
# artifacts configuration # | ||
#---------------------------------# | ||
|
||
artifacts: | ||
- path: '**\*Setup.exe' | ||
name: installer | ||
- path: 'bin\**\ember\**.exe' | ||
name: editor | ||
- path: 'ember\assets\shaders\**' | ||
name: editor | ||
- path: 'ember\assets\textures\**' | ||
name: editor | ||
|
||
#---------------------------------# | ||
# deployment configuration # | ||
#---------------------------------# | ||
|
||
# scripts to run before deployment | ||
#before_deploy: | ||
|
||
# scripts to run after deployment | ||
#after_deploy: | ||
|
||
# to run your custom scripts instead of provider deployments | ||
#deploy_script: | ||
|
||
deploy: | ||
- provider: GitHub | ||
auth_token: | ||
secure: ShOkS4UEj4aiSabXwn0u0d0d3BoaVF0wW7TO4JyFdmMfdckHk5IbF1rAJO3aaSRg | ||
release: "%PRODUCT_NAME%-%FILE_VERSION%" | ||
description: 'Beta release of Ember editor v$(appveyor_build_version)' | ||
# github automatically does source zip\tarball for us | ||
artifact: installer | ||
draft: false | ||
prerelease: true | ||
appveyor_repo_tag: false # deploy on tag push only | ||
on: | ||
branch: procedural_generation # release from master branch only | ||
configuration: Release |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,57 @@ | ||
// --------- Entry Point --------------- | ||
#include "pyro/core/entry_point.h" | ||
#include "layer_2d.h" | ||
|
||
// Level editor | ||
// [Ember, a small piece burning or glowing in a fire] | ||
class ember : public pyro::application | ||
{ | ||
public: | ||
ember(uint32_t width, uint32_t height) | ||
:application("Ember Editor",width,height) | ||
{ | ||
} | ||
|
||
~ember() = default; | ||
|
||
// Inherited via application | ||
virtual void init() override | ||
{ | ||
const float width = static_cast<float>(window().width()); | ||
const float height = static_cast<float>(window().height()); | ||
m_layer_2d = pyro::make_ref<layer_2d>(width, height); | ||
//push_layer(new layer_3d()); | ||
push_layer(m_layer_2d); | ||
} | ||
|
||
virtual void deinit() override | ||
{ | ||
} | ||
|
||
void on_event(pyro::event &e) override | ||
{ | ||
application::on_event(e); | ||
|
||
pyro::event_dispatcher dispatcher(e); | ||
// dispatch event on window X pressed | ||
dispatcher.dispatch<pyro::key_pressed_event>(BIND_EVENT_FN(ember::on_key_pressed)); | ||
} | ||
|
||
bool on_key_pressed(pyro::key_pressed_event &e) | ||
{ | ||
if(e.key_code() == pyro::key_codes::KEY_ESCAPE) | ||
{ | ||
exit(); | ||
} | ||
return false; | ||
} | ||
|
||
private: | ||
pyro::ref<layer_2d> m_layer_2d; | ||
}; | ||
|
||
|
||
pyro::application *pyro::create_application() | ||
{ | ||
return new ember(1280, 720); | ||
} |
Oops, something went wrong.