Complex System - Lua CPP Bindings


This was a project that I completed in my second-year studies at AIE as a part of our complex systems learning outcome. For this assignment, I developed a project for developing games with scriptable objects (Inspiration being the Love2D engine), taking advantage of Lua C++ Bindings.

INTRODUCTION


This project was developed over a few weeks as a part of my studies at the Academy of Interactive Entertainment (AIE). The main purpose of the assignment was to show our abilities to complete complex tasks and expand our knowledge and programming skills.

The assignment required us to pick a complex topic of research and to figure out a software solution to prove our knowledge. I chose Lua Bindings for my topic and developed a program that would allow for the aieBootstrap game engine to use Lua as a scripting language for development. The project was developed using C++ and was inspired by my love, no pun intended, of the Love2D engine, something I used quite extensively during the development of Zombie Game.



PROJECT GOALS


The main purpose and goal of this assignment was to build a complex application, proving our knowledge and skills in the topic. As discussed above, I chose to develop a Lua Bindings application using C++ to replicate a basic Love2D engine.

The Minimum Viable Product (MVP) of the project was to create a simple working demo, showing functions and changing values from a Lua script running in the aieBootstrap engine, as well as having a finished complied statically-linked library (.lib) of the project.

Other goals for the project, outside of the MVP, were to have a compiled dynamically-linked library (.dll) of the project, mapping extra functions in the renderer and input class, the ability to use with 3D, playing audio, as well as the ability to use fonts and texts. Most of the extra goals were met, minus 3D capabilities, playing audio, as well as some of the extra mappings.



PERSONAL ACCOMPLISHMENTS


  • Successfully created both a statically-linked library and a dynamically-linked library.
  • Implemented the Lua C API.
  • Gained a greater understanding of Visual Studio and problem-solving solution errors and difficulties.
  • Gained a great understanding of Lua.


LESSONS LEARNED


Other than all the information listed above, which was all new stuff I learnt for the development of this project, I learnt a lot about how I work and how I take on work.

Personally, this project was stressful, I was having difficulties and I was unsure what topic to choose for the assignment. I ended up choosing scripting, because of previous knowledge of the topic, hoping it would help with completing the assignment. Once development started I got lost, developed and research the wrong stuff and it was an absolute disaster. So I slowed down, figured out exactly what it was I wanted to create and restarted my project. Everything went well after this, even finishing things listed as extras in my proposal.

I think my main take away from this assignment is being aware that my lack of confidence and stresses almost got the best of me and almost ruined a project. But I realized what I was doing wrong, corrected mistakes, restarted development and continued developing and overcoming any confidence and stress issues I was facing.

Complex System - Lua CPP Bindings

DEVELOPED: 05/2018
STATUS: FINISHED
LANGUAGE: C++


This was a project that I completed in my second-year studies at AIE as a part of our complex systems learning outcome. For this assignment, I developed a project for developing games with scriptable objects (Inspiration being the Love2D engine), taking advantage of Lua C++ Bindings.

×

README - BUILDING/RUNNING THE PROJECT

UPGRADING THE PROJECT TO LATER VERSIONS OF VISUAL STUDIO SHOULD BE FINE. ORIGINALLY INTENDED FOR 2015 BUT TESTED UP TO 2019 AND WORKS FINE.


For building and running the complex application:

  1. Confirm the "LuaBindingsDLL" and "Project3D" projects are unloaded (Under the solutions right-click menu).
  2. Confirm the "Project2D" project is set to the "StartUp Project" (Under the solutions right-click menu).
  3. Set the build settings at the top of Visual Studio to "Debug" and "x86" and build the "Bootstrap", "LuaBindings" and "Project2D" projects.
  4. Build/Run the "Project2D" project, it should fail with the following message: "The code execution cannot proceed because lua51.dll was not found. Reinstalling the program may fix this problem.".
  5. Close the application and copy "lua51.dll" from the root of the project directory.
  6. Navigate to the "AIE-Assignment-ComplexSystem\temp\Project2D\Win32\Debug" directory and paste the "lua51.dll", copied from the previous step.
  7. Build/Run the "Project2D" project again. The project should run as planned.

For access to the Demo.lua file (used for coding the example) follow the below steps:

  1. Navigate to the projects root directory and open the "bin" folder.
  2. Open the Demo.lua file in Visual Studio.
×

CONTACT ME

Thomas

I'M THOMAS WILTSHIRE


WORKING AT:
SAVYSODA