Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Vector Slalom  (Read 2748 times)

0 Members and 1 Guest are viewing this topic.

Drugdoctor

  • Newbie
  • *
  • Posts: 8
    • View Profile
    • Email
Vector Slalom
« on: September 05, 2015, 12:59:35 pm »
I’m new to both C++ and SFML and am trying to learn both.  Reading Chapter 1 of SFML Game Development by Moreira, Hansson and Haller and moving the red circle around the SFML screen reminded me of a game we used to play on graph paper before we had personal computers.  So this is a modified version of that game.  It’s basically a learning exercise, but it’s turned out to be a lot of fun.

To see screenshots of the game, click here http://rhloring.wix.com/utilitypage

The attachments contain the code, an executable file compiled for PC, and a data file (bestgamedata.txt) for a sample game.  The executable file requires sansation.tff, the bestgamedata.txt file and the sfml-graphics, system and window dll’s to run. 

Some future SFML enhancements that I’d like to try:
•   Setting up a touch pad for move entry
•   Adding sounds to the moves 
•   It is possible to play this game with two players, so a network version would be fun to try.
•   Setting up a timer (and pause) to limit the time allowed for each move.
•   Two graphics problems: Sometimes it’s hard to see whether a possible move causes the player to miss a gate AND it’s apparently not possible to get the future move circles perfectly aligned around the grid points at single pixel resolution.  One possible solution to both problems is to set up the course at a higher resolution, and then use SFML View and Zoom to allow seeing either the whole course with correct alignment or conversely, see a close up of a gate.

Some future C++ enhancements I’d like to try:
•   Setting up a player class that would include past moves and future moves and move vectors
•   Setting a gate class that includes the gate vectors
•   Learning how to use game states instead of Boolean flags to control the flow of the game (covered in part in SFML Game Development).
•   Playing against an AI opponent, but this might be a hard nut to crack

I’d love to get people’s feedback and ideas on how to proceed.
For more information about the original game, see http://en.wikipedia.org/wiki/Racetrack_(game) .
« Last Edit: September 05, 2015, 01:01:50 pm by Drugdoctor »

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11033
    • View Profile
    • development blog
    • Email
Re: Vector Slalom
« Reply #1 on: September 10, 2015, 01:01:48 am »
Could you create a complete game package, so I don't have to figure out which SFML DLL will match your game and where to get the font from? :)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Drugdoctor

  • Newbie
  • *
  • Posts: 8
    • View Profile
    • Email
Re: Vector Slalom
« Reply #2 on: September 12, 2015, 06:36:12 pm »
Sorry that I'm such a beginner that I'm not sure what you mean by a game package.

If you want a zip file with all the files in one place, then click here: http://www.2shared.com/file/IaY8oHWs/sfml-Vector-Slalom.html?.  I tried to upload the files on the SFML website, but there's a 1 MB limit. 

If you mean a stand-alone executable file with the dll's encapsulated, I'd like to know how to do that, but I'm not sure it's possible.  Poking around the web, a lot of people have asked that question, but I haven't found anyone who has an answer.  This really isn't a SFML question, but if anyone knows how to do it, I'm using CodeBlocks 13.12 with MinGW and would love to know the linker options and other settings that would allow this.

Unfortunately, the students are back on campus and Drugdoctor is already grading exams.  I'll try to respond to questions as they come up, but correspondence may be sporadic until next spring.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11033
    • View Profile
    • development blog
    • Email
Re: Vector Slalom
« Reply #3 on: September 12, 2015, 07:53:41 pm »
Yeah a zip file was all I wanted. The game is quite interesting. You'd think it's easy, but you over estimate your speed quickly.
Nicely done! :)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Satus

  • Guest
Re: Vector Slalom
« Reply #4 on: September 13, 2015, 02:29:25 pm »
Yeah, I didn't play your game before because I didnt want to build it myself, but now as I played it, it is really fun. And not as easy as I thought it would be.  :) Nicely done, thanks!

 

anything