Beta Mirror Magic


Blue Ion

Member
Joined
Sep 19, 2008
Messages
177
Location
Madrid, Spain
Mirror Magic from Artsoft Entertainment

This is a simple game where you have to guide a laser with the help of mirrors to destroy spheres (or cauldrons depending what game are you playing) while avoiding traps that overheat the laser, deflect the laser randomly and so on.
Think of Mindbender for the Amiga or Deflektor for the Commodore 64.
The game has a level creator.

The game is played with the touchscreen where with a tap you rotate the mirrors clockwise.
To rotate them counter clockwise, you have to press a shoulder buttons. This comes handy to avoid going through all the orientations as they are many.

playing2.gif

(hopefully we won't create that much traffic to bring down Holger's page.)

Bugs:
  • None.

Todo:
  • None

Releases:
r3. Turn mirrors counter clockwise when pressing a shoulder button
r2. No more writing to NAND, and starts in fullscreen.
r1. Initial release.

Final notes:
Oh, And yay, my first ported game :D I'm going to try to contribute with my little sand pebbles to try to feel "useful" with the community and give something back. So far I've got two more games ready in the oven, but I need that run.sh ready for prime time. Not big games such as quake 3, or awesome things like a ps2 emulator (one can dream) but fun none the less.

Downloads:
PND
The game is unmodified, with the exception of a single character that prevents it from compiling on modern gccs. Go to the original url for the source (on the title).
 
Blue Ion said:
I'm putting this here first to iron out the NAND issues as I'd like to solve these with the following run.sh script so I can use it elsewhere.
Code:
#!/bin/sh
set $HOME=./
./mirrormagic
Mmmm, Should I use "export" instead of set?
Yeah, that doesn't work. You need something like:

Code:
export HOME=`pwd`
 
Last edited by a moderator:
SteveM said:
Blue Ion said:
I'm putting this here first to iron out the NAND issues as I'd like to solve these with the following run.sh script so I can use it elsewhere.
Code:
#!/bin/sh
set $HOME=./
./mirrormagic
Mmmm, Should I use "export" instead of set?
Yeah, that doesn't work. You need something like:

Code:
export HOME=`pwd`
Used that, and now the home folder stays clean, but I end up with no sound.

sebt3 said:
Blue Ion said:

Mmmm, Should I use "export" instead of set?
Yes.
You could also use my genpxml script (that will also generate the launch script)
I've tried your script with "sh genpxml.sh --src /media/mmcblk0p1/mirrormagic --name mirrormagic --dest ~" and I get a "awk: cmd. line:1: fatal: file '-' is a directory"

All the files are in /media/mmcblk0p1/mirrormagic, I want to name it as mirrormagic and want the destination file to be generated in ~. I already have a PXML.

I have almost everything, but wanted to try your method as the above one leaves me with no sound.

And thanks to both.
 
Last edited by a moderator:
Blue Ion said:
SteveM said:
Code:
export HOME=`pwd`
Used that, and now the home folder stays clean, but I end up with no sound.
What are you using for sound? My guess is that whatever it is requires something from the real $HOME and now can't find it in the fake PND $HOME. Maybe run an strace and see what it's trying to open (unless you already know).
 
Last edited by a moderator:
Maybe it's looking for the .asoundrc?

Try copying this into your appdata-directory to see if it works.
 
EvilDragon said:
Maybe it's looking for the .asoundrc?

Try copying this into your appdata-directory to see if it works.
Yeah, that was it. When I copy it to the root of the game where I execute the run.sh it works, but it struck me as odd that it didn't worked as this is a straight forward SDL game, with SDL graphics, SDL input, and SDL sound and I don't think everyone else had to tinker with this file, specially since this file can be different between pandoras.
That was why I was looking at other pnds, to see how the did it.

Should I copy the .asoundrc to the appdata of the game each time is run? I mean if that is what I'll have to do with pnds.
 
Last edited by a moderator:
Blue Ion said:
I've tried your script with "sh genpxml.sh --src /media/mmcblk0p1/mirrormagic --name mirrormagic --dest ~" and I get a "awk: cmd. line:1: fatal: file '-' is a directory"
check "genpxml -h" :) (as your options aren't right :p)
 
Last edited by a moderator:
Well, that's it.
Hopefully everything should be ironed out. As a freebie, I added the shoulder button to rotate counter clockwise.

I'll do soon the Rocksndiamonds of the same author.

By the way, what is worthy of the front page and what is not?
 
If its a good stable release, put it on the front page (ie: news section); ie: your first build from the sound of it was more beta, but if audio works, and its all working nicely as a pnd with data to appdata etc, then sounds great!

BTW, I really like this sort of thing (and mirror-laser games specifically, wrote a few of these myself over the years), so thanks very much :)

jeff
 
Blue Ion said:
That was why I was looking at other pnds, to see how the did it.

Should I copy the .asoundrc to the appdata of the game each time is run? I mean if that is what I'll have to do with pnds.
Probably a bad idea to copy each time the game is run. That will cause card wear and chance for corruption. Couldn't it just be copied there once then not over written every time?

Also can skins be made for these games (change artwork)or is it encoded into the game itself?
 
