Does my game need an optimazation or its normal?

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
imDread
Prole
Posts: 8
Joined: Mon May 20, 2024 10:39 am

Does my game need an optimazation or its normal?

Post by imDread »

Im recently working on a game and the project is still small, it contains a main menu with working gui. this day i was looking at my games usage of both cpu and memory when i run it. and it uses 5.8% of cpu and 100mb of memory.
IS THIS NORMAL or my game needs an optimazation :P. considring its a small project, and lua is fast lang, so why this huge usage?
RNavega
Party member
Posts: 465
Joined: Sun Aug 16, 2020 1:28 pm

Re: Does my game need an optimazation or its normal?

Post by RNavega »

If you create a main.lua file with an empty love.draw() and love.update(), what CPU usage do you get?
If on your system thatd stay at like 4%, you'll know that even if you optimized the heck out of your program, the overhead from SDL2 and LuaJIT and the love.run() mainloop won't let you get lower than an empty script.
User avatar
BrotSagtMist
Party member
Posts: 683
Joined: Fri Aug 06, 2021 10:30 pm

Re: Does my game need an optimazation or its normal?

Post by BrotSagtMist »

As far as i know there is a massive overhead in the audio module even when nothing is playing, if you game has no sound you should disable that, if it has there is nothing to do really.
If your game is mostly static like say a version of sudoku you can also throw in a custom love.run that only Renders on new events, that easily gets you below 1%.
In anycase, 6% is not exactly high to begin with, if thats a running game its probably fine unless your game is only showing a static puzzle screen that is.

The ram usage is caused by a ton of shared libs on modern systems, its not actually what your game takes but only what is needed to throw the window on the screen, nothing you can do here really.
Its fine unless you manage to get massively more than the no game screen.
obey
Post Reply

Who is online

Users browsing this forum: Bing [Bot], MrFariator and 6 guests