you just draw it's position on the screen... Have you thought through how the game works? the player is drawn on the screen at pos x and pos y, and the coords change when you press a key, but it can also change without keypresses.

First paint your head red. Then take your shirt off to expose your manly chest. Next, get some boxing gloves, or if you don't have boxing gloves, oven mitts will do. Next, duct tape some aluminum foil to some twine. And finally, get your mom to program you an AI.

Seriously, whole books have been written about the subject of writing AIs. Try your local library or look for reviews online. If you're feeling really lucky, look for a tutorial online that is doing more or less what you want.

A lot of artificial intelligence research revolves around making chat bots that can pass for humans-all of this will probably be useless for you. Instead, you want something that can learn the rules of your game and make good moves accordingly. As such, it might be easiest to write your game with human input first and get it working so you know what your AI will have to do before you start writing it.

jspoon Wrote:First paint your head red. Then take your shirt off to expose your manly chest. Next, get some boxing gloves, or if you don't have boxing gloves, oven mitts will do. Next, duct tape some aluminum foil to some twine. And finally, get your mom to program you an AI.

Sounds like that weird mexican wrestler dude off of Homecop Drekelstein or whatever...I think his name was Crud Bag...A friend told me about whatever it was 2 years ago and haven't been there since

1) Register some c/c++ function to LUA. These functions should return different stuff like position, direction, health, list of other objects (the player, other enemies, etc) close to the current object (sorted if needed), etc. Other functions to set different stuff to, like Move( int xoff, int yoff), Shoot(), Turn(), etc.

2) Start writing lua code. Run away if health is low, shoot the player if he/she is nearby, duck for cover if someone is shooting this way, etc.

Secondly, this is a rather old thread so it didn't really need to be resurrected. Thirdly, Blorx2 doesn't really mean lua. He means how to implement AI in a programming IDE like xcode that uses a type of lua as it's scripting language. He then looked up lua, which didn't cover half the stuff on the actual IDE, as the IDE uses specific methods of displaying graphics and whatnot.
I doubt if he has made a window that stays up - many people haven't