Last edited by a moderator:
DaveC said:
Blue Ion said:
That was why I was looking at other pnds, to see how the did it.
Should I copy the .asoundrc to the appdata of the game each time is run? I mean if that is what I'll have to do with pnds.
Probably a bad idea to copy each time the game is run. That will cause card wear and chance for corruption. Couldn't it just be copied there once then not over written every time?

Sure, with the no-clobber option of the copy command. Will only copy if it's not there.

Though I doubt you will run it a billion times so that it wears out the SD Card :)
It's file of a few bytes - and I'm still using the SD Card I used with my GP2X to test new OS versions (and they cause a gazillions more writes) :)

But yeah, no-clobber is mostly always better to use :)
 
Last edited:
EvilDragon said:
DaveC said:
Blue Ion said:
That was why I was looking at other pnds, to see how the did it.
Should I copy the .asoundrc to the appdata of the game each time is run? I mean if that is what I'll have to do with pnds.
Probably a bad idea to copy each time the game is run. That will cause card wear and chance for corruption. Couldn't it just be copied there once then not over written every time?

Sure, with the no-clobber option of the copy command. Will only copy if it's not there.

Though I doubt you will run it a billion times so that it wears out the SD Card :)
It's file of a few bytes - and I'm still using the SD Card I used with my GP2X to test new OS versions (and they cause a gazillions more writes) :)

But yeah, no-clobber is mostly always better to use :)
Aaah, the eternal instantaneous flash memory death "myth" that most people has yet to see.
I was copying the file everytime in case the card was used on a different pandora with different setting, or the user changes the file on its own pandora.
Though, I guess even with 20000 out there not that many pandora users are going to exchange the cards with each other, or change the defaults for that matter.
This would make more sense on the pc.

Very well, --no-clobber it is.
 
Last edited by a moderator:
Oh, sorry I didn't see this.
DaveC said:
Also can skins be made for these games (change artwork)or is it encoded into the game itself?
Skins as in change the pcx into something else, I suppose so. The game offers the possibility to use additional levelsets (from where you can use the ones from either deflektor or mindbender) with custom artwork.
I don't know if it works (in rnd you can reskin everything and even force the use of custom artwork from different levelsets), if not everything can be reskinned through the additional levelsets, you can always change the pcxs of the game itself, nothing is encoded in the executable, and even if it were, the source is available.
 
Last edited by a moderator:
Blue Ion said:
Aaah, the eternal instantaneous flash memory death "myth" that most people has yet to see.

It's not a myth. People are just more paranoid about it than they should be.

-God Ginrai
 
Last edited by a moderator:
God Ginrai said:
It's not a myth. People are just more paranoid about it than they should be.
I know, I said "myth" as in, it happens, but so little nowadays that is not a problem any more, like tv plasma burn in. Sure, it will happen if you leave your tv on for a week at maximum brightness with a static image, but on normal sensible use it wont be a problem (contrary to how people will freak out about it when asked).

SteveM said:
How about copying only if the one in $HOME is newer?

Code:
if [ ~/.asoundrc -nt ./.asoundrc ] ; then
    cp ~/.asoundrc .
fi
Well, while we're at it, how about copying only if it is different...
This way we check that the actual contents are different instead of files with different dates.

Code:
HOMEMD5=$(md5sum "$HOME/.asoundrc" | awk '{print $1}')
APPDATAMD5=$(md5sum "./.asoundrc" | awk '{print $1}')
if [[ $HOMEMD5 != $APPDATAMD5 ]] 
then
	 cp $HOME/.asoundrc .
There now you made me do it... :D
I will include it in mirror magic if I have to make an other change, like I had the permission one (that was dumb by my part), but otherwise I'll leave it to "cp --no-clobber" as it is now.

I'll have to use it for Rocks'n'Diamonds though, uses the same framework, and has the same problem so it will not go to waste.
 
Last edited by a moderator:
Blue Ion said:
God Ginrai said:
It's not a myth. People are just more paranoid about it than they should be.
I know, I said "myth" as in, it happens, but so little nowadays that is not a problem any more, like tv plasma burn in. Sure, it will happen if you leave your tv on for a week at maximum brightness with a static image, but on normal sensible use it wont be a problem (contrary to how people will freak out about it when asked).

Getting struck by a lightning bolt is highly uncommon, but we still practice precaution so that we don't get struck. It's the same idea with burn-in and SD wear. It's unlikely, but it's better to take precautions so that you don't become that one unlucky bastard who makes other people paranoid about it.

-God Ginrai
 
Last edited by a moderator:
Not had time to read up .. just pulled down the one from the link above; the runscript is reporting a permission issue; I bet you forgot a chmod ugo+rx before you built the iso/pnd.

jeff
 
skeezix said:
Not had time to read up .. just pulled down the one from the link above; the runscript is reporting a permission issue; I bet you forgot a chmod ugo+rx before you built the iso/pnd.

jeff
Yes, after releasing the game here: http://www.gp32x.de/board/index.php?/topic/55943-mirror-magic someone else noticed, which was embarrassing as I was hoping to get it perfect.
I will update the links here too, just for completeness.

Thank you, anyway.
 
Last edited by a moderator:
Back
Top