A Flash Developer Resource Site

Results 1 to 19 of 19

Thread: [almost done] Pharaoh's Eye

  1. #1
    Amiga freak Ironclaw's Avatar
    Join Date
    Jan 2001
    Location
    Sweden
    Posts
    1,650

    [almost done] Pharaoh's Eye

    Heh, made this little game while waiting for help with my balloon game :P.

    Took 3 days though cuz.. well... I'm not that good with gfx and coding.

    There are some bugs which I find hard to fix, but they don't appear that often.

    Game ---> Pharaoh's Eye

    Will add some more sound effects like on the walls when they are moving in closer.. and a highscore later, only problem is that the highscore I use is EgoAnt's highscore and it doesn't work on my friends server even though it supports everything. The only way to make this highscore work on his server is if register_globals is ON in the PHP.ini.... but he doesn't want that as it is a security risk.

    I talked to EgoAnt and asked what could be done, he said

    To use the script without Reg Globals, you can switch the variables to use the $_POST

    Like this:

    instead of

    Code:
    if (!$_SERVER['REQUEST_METHOD'] == "POST" || !$userName){
    you could use:

    Code:
    if (!$_SERVER['REQUEST_METHOD'] == "POST" || !$_POST["userName"]){
    You would just have to make sure you are changing all instances of username and myScore
    I did my best and couldn't get it work. He has already helped me alot with the highscore, so I didn't want to bother him with more questions .

    So, one of my games with highscore is currently hosted on lycos.co.uk as the highscore works there for some reason.... tons of banners . My game on Lycos with highscore . please don't cheat .


    edit: Forgot to mention something maybe important: Pressing the circle looking thingy ontop of the pyramid rotates the pieces .

    edit2: Instructions added.
    Last edited by Ironclaw; 04-04-2006 at 06:20 AM.

  2. #2
    Amiga freak Ironclaw's Avatar
    Join Date
    Jan 2001
    Location
    Sweden
    Posts
    1,650
    Still no comment?

    This is the first game I made that I find addictive ^^.

    Fixed some bugs and did some tests. I have installed FF so that I can test and compare FF to IE to make games run better.

    I don't use wmode anymore so the games works better now in FF (but still low fps in some games in FF).

    In this game I get constant 33fps in IE, very rarely it jumps down to 30fps for a split second when pressing restart.

    In FF I get 18-28fps :/, jumping around like crazy, very flash unstable.. and that's without wmode... so FF users will get a better score than IE users as they have more time to place the pieces...

    oh well.. nothing I can do about all these different browsers.


    edit:

    Hmm, in my bounce game I get pretty much the same fps in FF as in IE. And my balloon game differs by just 5fps lower in FF.... but in the egyptian game above, FF sometimes get 17fps lower!...
    Last edited by Ironclaw; 04-03-2006 at 12:54 PM.

  3. #3
    Senior Member chriserrorplain's Avatar
    Join Date
    Aug 2002
    Location
    london village
    Posts
    623
    Hi Inronclaw,

    I did have a quick play, but alas, I am utterly rubbish at all puzzle games, but it seemed really well put togehter and polished,

    ChrisError

  4. #4
    Amiga freak Ironclaw's Avatar
    Join Date
    Jan 2001
    Location
    Sweden
    Posts
    1,650
    Yay, thanks for the comment, chriserrorplain!

    Yes, at the beginning it's quite difficult to manage to put the puzzle together before you get crushed... but when you know where all the pieces should be, it's just a matter of how fast you do it to get as much speed bonus as possible...

    Forgot to mention something maybe important: Pressing the circle looking thingy ontop of the pyramid rotates the pieces .

  5. #5
    Senior Member Ray Beez's Avatar
    Join Date
    Jun 2000
    Posts
    2,793
    Bad link.
    -------
    Tried again, worked this time...
    Last edited by Ray Beez; 04-03-2006 at 04:12 PM.

  6. #6
    Amiga freak Ironclaw's Avatar
    Join Date
    Jan 2001
    Location
    Sweden
    Posts
    1,650
    Quote Originally Posted by Ray Beez
    Bad link.
    Really?, works for me and chris.... and in both IE and FF.....

  7. #7
    Senior Member
    Join Date
    Jun 2004
    Location
    Estonia
    Posts
    116
    Nice game. I love the idea And it's damn addictive

    When you are done, please let us know. I want to link it on my page.

  8. #8
    Senior Member Ray Beez's Avatar
    Join Date
    Jun 2000
    Posts
    2,793
    Cool idea.
    Only crits are that the puzzle is too difficult for the time required and it's also too small. I understand that you need to be able to show the walls closing in. I wonder if there's a way to make the puzzle area larger without compromising the effect...

  9. #9
    Amiga freak Ironclaw's Avatar
    Join Date
    Jan 2001
    Location
    Sweden
    Posts
    1,650
    When I first made the room, I hadn't figured out what to use it for . then after applying the walls I thought of using a puzzle and to solve it before the player get crushed.... I made the puzzle and didn't want the puzzle to be too small which it would be if I placed it on the wall in this image:


    So I increased the width of the room to give more time for the walls to close in, and brought the puzzle wall closer... I too think the puzzle is (just a little) small, but not too small. When you have learned where the pieces should be, it's just a matter of how fast you will be to get the best score. I solve the puzzle everytime I play as I have had to solve it many times to bug test every aspect of the game.

    I'm running at 1280x800 and it's not that small, atleast not for me. It's ok. But play the game a few times and you'll get used to it .

  10. #10
    Senior Member TheLostGuru's Avatar
    Join Date
    Aug 2004
    Location
    I live on this webpage...
    Posts
    784
    Fun, very fun. I really like how the walls close in. Puts a little bit of pressure on. After I looked at what the Pharaoh's eye was supposed to be, I was able to put the puzzle together. However, I never would have known I could flip the pieces if I hadn't read your post. You need to explain that. Also, after completing the puzzle once, I didn't really feel like going back to complete the same puzzle. Maybe you could add different puzzles.
    "If I have seen further it is by standing on the shoulders of giants." Isaac Newton
    ------------------------------------------------------------------------------

  11. #11
    Senior Member Ray Beez's Avatar
    Join Date
    Jun 2000
    Posts
    2,793
    How is the player supposed to know what the puzzle image is? I must have missed that.

  12. #12
    Amiga freak Ironclaw's Avatar
    Join Date
    Jan 2001
    Location
    Sweden
    Posts
    1,650
    Quote Originally Posted by TheLostGuru
    Also, after completing the puzzle once, I didn't really feel like going back to complete the same puzzle. Maybe you could add different puzzles.
    I thought about having different images to puzzle together everytime you started the game to make it harder... but one image (the eye pyramid) is enough... so I also though about adding levels, when the first puzzle is complete, you move forward to the next room to solve the next.. but nah.. as this will be a "submit you best score" game, more puzzles or levels is not necessary. People will play it again and again for better and better score.

    The game is not 100% complete yet and I will add an instructions section.

    Quote Originally Posted by Ray Beez
    How is the player supposed to know what the puzzle image is? I must have missed that.
    The image is on the title page . But might put it somewhere aswell... donno yet..

  13. #13
    Senior Member
    Join Date
    Feb 2004
    Posts
    782
    Hi, what function in flash are you using to post your scores to the php script.

  14. #14
    Senior Member
    Join Date
    Feb 2004
    Posts
    782
    Hi, what function in flash are you using to post your scores to the php script?

    I generally use:

    Code:
    loadVariablesNum("urlofscorepostingscript",0, "POST");
    And then the following score posting script;

    Code:
    <?php
    
    $db = mysql_connect("localhost", "username", "password") or die("Could not connect.");
    if(!$db) 
    	die("no db");
    if(!mysql_select_db("db_name",$db))
     	die("No database selected.");
    if(isset($_POST['score']))                
    {
      $score=$_POST['score'];
      $name=$_POST['thename'];
      $countscore="SELECT COUNT(*) from asteriodscores";
      $countscore2=mysql_query($countscore);
      $countscore3=mysql_result($countscore2,0);
      if($countscore3<10)
      {
       $insertscore="INSERT into asteriodscores (score,name) values('$score','$name')";
       mysql_query($insertscore) or die("Could not insert score");
       print "Score recorded.";
      }
      else
      {
        $getlowscore="SELECT * from asteriodscores order by score ASC limit 1";
        $getlowscore2=mysql_query($getlowscore) or die("Could not get score");
        $getlowscore3=mysql_fetch_array($getlowscore2);
        if($score>$getlowscore3[score])
        {
          $replace="update asteriodscores set score='$score', name='$name' where ID='$getlowscore3[ID]'";
          $replace2=mysql_query($replace) or die(mysql_error());
          print "Score recorded.";
        }
        
     }
    
        
    }
    ?>
    Last edited by Archbob; 04-03-2006 at 05:44 PM.

  15. #15
    Senior Member SlimSlaby's Avatar
    Join Date
    May 2005
    Posts
    158
    I just found it hard because I had no idea what the picture was supposed to look like. I think that makes it feel like a bunch of trial and error. I figured out how to rotate by just clicking on the circlular thing to see if it did anything (I was looking for clues on the puzzle)

    I think it would feel more like a game of skill if you got a pic or some clue as to what you are building.

  16. #16
    Amiga freak Ironclaw's Avatar
    Join Date
    Jan 2001
    Location
    Sweden
    Posts
    1,650
    Instructions added.



    Quote Originally Posted by Archbob
    Hi, what function in flash are you using to post your scores to the php script?

    I generally use:

    Code:
    loadVariablesNum("urlofscorepostingscript",0, "POST");
    And then the following score posting script;

    Code:
    <?php
    
    $db = mysql_connect("localhost", "username", "password") or die("Could not connect.");
    ........
    I use the one on EgoAnt's page..., so I use:

    sendScore.sendAndLoad("addScore.php", score_result, "POST")

    and

    loadVariables("getScores.php", "startGameClip");

    using this code in Flash:

    Code:
    function sendScores(userName:String, userScore:Number) {
    	var sendScore:LoadVars = new LoadVars();
    	sendScore.userName = userName;
    	sendScore.myScore = userScore;
    	var score_result:LoadVars = new LoadVars();
    	score_result.onLoad = function(success:Boolean) {
    		submitScoreClip._visible = false;
    		startGameClip._visible = true;
    		setScore(0, 0);
    		setLife(0, 100);
    		if (success && this.scoreIn == "1") {
    			systemText.text = "Score sent!";
    		} else {
    			systemText.text = "Error sending score to server.";
    			trace(this.scoreError);
    		}
    	};
    and stuff. and some php scripts...

    do, what should I do to make it work on a server with register_globals OFF in the PHP.ini??

  17. #17
    Senior Member
    Join Date
    Feb 2004
    Posts
    782
    Really the only difference with register globals off is that you have to define $_POST, $_GET, and $_SERVER variables on the server.

    So in the php file your sending to you have to:

    Code:
    $score=$_POST['score'];
    
    or
    
    $score=$_SERVER['score'];
    Instead of using $score direction without setting it equal to a form variable first.

    I don't send my scores directly to mysql via flash, I call a php file on ym server to actually input my scores.
    Last edited by Archbob; 04-04-2006 at 06:39 PM.

  18. #18
    light11.ca habboguy's Avatar
    Join Date
    Apr 2002
    Posts
    384
    rotating threw me off ALOT. but i beat it. i had to take a picture of the pyramid at the beginning just to remember. you need more levels. very addicting gj

  19. #19
    Amiga freak Ironclaw's Avatar
    Join Date
    Jan 2001
    Location
    Sweden
    Posts
    1,650
    No more lvl will be added, no point in more levels when highscore board has been added.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center