Page 1 of 1
Nexus
Posted: Fri May 02, 2014 12:16 pm
by Astro
Nexus is a game I work on only my friends and I work on in our free time, which isn't much time at all. I thought I'd just like to show you all to see what, in total, about 4 hours of development has done. Brace yourselves, because it isn't that good.
The HUD in the upper-left corner of the window. From left to right: health, fuel, ammunition, oxygen.
The game window. Not much else to say about this.
I know the game isn't the best so far, so please, no destructive criticism, please. Instead, tell me how my team and I can improve this.
Latest Updates (v0.1.1c)
- Decimal bugs fixed (Thanks, Jimanzium)
- Oxygen is once again used by the player, and will drain
- Fuel once again is used, and will drain
- The NPC will copy your movement, but will not attack you
- Textured lasers (bullets)
- Nexus.love
- Nexus download (v0.1.1c)
- (7.5 KiB) Downloaded 161 times
Re: Nexus
Posted: Fri May 02, 2014 3:53 pm
by Jimanzium
Hi, we can't help much without being able to play the game, you could attach a .love, to make a .love just zip up all your game files and rename .zip to .love.
Also, to fix the decimal bug use math.floor() e.g:
Code: Select all
num = 1.00034
love.graphics.print(math.floor(num),10,10)
Re: Nexus
Posted: Fri May 02, 2014 4:20 pm
by HugoBDesigner
...Or you can use the "round" function, which I think works better, because you can still see the decimal values, but restricted to a maximum amount of decimals:
Code: Select all
num = 1.27934
love.graphics.print(round(num, 2),10,10)
--> prints "1.27"
And the round function (is also available on my "
Small extra functions" thread):
Code: Select all
function round(n, r)
local r = r or 0
return math.floor(n*10^r)/10^r
end
But the game looks very good at this point. But tell us more about it's gameplay, I'd like to know what you can do in this game!
Re: Nexus
Posted: Sat May 03, 2014 3:48 am
by Positive07
This may work a little better... just saying
Code: Select all
function round(n, r)
local r = r or 0
if (n % 10^r) > (0.5*10^r) then
return math.ceil(n*10^r)/10^r
else
return math.floor(n*10^r)/10^r
end
end
Re: Nexus
Posted: Sat May 03, 2014 4:18 am
by davisdude
Nice looking game! I would love to play it once you get it ready for demo!
- In my opinion, I think the icon in the top right corner would get annoying.
- I might make the players larger (unless there's more planned that you don't want to spoil for us).
Now, about the rounding:
My function's a bit lengthy, and I'm sure you could shorten it, but it works.
The other functions (from my testing) didn't work correctly, based on how numbers are supposed to be rounded.
Code: Select all
function Round( Number, DecimalPlace ) -- Number is the number being rounded. DecimalPlace is to how many place values (i.e. 0 would be integer, 1 would be 1 decimal place, etc.)
local DecimalPlace, ReturnedValue = DecimalPlace and 10 ^ DecimalPlace or 1
local UpperNumber = math.ceil( Number * DecimalPlace )
local LowerNumber = math.floor( Number * DecimalPlace )
local UpperDifferance = UpperNumber - ( Number * DecimalPlace )
local LowerDifference = ( Number * DecimalPlace ) - LowerNumber
if UpperNumber == Number then
ReturnedValue = Number
else
if UpperDifferance <= LowerDifference then ReturnedValue = UpperNumber elseif LowerDifference < UpperDifferance then ReturnedValue = LowerNumber end
end
return ReturnedValue / DecimalPlace
end
Sorry for the conversation getting off of your game, by the way, we're just trying to be too helpful, I guess.
Re: Nexus
Posted: Sat May 03, 2014 4:56 pm
by Astro
Jimanzium wrote:Hi, we can't help much without being able to play the game, you could attach a .love, to make a .love just zip up all your game files and rename .zip to .love.
Also, to fix the decimal bug use math.floor() e.g:
Code: Select all
num = 1.00034
love.graphics.print(math.floor(num),10,10)
Thanks a bunch. This was the most efficient way to do it in the replies left. I still thank the rest of you for helping as well. And as far as the .love goes, I had been in a rush when I posted this, and forgot about it. It has been added.