c++ - How do I build a game in C with actors programmed in Lua? -


i want build strategy game using c , lua. c++ option.

i create environment player can move around. in same environment, other actors (programmed in lua) should able move around. lua code should control how move.

it sounds simple enough, wonder design approach project.

as simple example can imagine matrix playing field. how write code player , several other (scripted) actors can move through simultaneously?

the lua code of actors should able information playing field. example: actor programmed follow fixed path, looking around along way. if actor detects other player, change behavior follow other player.

i imagine problem has been solved many times, can't seem find simple example.

any links other designs , original ideas appreciated.

the question broad let me suggest best way start break problem/question smaller pieces.

you mentioned trying create strategy game use matrix playing field , contain movable actors. have decide:

what kind of data structure should use representing matrix in various actor objects can move 1 node another? how should actor objects represented? initialized? stored?

i assuming want video in game have decide:

what platforms should target? rendering technology should use? there graphics packages meet needs of kind of project?

you have lot of fun game design questions: can actors occupy same node in matrix? game occur in real time? in turns? combination of two? variables make different actors different? speed? durability?

when have hard coded actors in c/c++ source code going need decide: is lua fit project? if so, how want expose game logic lua? use lua "config file" objects or push in main loop out lua?

these kinds of questions receive better responses on so.


Comments

Popular posts from this blog

unicode - Are email addresses allowed to contain non-alphanumeric characters? -

c++ - Convert big endian to little endian when reading from a binary file -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -