Hi
you should add version numbers to your filenames, otherwise it quickly gets confusing.
Anyway, I tried the version from this post
viewtopic.php?p=258162#p258162 (I believe) and it instantly hangs up. (Program not responding, have to close it via task manager)
In initiate.lua there are two places where it can get stuck in endless loops:
Code: Select all
function InitStars()
for i = 1, 200 do
::try_again::
star[i].x = love.math.random(20, width - 20)
star[i].y = love.math.random(20, height - 30)
for j = 1, i do
if j ~= i then
if Distance(i, j) < 60 then
goto try_again
and same problem in InitPlayers()
There is are no exit-conditions for the loop, if every random position too close then it will loop forever.
It might work on your computer because width and height are set to desktop pixel dimensions. Likely your screen is larger. On my smaller screen it might be impossible to fit so many randomly placed stars.
1) You should keep coordinates for drawing and for logic separate.
In your case the playable map size depends on screen resolution.
2) Avoid using goto, there is usually a cleaner way.
3) Make sure loops always have an exit condition. For example, if after 10 attempts the position is still too close then use it anyway or stop generating new stars.
After fixing that, I could start.
I could not send ships to some stars because sometimes the window was partly offscreen and the "send" button could not be reached.
Are you planning to have local multiplayer? I like this style of game but I haver never seen one with local mp. Selecting planets could work by tab-ing through them with keys, no need for multiple mouses.
For example have two buttons to cycle back/forth through enemies planets.
Two buttons to cycle through your own planets. Fifth button to send ships.