Search found 69 matches

by CrackedP0t
Sat Apr 30, 2016 8:52 pm
Forum: General
Topic: Mini Functions Repository
Replies: 48
Views: 41168

Re: Mini Functions Repository

Here's a nice function that turns any value except for threads, functions, and (probably) userdata into Lua and human-readable strings: function bettertostring(value, depth, indent) depth = depth or 0 indent = indent or "\t" local s = "" if type(value) == "table" then s...
by CrackedP0t
Mon Mar 14, 2016 4:51 pm
Forum: Games and Creations
Topic: Darkest Moon Bloodbath: a platformer WIP
Replies: 5
Views: 3261

Re: Darkest Moon Bloodbath: a platformer WIP

Trying on Linux I an error: Error gui3/elements/text.lua:29: attempt to get length of local 'wrap' ( a number value) Traceback gui3/elements/text.lua:29: in function 'draw' gui3/gui3.lua:18: in function 'draw' menus/base.lua:37: in function 'draw' main.lua:27: in function 'draw' [C]: in function 'x...
by CrackedP0t
Thu Mar 10, 2016 4:16 pm
Forum: Games and Creations
Topic: Darkest Moon Bloodbath: a platformer WIP
Replies: 5
Views: 3261

Re: Darkest Moon Bloodbath: a platformer WIP

D0NM wrote:- u can go off the screen
How can you go off the screen?
by CrackedP0t
Thu Mar 10, 2016 2:07 am
Forum: Games and Creations
Topic: Darkest Moon Bloodbath: a platformer WIP
Replies: 5
Views: 3261

Darkest Moon Bloodbath: a platformer WIP

https://img.itch.io/aW1hZ2UvNTcwOTMvMjU2MzI3LnBuZw==/original/cbpzAE.png So a while ago, I got "Darkest Moon Bloodbath" as a randomly generated game name. It just kind of sat for a while, but recently I started working on a game based on it. Here's the first prototype! Give feedback, plea...
by CrackedP0t
Fri Mar 04, 2016 3:13 am
Forum: Libraries and Tools
Topic: love demos
Replies: 4
Views: 6741

Re: love demos

Awesome! Maybe you could put them in here? https://github.com/love2d-community/LOV ... le-Browser
by CrackedP0t
Mon Jan 11, 2016 7:53 pm
Forum: Games and Creations
Topic: Super Shooter 2.0 - A challenging retro 2D shooter
Replies: 9
Views: 7213

Re: Super Shooter 2.0 - A challenging retro 2D shooter

Fun! You should probably work on optimization though. I could run it on my discrete graphics card, but my integrated one lagged like mad. Which integrated graphics do you have? Does turning off the shaders / particles help? My CPU is: Intel(R) Core(TM) i7-3630QM CPU @ 2.40GHz Actually, it's fine no...
by CrackedP0t
Mon Jan 11, 2016 1:18 am
Forum: Games and Creations
Topic: Super Shooter 2.0 - A challenging retro 2D shooter
Replies: 9
Views: 7213

Re: Super Shooter 2.0 - A challenging retro 2D shooter

Fun! You should probably work on optimization though. I could run it on my discrete graphics card, but my integrated one lagged like mad.
by CrackedP0t
Sun Dec 13, 2015 11:26 pm
Forum: General
Topic: Lua vs Java?
Replies: 20
Views: 17039

Re: Lua vs Java?

Java is similar to C++ and extremely similar to C#. You'll probably have a similar experience with Java as the other two, depending on what frameworks/libraries you use. Lua is far easier to use and simpler than Java. Also, asking whether Lua is better than Java is a bad comparison; it's like asking...
by CrackedP0t
Fri Dec 04, 2015 5:38 pm
Forum: General
Topic: Code Puzzles
Replies: 44
Views: 17519

Re: Code Puzzles

Iterator puzzle:

Code: Select all

local t = {"a", "b", "c", "d", "e"}

for i, v in ripairs(t) do
	print(i, v)
	--[[ Outputs:
		5	e
		4	d
		3	c
		2	b
		1	a
	]]
end
by CrackedP0t
Fri Dec 04, 2015 5:32 pm
Forum: General
Topic: Code Puzzles
Replies: 44
Views: 17519

Re: Code Puzzles

Slightly simpler solution: local function random(a, b, n) local i = 0 return function() i = i + 1 return i <= n and math.random(a, b) or nil end end twice = random( 1, 5, 2 ) print( twice() ) -- x (from 1 to 5) print( twice() ) -- x print( twice() ) -- nil thrice = random( 2, 10, 3 ) print( thrice()...