Magic Maze & Monster World Online

Discuss using and improving Lua and the Lua Player specific to the PSP.

Moderators: Shine, Insert_witty_name

Post Reply
Ats
Posts: 37
Joined: Mon Dec 05, 2005 6:08 am
Location: Biarritz - France
Contact:

Magic Maze & Monster World Online

Post by Ats »

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.
Last edited by Ats on Tue Mar 07, 2006 8:38 pm, edited 2 times in total.
Bob535
Posts: 56
Joined: Fri Nov 04, 2005 6:52 am

Post by Bob535 »

yay, thanks, come out and join us on IRC

irc.freenode.net
#luaplayer
User avatar
DrNicket
Posts: 13
Joined: Sat Nov 26, 2005 6:53 am
Location: Duncan, BC, Canada

English translation of the Readme

Post 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)
Ats
Posts: 37
Joined: Mon Dec 05, 2005 6:08 am
Location: Biarritz - France
Contact:

Post by Ats »

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.

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
but name = name - 1 does not work so I used this instead:

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
It works but I'm not really proud of this. Can someone help me to get name = name - 1 working?

Thanks.
fullerlee
Posts: 54
Joined: Thu Nov 03, 2005 9:46 am

Post by fullerlee »

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:

Code: Select all

name = tonumber(name) - 1
Lee
Ats
Posts: 37
Joined: Mon Dec 05, 2005 6:08 am
Location: Biarritz - France
Contact:

Post by Ats »

Thanks Lee, but tonumber don't work too.
After a bunch of tries I finally get this:

Code: Select all

_G["c"..i.."max"] = name - 1
Ats
Posts: 37
Joined: Mon Dec 05, 2005 6:08 am
Location: Biarritz - France
Contact:

Back from the sewers

Post by Ats »

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.
Post Reply