SFML community forums
General => SFML projects => Topic started by: Mortal on July 21, 2015, 01:18:17 am
-
i have made Tic Tac Toe game by using SFML. It seems to work fine. I'm actually new to SFML and making GUIs. If anyone is familiar with SFML, I'd appreciate some pointers on how to improve it.
code here at (https://gist.github.com/MORTAL2000/c5beb7b5f65a25400434)
-
Isn't Tic-tac-toe 3x3? ;D
Improvement suggestions:
- Check the return value from Font::loadFromFile() (http://www.sfml-dev.org/documentation/2.3.1/classsf_1_1Font.php#ab020052ef4e01f6c749a85571c0f3fd1) in case it fails,
- Make it harder :P
-
thanks really appreciated. i have done those change except making it harder, i want to solve some known bugs first. also added title and made the board at center of screen.
-
for sake of improve this game. i made a few changes to it. it not that much but it makes the game a little bit nicer
code here at gist (https://gist.github.com/MORTAL2000/c5beb7b5f65a25400434)
-
If you want to share code, you should use a public repository (like https://github.com/) or at least a service allowing people to upload/download raw files (like https://gist.github.com/). That way it's a lot easier for people to actually try your code without copying forum code, breaking formatting in the process, etc.
-
thanks Mario
i edited my post. it much better now
-
at last i fixed all known bugs. i updated the code at gist. i hope this code will work fine by now
-
i added shader lights to it
source code: https://gist.github.com/MORTAL2000/2ba8479330e554b4f08e
-
i'm back to my first GUI game that i made few years ago. i implement minimax algorithm to improve AI now the game become unbeatable :P
source code: https://gist.github.com/MORTAL2000/c8014042a65985a568b5dd7c2f635cab (https://gist.github.com/MORTAL2000/c8014042a65985a568b5dd7c2f635cab)
(https://i.imgur.com/agYejdQ.png)