Jump to content


Photo

programming game


  • Please log in to reply
11 replies to this topic

#1 joshuaallen64

joshuaallen64

    GMC Member

  • GMC Member
  • 676 posts
  • Version:GM:Studio

Posted 14 September 2012 - 06:08 PM

I've been playing with an idea I had to make it easy and fun for people to program. I have seen visual programing done with unity and really wanted to do it myself.
This is what I came up with:

https://dl.dropbox.c...1906/index.html
Spoiler

There is no goal, just see if your code works to get arounda maze.
Press space to start the code and again to restart the codefrom start.
Press 'r' to move the player back to its starting place.

I really like it so far but I don't really know where to take it.
Some of my ideas:
  • just make puzzles for the player to salve
  • let the player make their own little game like pong or brick breaker
  • let the player make ai that fights with ai that other players make
What do you think?

Edited by joshuaallen64, 14 September 2012 - 07:05 PM.

  • 0

#2 AhmedElyamani

AhmedElyamani

    Yamani

  • Validating
  • 1569 posts
  • Version:GM:Studio

Posted 14 September 2012 - 06:44 PM

can't play.. need some more info please .

#3 joshuaallen64

joshuaallen64

    GMC Member

  • GMC Member
  • 676 posts
  • Version:GM:Studio

Posted 14 September 2012 - 07:07 PM

sorry about that, I updated the first post with info on how to play.
  • 0

#4 Yal

Yal

    Gun Princess

  • Global Moderators
  • 5833 posts
  • Version:GM8.1

Posted 19 September 2012 - 09:25 AM

Tip: you'll also need a negation if statement: "If there is NO WALL at position".


Quite interesting concept. You could likely make a new game making engine out of it, but since GM is slow enough as it is many people might not want to use it. I'd go for some sort of AI war game instead.
  • 0

#5 smallhorse

smallhorse

    GMC Member

  • New Member
  • 2 posts
  • Version:Unknown

Posted 19 September 2012 - 11:50 AM

I stumbled about this post ... and could not help but register :-)

I remembered the old maze-solving tactic ... always touch your right hand to the wall (or left hand) and walk forward ... you will come out of the maze :-) It is that simple.
With your nice game-maker example program you can prove it. It takes just 2 ifs, 2 turns and 1 move statement.

Start:

1) if wall to right?
Yes: Goto 2
No: Turn right, Goto 3

2) if wall to front?
Yes: Turn left, Goto 3
No: Goto 3

3) Move forward, Goto 1

Look at the image:
http://tinypic.com/r/wch1yd/6


It was really fun playing around with this. Thanks for the time. Nice to see with how few statements you can write a complete solving algorithm :-)
  • 0

#6 Yal

Yal

    Gun Princess

  • Global Moderators
  • 5833 posts
  • Version:GM8.1

Posted 20 September 2012 - 05:54 AM

I remembered the old maze-solving tactic ... always touch your right hand to the wall (or left hand) and walk forward ... you will come out of the maze :-) It is that simple.

...under the following assumptions, that is:

1) You're trying to go through the maze, that is, you enter at one of its sides and seek to leave it at another of its sides. (This algorithm will not work if you're trying to reach the center of the maze, for instance)
2) The maze is 2D, that is, it's possible to draw a map of it without passages intersecting each other. If there are any sort of "warp" passages or bridges or similar, this algorithm will fail.


Examples of failure:

# = wall
E = entrance
X = exit
W = warp/bridge/shortcut

//(1) Failure

###################
#                 #
#  #############  #
#  #           #  #
#  #           #  #
E  #     X     #  #
#  #           #  #
#  #           #  #
#  ###### ######  #
#                 #
###################

//(2) failure
#E#
# #
# #################
W                 W
########## ########
         # # 
         # # 
         # # 
         # # 
         # # 
         # # 
         # #
         #X#

Maze 1 will lead you around in circles back to the entrance, Maze 2 as well.
  • 0

#7 chaz13

chaz13

    GMC Member

  • GMC Member
  • 3826 posts
  • Version:Unknown

Posted 20 September 2012 - 01:36 PM

I remembered the old maze-solving tactic ... always touch your right hand to the wall (or left hand) and walk forward ... you will come out of the maze :-) It is that simple.

...under the following assumptions, that is:


The right hand rule only works for labyrinths, not mazes :smile:
  • 0

