I've discovered LUA a few days ago and quickly made "Magic Maze" (v0.1beta)
You can download it here:
http://atien.free.fr/jeux/magicmaze/magicmaze.rar
It's a port of Ravensburger game "Labyrinth". Since it is my first LUA game, it's most badly written, but it's already working.
Right now, you can only play with 4 human players and the game is never ending.
Everything need to be done so feel free to give me your comments and suggestions.
Magic Maze & Monster World Online
Moderators: Shine, Insert_witty_name
Magic Maze & Monster World Online
Last edited by Ats on Tue Mar 07, 2006 8:38 pm, edited 2 times in total.
English translation of the Readme
=============================
Magic Maze by Etienne Bégué
=============================
v0.1
http://www.atien.net
Magic Maze is an adaptation of the game Labyrinth by Ravensburger on PSP.
Entirely (but quickly) written in LUA, LUAplayer is required to play this game (http://www.luaplayer.org/)
======
Play
======
The goal is to traverse the labyrinth in order to amass the most treasures
======================
Controls of the play
======================
The play proceeds in two phases:
1 - Placing the free flagstone
(D-pad) to move the free flagstone around the labyrinth
(X) to rotate the flagstone
(O) to insert the flagstone in the labyrinth
2 - Moving of the pawn
(D-pad) to move the pawn
(O) to confirm its position
==========
History
==========
Version 0.1
- Posted the playable beta version online
- The game never ends
- 4 human Players only
[English translation by DrNicket]
Magic Maze by Etienne Bégué
=============================
v0.1
http://www.atien.net
Magic Maze is an adaptation of the game Labyrinth by Ravensburger on PSP.
Entirely (but quickly) written in LUA, LUAplayer is required to play this game (http://www.luaplayer.org/)
======
Play
======
The goal is to traverse the labyrinth in order to amass the most treasures
======================
Controls of the play
======================
The play proceeds in two phases:
1 - Placing the free flagstone
(D-pad) to move the free flagstone around the labyrinth
(X) to rotate the flagstone
(O) to insert the flagstone in the labyrinth
2 - Moving of the pawn
(D-pad) to move the pawn
(O) to confirm its position
==========
History
==========
Version 0.1
- Posted the playable beta version online
- The game never ends
- 4 human Players only
[English translation by DrNicket]
Dr. Nicket
----------------------------------------------------------------------------
"Alright, you primitive screwheads, listen up. See this? This is my BOOMSTICK!"
- Ash (Bruce Campbell)
----------------------------------------------------------------------------
"Alright, you primitive screwheads, listen up. See this? This is my BOOMSTICK!"
- Ash (Bruce Campbell)
Thanks DrNicket!
I've got a little question:
I've made a fonction to check how many flagstones are left in the three boxes c0max, c1max and c2max, and pick one if the chosen box is not empty.
but name = name - 1 does not work so I used this instead:
It works but I'm not really proud of this. Can someone help me to get name = name - 1 working?
Thanks.
I've got a little question:
I've made a fonction to check how many flagstones are left in the three boxes c0max, c1max and c2max, and pick one if the chosen box is not empty.
Code: Select all
function check()
-- Choose one of the three boxes
i = math.random(0, 2)
name = _G["c"..i.."max"]
-- While loop if the chosen box is empty
while name == 0 do
i = math.random(0, 2)
name = _G["c"..i.."max"]
end
print (c0max.." "..c1max.." "..c2max)
-- Pick one flagstone in the chosen box
name = name - 1
return i
end
Code: Select all
if i == 0 then
c0max = c0max - 1
end
if i == 1 then
c1max = c1max - 1
end
if i == 2 then
c2max = c2max - 1
end
Thanks.
I'm not sure how you're populating _G["c"..i.."max"] (which seems to be where you're setting name from), but you may need to do this:
Lee
Code: Select all
name = tonumber(name) - 1
Thanks Lee, but tonumber don't work too.
After a bunch of tries I finally get this:
After a bunch of tries I finally get this:
Code: Select all
_G["c"..i.."max"] = name - 1
Back from the sewers
Hi! I've managed to recover some data from my broken hard drive.
Now I can tell you about the two LUA projects I was working on months ago.
You'll need LUA player for both of them.
Enjoy :D
Magicmaze - v0.2
http://atien.free.fr/jeux/magicmaze/magicmaze.rar
- Addition of the title/menu
- New icon for LUA browser
- Large code optimization
- The treasure cannot any more appear on an occupied box
- The pawn which begins the game is selected randomly
- Winner's display at the end
Monster World (Online?) - v0.1
http://atien.free.fr/jeux/mwo/mwo.rar
For now, it's just a test for making a good engine for a platform game.
The sprites comes from Wonderboy: the dragon's trap.
You can walk through the town with the human hero.
Now I can tell you about the two LUA projects I was working on months ago.
You'll need LUA player for both of them.
Enjoy :D
Magicmaze - v0.2
http://atien.free.fr/jeux/magicmaze/magicmaze.rar
- Addition of the title/menu
- New icon for LUA browser
- Large code optimization
- The treasure cannot any more appear on an occupied box
- The pawn which begins the game is selected randomly
- Winner's display at the end
Monster World (Online?) - v0.1
http://atien.free.fr/jeux/mwo/mwo.rar
For now, it's just a test for making a good engine for a platform game.
The sprites comes from Wonderboy: the dragon's trap.
You can walk through the town with the human hero.