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

Author Topic: Routing Game  (Read 7389 times)

0 Members and 1 Guest are viewing this topic.

FRex

  • Hero Member
  • *****
  • Posts: 1848
  • Back to C++ gamedev with SFML in May 2023
    • View Profile
    • Email
Routing Game
« on: April 24, 2016, 11:16:52 pm »
Here's a simple game I made today: https://github.com/FRex/routing-game
Simply compile all the cpp files and link SFML system, window and graphics and run.
No other libraries or assets involved.

Your goal is to rotate tiles to make it so that the power reaches everywhere.
Correct circuit has no loops.
The tile that supplies power is cyan tinted.
Wires with power are green and powerless ones are red.
This is a direct clone of a very very old game (pre 2000s) I used to have on my first PC ever that ran Win98 but I don't remember its name now.

Controls:
F1, F2, F3, F4, F5 - start a new game with varying difficulty,
Mouse Left Click - rotate tile under cursor,
WSAD - move the camera around,
Space - randomize all tile rotations (but not start a new game).


 
« Last Edit: April 27, 2016, 01:23:42 pm by FRex »
Back to C++ gamedev with SFML in May 2023

Erdrick

  • Jr. Member
  • **
  • Posts: 61
    • View Profile
    • Email
Re: Routing Game
« Reply #1 on: April 26, 2016, 06:38:29 am »
Looks nice!  I had no idea what xorshifting was until I started looking at your code.

I may try to run it later and provide more feedback! :)

FRex

  • Hero Member
  • *****
  • Posts: 1848
  • Back to C++ gamedev with SFML in May 2023
    • View Profile
    • Email
Re: Routing Game
« Reply #2 on: April 27, 2016, 01:24:32 pm »
I added displaying seed (unix time at game start displayed in hex) and randomizing tile rotations without starting a new game (Space) to the game. :P
Back to C++ gamedev with SFML in May 2023

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
Re: Routing Game
« Reply #3 on: April 27, 2016, 06:28:14 pm »
Any reason you included the compressed version of the screenshot?


vs
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Tukimitzu

  • Full Member
  • ***
  • Posts: 117
  • Anti-Hero Member
    • View Profile
Re: Routing Game
« Reply #4 on: April 27, 2016, 08:57:01 pm »
Any reason you included the compressed version of the screenshot?

Question: how did you figure that out?

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
Re: Routing Game
« Reply #5 on: April 27, 2016, 09:07:52 pm »
I noticed that the image had a lot of artifacts and wondered if this was part of the game, but when clicking on it you got the right version, so I just had to compare the URLs.
But I just noticed why this (probably) happened. Imgur provides BBCode to include the image in forums and it automatically uses the low quality version.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

FRex

  • Hero Member
  • *****
  • Posts: 1848
  • Back to C++ gamedev with SFML in May 2023
    • View Profile
    • Email
Re: Routing Game
« Reply #6 on: April 27, 2016, 09:22:19 pm »
I used the screenshot tool from xfce desktop which can upload screens to imgur directly and it gave me this bbcode.
Back to C++ gamedev with SFML in May 2023

FRex

  • Hero Member
  • *****
  • Posts: 1848
  • Back to C++ gamedev with SFML in May 2023
    • View Profile
    • Email
Re: Routing Game
« Reply #7 on: April 02, 2017, 10:06:13 pm »
I'm now back on Windows for a while so I'm able to create exes easily so here's the compiled game with a readme and source bundled: https://drive.google.com/open?id=0B8dEkQw1a4WvNElXN0FxZGpOV3M
Back to C++ gamedev with SFML in May 2023