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

Author Topic: SFML Tic-Tac-Toe Tutorial Series  (Read 3416 times)

0 Members and 1 Guest are viewing this topic.

SonarSystems

  • Newbie
  • *
  • Posts: 9
    • View Profile
    • Email
SFML Tic-Tac-Toe Tutorial Series
« on: February 27, 2017, 11:16:06 pm »
Hello Community,

Learn how to create Tic-Tac-Toe and a foundation for all future game projects with our new tutorial series.

SAVE 67% NOW FOR A LIMITED TIME

https://www.udemy.com/tic-tac-toe-sfml/?couponCode=SF-TT-MO

Kind regards
Sonar Team

Satus

  • Guest
Re: SFML Tic-Tac-Toe Tutorial Series
« Reply #1 on: February 28, 2017, 11:54:10 am »
Tic-Tac-Toe tutorial for 30$, really?

"SFML Game Development" book costs 21$. I doubt you have even 50% of useful content that the book has.

Also those reviews look fake.
« Last Edit: February 28, 2017, 11:56:33 am by Satus »

Mario

  • SFML Team
  • Hero Member
  • *****
  • Posts: 879
    • View Profile
Re: SFML Tic-Tac-Toe Tutorial Series
« Reply #2 on: March 07, 2017, 10:29:07 am »
Yeah, 30€ for 3.5 hours sounds very steep, even with some discount.

Watched both demo segments and I have to admit you're doing a great job at trying to explain things and speak clearly. However, there are a few things in your code I'd consider less optimal and confusing, especially from a learning perspective. I'd aim for short and easy to understand code, not going unnecessary extra steps.

This is by no means a full code review or anything and I don't want to nitpick, I just considered it important to mention, possibly to improve the tutorials in the future.

bool InputManager::IsSpriteClicked(sf::Sprite object, sf::Mouse::Button button, sf::RenderWindow &window)
{
    if (sf::Mouse::isButtonPressed(button))
    {
        sf::IntRect tempRect(object.getPosition().x, object.getPosition().y, object.getGlobalBounds().width, object.getGlobalBounds().height);
        if (tempRect.contains(sf::Mouse::getPosition(window)))
        {
            return true;
        }
    }
    return false;
}

This whole function feels very bloated and confusing to me. I don't really understand why you're going all the way constructing an sf::IntRect to begin with. Rather than using "tempRect", you could just use "object.getGlobalBounds()" directly. (Although you're also not transforming mouse coordinates to world coordinates, which works until your view changes. This is also the reason with the disparity in data type (float rectangle vs. integer coordinates)) Also both "object" and "window" should be const references, because you don't need an unnecessary copy and you'll never change them.

You claim you've created thousands of tutorial videos, which is great, especially if they're available for free, but maybe you should slow down a bit and instead try to also improve clarity/quality of the actual code. It obviously doesn't have to be ultra effective or perfect to teach basics and concepts, but it should also try to stay simple enough to understand without unnecessary bloat.

And last but not least, don't get relatives (which I assume Siddique is) to review your stuff with a perfect score. It might be serious and honest, but it will always look fishy to others, especially while there are only very few reviews available.

Edit: One more important thing I've noticed: You can't redistribute arial.ttf in your repository. By doing so you're essentially violating its licensing terms.
« Last Edit: March 07, 2017, 10:33:56 am by Mario »