Not logged inGosu Forums
Forum back to libgosu.org Help Search Register Login
Up Topic Gosu / Gosu Showcase / Match 3 Game
- - By bad_gal Date 2018-08-03 14:02
Hi all,

I've created a “Match 3” game using the wonderful Gosu library. My little girl loves these sort of games so I made it with her in mind.

My intention primarily was to create a basic prototype for the game that I would later develop as an Android app (implemented in Java). Admittedly I got a bit carried away with the implementation.

There is a lot of things that aren’t implemented such as alerting the player when there are no moves left. The player has to click on the pause button to go back to the level screen to go to another level.

The code is not my best work but good enough for prototyping. I used A star pathfinding for moving the objects within the tile map.

Source code and instructions on how to play: https://github.com/bad-gal/matchThreeRuby

Screenshot:
Parent - - By bestguigui Date 2018-08-09 15:30 Edited 2018-08-09 15:36
Hi !

I installed all the required gems, but at each move I got this error :



I didn't look into it much, but, do you really need path finding to create such a mechanic ?
Parent - By bad_gal Date 2018-08-09 15:50
I'm not sure why you are receiving the error but I will look into it.

I'm sure that there are many ways to implement this game but when using obstacles and trying to navigate the moveable pieces around the obstacles it became necessary to use A* pathfinding. If this game had no obstacles then pathfinding would not have been necessary
Parent - By jlnr (dev) Date 2018-10-04 19:23
Your image is not available anymore, but this is the error I'm seeing:

Traceback (most recent call last):
  14: from game.rb:75:in
<main>'
  13: from /usr/local/lib/ruby/gems/2.5.0/gems/gosu-0.14.1/lib/gosu/patches.rb:72:in tick'
  12: from /usr/local/lib/ruby/gems/2.5.0/gems/gosu-0.14.1/lib/gosu/patches.rb:72:in
tick'
  11: from game.rb:17:in update'
  10: from /Users/jlnr/Projects/Gosu/Gosu/matchThreeRuby-master/Screens/main.rb:43:in
update'
   9: from /Users/jlnr/Projects/Gosu/Gosu/matchThreeRuby-master/Screens/main.rb:392:in automatic_state'
   8: from /Users/jlnr/Projects/Gosu/Gosu/matchThreeRuby-master/Screens/main.rb:623:in
remove_matches'
   7: from /Users/jlnr/Projects/Gosu/Gosu/matchThreeRuby-master/Screens/main.rb:631:in initial_match_removal'
   6: from /Users/jlnr/Projects/Gosu/Gosu/matchThreeRuby-master/Helpers/game_helper.rb:56:in
get_starting_point'
   5: from /Users/jlnr/Projects/Gosu/Gosu/matchThreeRuby-master/Helpers/game_helper.rb:56:in each'
   4: from /Users/jlnr/Projects/Gosu/Gosu/matchThreeRuby-master/Helpers/game_helper.rb:58:in
block in get_starting_point'
   3: from /Users/jlnr/Projects/Gosu/Gosu/matchThreeRuby-master/Helpers/game_helper.rb:58:in each'
   2: from /Users/jlnr/Projects/Gosu/Gosu/matchThreeRuby-master/Helpers/game_helper.rb:60:in
block (2 levels) in get_starting_point'
   1: from /Users/jlnr/Projects/Gosu/Gosu/matchThreeRuby-master/Metrics/graph.rb:55:in find_start_when_finish_known'
/Users/jlnr/Projects/Gosu/Gosu/matchThreeRuby-master/Metrics/graph.rb:92:in
shortest_upward_path': undefined method []=' for #<PriorityQueue:0x00007fa510a25438 @queues={}> (NoMethodError)
Did you mean?  []
Up Topic Gosu / Gosu Showcase / Match 3 Game

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill