Getting LOVE2D to run faster and AI stuff

General discussion about LÖVE, Lua, game development, puns, and unicorns.
Post Reply
Posts: 59
Joined: Sat Oct 25, 2014 7:07 pm

Getting LOVE2D to run faster and AI stuff

Post by EliterScripts » Fri Nov 09, 2018 6:36 am

Hello, I am currently working on a game and I'm interested in getting into artificial intelligence at some point, and making "fake" players in my game so when it starts off, players don't instantly quit because there aren't any players on the server.

Anyway, I am using LOVE's default physics engine, BOX2D, and would like to know some tips on how to get my game running as fast as possible, so that the artificial intelligence can get smarter a lot quicker. I intend to run this on a server (or possibly a clust of servers then destroy them so I only pay pennies for a short period of time for using them), without graphics (or a window for that matter), so I was wondering what else should be done to make sure the game runs quickly?

Box2D seems to have a tendency to allow objects to go through walls if the speed is too high or the conditions are just right. I was thinking I could artificially lower the DT by updating the physics world, giving it a lower number than the actual DT.
I was also thinking about multi threading, but I can't even think of a design where that would actually be faster.

I dont need human playable frames.

Aside from trying to hack the game into playing faster, what are some good things to look at to use AI for a 2-dimensional game? I was thinking I could program my game to send JSON output of all the physics objects, with their shapes, game types (player, wall, bullet), health, velocities and positions, so I was hoping that doing so would allow for my to go outside of Lua/LOVE and use Python (or other language) to analyze the world data, and take actions (such as applying force on the player (moving it around) or shooting bullets).

My idea of making a player is make the AI play on a server with other AI players (maybe they will be separated AI's or all under the same AI, not sure what is best), and have them learn how to fight each other, so that when a real human player comes along, they'll have some practice.

The game is a tank game, similar to, but I am doing my own spin of it, but that should describe some of the basic mechanics of it.

User avatar
Party member
Posts: 2413
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary

Re: Getting LOVE2D to run faster and AI stuff

Post by zorg » Fri Nov 09, 2018 7:50 am

Delete one of your threads please, you double-submitted.
Me and my stuff :3True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests