Tag Archives: Lua

Using Lua and C++ in practice. Part 1. Intro to ECS and basic principles

via Using Lua and C++ in practice. Part 1. Intro to ECS and basic principles | Elias Daler | Re:creation.

Using Lua and C++ in practice. Part 1. Intro to ECS and basic principles

There are many reasons to use Lua with C++. One of them is that you can put some of the logic from C++ code into scripts, so you can easily change them without the need or recompilation. You can also write some good interfaces, so the scripts are easy enough for even non-coders to write them. Lua is free, Lua is fast, Lua is used in game development quite often.

While there are plenty of good articles about using Lua with C++, I think there are not enough articles about how to use Lua in real projects.

This article is one of the many articles I plan to write. Here are some topics which my articles will cover:

  •  Entity creation and other basic stuff (you’re reading this now)
  •  How to implement entity creation
  •  Managing Lua state and cleaning up
  •  Scriptable state machines
  •  Events and callbacks

Developing for iOS with Xcode and Marmalade

via Developing for iOS with Xcode and Marmalade | Marmalade Blog | Marmalade.

You may have heard of Marmalade because of the Juice product that re-compiles iOS code to run on Android. The Marmalade SDK also allows you to write 2D and 3D games from the ground up in C++ or Lua and deploy to iOS, OS X, Android, Windows, and beyond, and all from a single codebase.

In this post we’ll look at how Marmalade simplifies the game development process while still giving you native performance, rich Xcode-based debugging and 64-bit support. Even if you are only targeting iOS devices, Marmalade provides great game-centric tools, frameworks and workflow optimisation.

Example of including Lua in an iOS program.

via profburke/ilua · GitHub.

This project is an example of integrating Lua with an iOS program. It’s not meant to be an example of best practice; merely as an example of how easy it is to include Lua in your Swift project.

Steps taken:

  1. Add Lua Source to Project
  2. Write a Bridging Header
  3. There is no step 3

STDIN/STDOUT into a WebSocket server

via joewalnes/websocketd · GitHub.

websocketd is a small command-line tool that will wrap an existing command-line interface program, and allow it to be accessed via a WebSocket.

WebSocket-capable applications can now be built very easily. As long as you can write an executable program that reads STDIN and writes to STDOUT, you can build a WebSocket server. Do it in Python, Ruby, Perl, Bash, .NET, C, Go, PHP, Java, Clojure, Scala, Groovy, Expect, Awk, VBScript, Haskell, Lua, R, whatever! No networking libraries necessary.