Git Product home page Git Product logo

ase's Introduction

Aircraft Simulation Engine

Now licensed under MIT

Cross-Build
Platform: X-Plane 11.50
Dependencies: XPLM 302 SDK, OpenGL32, GLEW32
Start Date: 26-05-2020

Chaidhat Chaimongkol

Usage Instructions

Instructions for Windows.
For Mac and Linux, installation should involve homebrew.
Please feel free to study, edit or remix the boilerplate source code.

  1. Please install MinGW-w64, make sure it is x86_64 architecture
  2. Please install Make for Windows
  3. Click and run build.bat to compile and link the program

Violá! - find the win.xpl DLL plugin in the bin(aries) folder.

Alternatively, if build.bat fails or if you are not using Windows, try using a CLI, cd into the directory and compile by running make.exe, normally installed at C:\Program Files (x86)\GnuWin32\bin\make.exe or with Mac/Linux, can be installed with brew install make and brew install gcc and change dependencies in the makefile.

Installed Dependencies

Theses are already come with the Github clone. If they are out of date or errors occur, please find downloads here.
Please find the latest X-Plane SDK here and replace everything ininclude/SDK.
Please find the latest GLEW here and manually replace everything in include/GLEW. Install the .exe to %systemroot%\system32 folder too.

Build Process

  1. build.bat invokes GNU make.
  2. Makefile gives a recipe for how to build.
  3. All .cpp are compiled their respective headers .hpp and include/%/CHeaders
  4. All .cpp are compiled and linked with their respective .hpp to .o
  5. .o is linked with include/%/libraries to create an .dll (.xpl) in bin(aries) directory

plugin is linked to ase.hpp
ase.hpp links to everything in src/ase/ase
asepch.hpp contains all of XPLM and GLEW headers.

File structure

as of commit 8

TOP
│   .gitignore              for git
│   .ycm_extra_conf.py      for vim you-complete-me
│   build.bat               builds and installs once
│   buildforever.bat        builds and installs forever
│   clean.bat               clean directory
│   makefile                for makefile & build batches
│   README.md 
│
├───bin
│       win.xpl             output plugin
│
├───include                 contains all dependencies/vendors
│   ├───GLEW                vendor OpenGL GLEW
│   │       ...
│   │
│   └───SDK                 vendor X-Plane's 302 SDK
│           ...
│
└───src                     source files
    ├───ase                 engine-side code
    │   │   ase.hpp                 main header file for ase
    │   │   asepch.hpp              pre-compiled header
    │   │
    │   └───ase
    │       ├───core        main functionalities
    │       │       entryPoint.hpp  initialises the plugin with SDK
    │       │       data.cpp        manages data IO of X-Plane
    │       │       data.hpp        
    │       │       event.cpp       manages plugin events behaviour
    │       │       event.hpp        
    │       │       io.cpp          manages IO of the engine
    │       │       io.hpp        
    │       │       plugin.cpp      manages standard plugin behaviour
    │       │       plugin.hpp
    │       │
    │       ├───debug       debugging and reporting
    │       │       log.cpp         manages debug logging
    │       │       log.hpp    
    │       │
    │       └───graphics    visual graphical interaction
    │               graphics.cpp    manages graphics and drawing with GLEW
    │               graphics.hpp    
    │
    └───plugin              plugin-side code
            sample-plugin.cpp       sample plugin for initialisation

Code convention

1. 4 spaces to a tab.
2. Allman brace placement, empty line between scope declarations
3. SNAKE_CASE for preprocessor statements
4. PascalCase for namespace, classes and functions
5. camelCase for variables
6. Naming convention (Hungarian type-specification)-
    g_  member of a global namespace, integer (e.g. g_path)
    m_  member of a structure/class, integer
    s_  static member of a structure/class
    c_  constansts
    f   booleans (e.g. bool m_fBegin)
    p   pointers or references (e.g. int* m_pRef)
    ...Interface interface (pure abstract) classes (e.g. class PluginInterface {};)
    ...Abstract abstract classes
    ...Manager static manager namespaces
7. Classes and vars should be nouns, functions should be verbs, keywords are adjectives.
8. For engine code, avoid 'using namespace' for clarity
9. Pointers and references should be put next to the type. (e.g. int* m_foo, NOT int *m_foo)

ase's People

Contributors

chaidhat avatar

Stargazers

 avatar  avatar Henrick Ku avatar

Watchers

James Cloos avatar  avatar

ase's Issues

Plugin use event system

Plugin uses very similar system to event system

Start()
Stop()
Update()
missing LazyUpdate()

should be integrated to event system for simplicity.

Data use copy assignments

use the operator keyword to improve the Read/Write capabilities of the data. The DataReadSpeed and DataReadMode must be removed a depreciated.

Utilise try/catch for initialisation

For initialisation processes, use try/catch to catch errors which could be thrown.
entrypoint.hpp init,
Graphics init,
Event init,
Data init,
Plugin init,

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.