Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Gurok

#301
The Rumpus Room / Re: Happy Birthday Thread!
Thu 20/11/2014 04:45:25
Happy birthday, Pumaman! Thanks for AGS.
#302
The Rumpus Room / Re: Happy Birthday Thread!
Wed 29/10/2014 12:17:36
Pappy Ponchday, Ponch
#303
The Rumpus Room / Re: *Guess the Movie Title*
Thu 23/10/2014 11:51:09
Papa
#304
The Rumpus Room / Re: *Guess the Movie Title*
Thu 23/10/2014 06:25:40
The Hunt for Blue October
#305
The Rumpus Room / Re: Happy Birthday Thread!
Sun 12/10/2014 22:23:43
Happy birthday, faerieevenstar! May you receive many new adventure games to review on your blog.
#306
The Rumpus Room / Re: Name the Game
Sat 11/10/2014 21:24:18
Yes! Finally! Someone guessed it. Okay, great. Your turn.
#307
The Rumpus Room / Re: Name the Game
Sat 11/10/2014 21:20:35
Hmmm... some good guesses so far, but it looks like you could use another hint. Unfortunately, there's not that much more to the game.

[imgzoom]http://i.imgur.com/OtbUpkp.png[/imgzoom]

Based on a popular children's television programme.
#308
The Rumpus Room / Re: *Guess the Movie Title*
Fri 10/10/2014 04:08:49
Looks like 60s stuff. Is it one of those early Kurt Russell films?
#309
The Rumpus Room / Re: Name the Game
Thu 09/10/2014 09:36:46
Quote from: CaptainD on Thu 09/10/2014 09:31:56
Is the "DD" in the second screenshot a clue as to the name of the game?

Yes. :D
#310
The Rumpus Room / Re: Name the Game
Thu 09/10/2014 04:49:15
Here's another screenshot. Hopefully it's a clue. If you're still stuck, I have an even more obvious one :D

[imgzoom]http://i.imgur.com/0GYOd2K.png[/imgzoom]
#311
The Rumpus Room / Re: Name the Game
Mon 06/10/2014 22:16:36
I'd recognise that low poly awfulness anywhere. (The public telephone helped.)

[imgzoom]http://i.imgur.com/R9uooJO.png[/imgzoom]
#312
The Rumpus Room / Re: Name the Game
Mon 06/10/2014 21:02:16
Simon the Sorcerer 3D?
#313
The Rumpus Room / Re: Name the Game
Mon 06/10/2014 09:30:48
Bill and Ted's Excellent Golf
#314
The Rumpus Room / Re: Name the Game
Sun 28/09/2014 23:39:11
Correct, it's Word Rescue! Well done, cacaro.
#315
The Rumpus Room / Re: Name the Game
Sun 28/09/2014 16:05:38
Back to the edutainment titles we go:

[imgzoom]http://i.imgur.com/WiDvTxc.png[/imgzoom]
#316
The Rumpus Room / Re: Name the Game
Sun 28/09/2014 15:17:43
Vera Cruz
#317
The Rumpus Room / Re: Name the Game
Tue 16/09/2014 23:39:37
Something about turnips?
#318
The Rumpus Room / Re: Name the Game
Fri 12/09/2014 17:51:08
Saints Row?
#319
There's no such thing as a formal array in Lua, but you can use a table like an array (untested):

Code: lua

local snowflake = {{}, {}, {}} -- 3 snowflakes

function love.load() -- Not sure which engine you're using
	for index = 1, #snowflake
		snowflake[index].x = 5 -- starting positions
		snowflake[index].y = 5
	end
end

function love.update()
	for index = 1, #snowflake
		snowflake[index].x = snowflake[index].x + math.random(-5, 5)
		snowflake[index].y = snowflake[index].y + 1
	end
end


Tables are used for everything in Lua. Arrays, associative arrays, classes, even switch statements. The key concept here is probably "#snowflake" which gets you the number of items (actually the highest integer index for a table).

Comma is how you separate multiple items in a table definition. Also note that if you just comma separate a list, i.e. {{}, {}, {}}, Lua will automatically number them 1, 2 and 3. It's the equivalent of {[1] = {}, [2] = {}, [3] = {}}. To reference a table value by its key (or indeed access an element inside an array), you use square brackets [].

I've intentionally avoided metatables and classes. If you decide to use a class library (or roll your own), you could get fancy by making a Snowflake class and formalise the snowflake objects. But as you can see, simple snowflake objects that just store x and y are easily accomplished using Lua's flexible table system.
#320
The Rumpus Room / Re: Name the Game
Fri 12/09/2014 00:09:30
Mafia?
SMF spam blocked by CleanTalk