#8 smallhorse

smallhorse

    GMC Member

  • New Member
  • 2 posts
  • Version:Unknown

Posted 20 September 2012 - 02:06 PM

The definition of "maze" and "labyrinth" is here (http://www.labyrinth...t/typology.html).

The hand-touch-wall algorithm works for mazes and labyrinths as long as the entrance and exit are on the outer walls.
No matter how many paths or intersections or different choices there are...

And yes, it does not work in special cases like moving-walls, wrap-points, bridges, ladders, etc. As Yal mentioned ... any maze that has passages intersecting each other.

It was not the point to seek weak points in this algorithm or proof that there are mazes that can not be solved this way.
I was just fascinated how easy it was to implement the algorithm with just a few statements in the graphical environment of the tool in this post. :-)
  • 0

#9 Yal

Yal

    Gun Princess

  • Global Moderators
  • 5833 posts
  • Version:GM8.1

Posted 21 September 2012 - 11:43 AM

Well, in my native language we have the same word for "Maze" and "Labyrinth", so we don't do that distinction. Same with "could", "would" and "should" who are all the same word.
  • 0

#10 Funk E. Gamez

Funk E. Gamez

    GMC Member

  • GMC Member
  • 177 posts

Posted 25 September 2012 - 12:53 AM

This is a very intuitive concept! I really like it. As other people said, the main issue I see so far is that there's no way to tell the character "if there is NOT a wall at a position..." And of course I expect in the full thing you wouldn't have the same number of each of those tiles and such. But anyway, it's really nice. Reminds me of a couple flash games I've played, except even more creative because this hinges on if statements while most similar games just make a robot do something in sequence. (regardless of conditions)
  • 0

#11 Gamer3D

Gamer3D

    Human* me = this;

  • GMC Member
  • 1589 posts
  • Version:GM8.1

Posted 25 September 2012 - 06:12 PM

Another (perhaps more limiting) approach is a grid-based game. I forget who it was, but someone made such a game where the goal was to program fighting robots. Around 4 years ago, I liked the idea enough to create a similar game.

Unfortunately, I think games of this type are not particularly popular except to those of us who already enjoy programming. Despite that, these kinds of games can provide hours of educational entertainment.
  • 0

#12 joshuaallen64

joshuaallen64

    GMC Member

  • GMC Member
  • 676 posts
  • Version:GM:Studio

Posted 26 September 2012 - 02:44 AM

Thanks for all the comments; I'm sorry for the delayedresponse. I was a groomsman at a wedding and it took far too much of my time.


you'll also need a negation if statement: "Ift here is NO WALL at position".

There actually is a NOT statement but I didn't put it in thedemo because I didn't think it necessary to demonstrate the idea.

It was really fun playing around with this. Thanksfor the time. Nice to see with how few statements you can write a completesolving algorithm

Thanks. You're algorithm is actually better than mine but that'swhy I wanted to develop this. The idea of sharing each other's answer to aproblem until the best one is found. That's why I think an AI battle game willbe the best because there are lots of strategies that one can find to counterother strategies.

This is a very intuitive concept! I really like it.As other people said, the main issue I see so far is that there's no way totell the character "if there is NOT a wall at a position..." And ofcourse I expect in the full thing you wouldn't have the same number of each ofthose tiles and such. But anyway, it's really nice. Reminds me of a coupleflash games I've played, except even more creative because this hinges on ifstatements while most similar games just make a robot do something in sequence.(regardless of conditions)

Thanks, I love the robot strategy games like light bot but I think the way I did the visual programing is a better way to show how programming works. I added other statements like a loop but found that justusing an if statement works the best.

Another (perhaps more limiting) approach is a grid-basedgame. I forget who it was, but someone made such a game where the goal was toprogram fighting robots. Around 4 years ago, I liked the idea enough to createa similar game.
Unfortunately, I think games of this type are notparticularly popular except to those of us who already enjoy programming. Despite that, these kinds of games can provide hours of educational entertainment.

Sorry but I'm unable to play your game but if you can giveme a .exe I would love to try it out.
I know what you mean about the popularity, I tried to get myroommates to play it but they found the idea boring.



I was thinking there would be puzzles like this maze as tutorials. Some of my ideas so far are:
  • Maze
  • Sorting numbers
  • Sudoku salver?
Any more ideas would be awesome, please do not hesitate togive any feedback
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users