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

Author Topic: Checkers ( work in progress )  (Read 3345 times)

0 Members and 1 Guest are viewing this topic.

zmertens

  • Jr. Member
  • **
  • Posts: 80
    • View Profile
Checkers ( work in progress )
« on: April 26, 2014, 11:36:42 am »
Hello all, I've been lurking here a couple months, and I wanted to share my Checkers project I've been working on which uses the SFML library.

I'm still learning the ropes of C++ and SFML. This project was originally from a school assignment and I have expanded upon it by adding the GUI and some other features.

New link!: https://github.com/zmertens/Checkers/releases

http://youtu.be/UBzWI9Z8_IM

P.S.: I used Visual Studio 2012 Professional as my IDE. I notice that the project runs ultra slow in Debug mode, but if I run it without debugging it runs fine. Is that normal?
« Last Edit: May 16, 2014, 06:21:46 am by Null Pointer »
The truth will set you free but first it will piss you off.

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6276
  • Thor Developer
    • View Profile
    • Bromeon
Re: Checkers ( work in progress )
« Reply #1 on: April 26, 2014, 11:44:41 am »
P.S.: I used Visual Studio 2012 Professional as my IDE. I notice that the project runs ultra slow in Debug mode, but if I run it without debugging it runs fine. Is that normal?
It depends on what you're doing. Typically, code that uses the STL intensely runs slow in Debug mode, because a lot of additional checks (indices, iterators, memory, ...) are performed.

If you're concerned about performance, you should measure with a profiler in Release mode. You can then find out which parts of the code consume the most time.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

zmertens

  • Jr. Member
  • **
  • Posts: 80
    • View Profile
Re: Checkers ( work in progress )
« Reply #2 on: May 13, 2014, 10:26:46 am »
I made some more changes to this project. First, the AI works for human verses computer (I still haven't added a computer verses computer yet). However, it isn't completely debugged at the moment. It still seems to work 90% of the time though. The algorithm basically picks the first available jump for a checker in the player's vector, or the first available move if a jump isn't available. But the AI won't conduct a double jump right now.

I'm also using some sound effect files from CirrusMinor's WitchBlast game (I added a reference to the README on Github). The sound effects trigger when a move, jump, or king occurs.

I also added file saving for the game times. Nothing too fancy though, and the game times only show on console at the moment.

My next goals are to make the main screen more attractive. I want to have an animation of sorts in the bottom half of the window showing a checker game in progress. And the menu selections will be on the top half. I also need to fix how the window resizes. I need to play around with sf::View class. Right now the best way to resize the window is by modifying the "Global.hpp" header file manually (the default is 1000 x 1000).

Anyway, here's an updated video of some gameplay!
http://youtu.be/cz4HIUea2ME
The truth will set you free but first it will piss you off.

 

anything