Unity Community |

Hi folks,
I've created this thread to support my "Tic-Tac-Tut" turn-based game tutorial. (Asset Store link)
$5 gets you a complete turn-based Tic-Tac-Toe game with 40-page, illustrated PDF documentation. With diagrams!
If you have any support queries, tutorial requests, etc. please post them here. I've set the thread to notify me automatically by email of any new posts.
I do have a day-job, but I'll try to reply to questions and queries within 24 hours. (My job often takes me away from a decent data connection, so I'm not always online.)
Last edited by stimarco; 06-11-2012 at 03:22 PM. Reason: Thread title change.
Sean Baggaley
Author of "Tic-Tac-Tut" turn-based game tutorial. Get it from the Asset Store here! (Tic-Tac-Toe game with illustrated 40-page documentation.)
"Tic-Tac-Tut" turn-based game tutorial support thread.
Bought it to ̶t̶r̶o̶l̶l̶ check out the documentation :P
This is a v1.0 release, so I'm expecting some typos and the odd obsolete comment to have slipped through, so do let me know if you've spotted any.
I'm also very new to the whole promotion and marketing thing, so... any danger of a review?![]()
Sean Baggaley
Author of "Tic-Tac-Tut" turn-based game tutorial. Get it from the Asset Store here! (Tic-Tac-Toe game with illustrated 40-page documentation.)
"Tic-Tac-Tut" turn-based game tutorial support thread.
Be great if you had this sort of package for a checkers game. Would be handy...
did someone say Slim Jims and Beer?
Unity Pro / iPhone Advanced
The Tic-Tac-Tut tutorial is primarily intended to show how to write a turn-based game, so that aspect is already covered. On the other hand, Chess is the usual choice for demonstrating how to write an AI, so checkers would at least have the benefit of being a more original choice.
For a checkers game, I'd need to write a more substantial AI, so that would most likely be the focus of such a project. (I can reuse and modify the Tic-Tac-Tut GameBoard code, which will save a bit of time.)
If anyone else is interested, it's certainly doable, but I'd need more than one request!
I'm also considering a different tutorial that looks at how to compile and run C# scripts at runtime, while the game is already in play, so gamers can write their own scripts too. I think it's possible in C#, but it's very much at the R&D stage.
Sean Baggaley
Author of "Tic-Tac-Tut" turn-based game tutorial. Get it from the Asset Store here! (Tic-Tac-Toe game with illustrated 40-page documentation.)
"Tic-Tac-Tut" turn-based game tutorial support thread.
Excellent Tutorial! Just bought it and I am extremely please with how you documented the code (I saw the first "free" version previously, but the extra $5.00 are well spent). What I liked is how you explained how you try to match the MVC model - among other things.
Now working on a glowing review, then i'll be back with more requests.
A Checkers tutorial is definitely a possibility.
I would, however, prefer to include the (free) nGUI package too, as it'd save me having to use the Unity GUI. I've seen other tutorials that include the free version, so I'll need to contact nGUI's author to check the procedure for doing so.
Sean Baggaley
Author of "Tic-Tac-Tut" turn-based game tutorial. Get it from the Asset Store here! (Tic-Tac-Toe game with illustrated 40-page documentation.)
"Tic-Tac-Tut" turn-based game tutorial support thread.
Hi AstaSyneri,Excellent Tutorial! Just bought it and I am extremely please with how you documented the code (I saw the first "free" version previously, but the extra $5.00 are well spent). What I liked is how you explained how you try to match the MVC model - among other things.
Now working on a glowing review, then i'll be back with more requests.
Thanks! I could do with a review or two!
Sean Baggaley
Author of "Tic-Tac-Tut" turn-based game tutorial. Get it from the Asset Store here! (Tic-Tac-Toe game with illustrated 40-page documentation.)
"Tic-Tac-Tut" turn-based game tutorial support thread.
It's already up instead of checkers I'd rather have "Mensch ärgere Dich nicht" with an irregular gameboard (or a ladder game), to show us identifying game pieces out of several choices and how to move them around on a not so easy gameboard.
Also one very annoying topic is saving games. PlayerPrefs are extremely limited in that, and if you have ressources you don't want easily duplicated (think of Diablo-like items), XML doesn't cut it either. What is one to do when you create a random, non-limited number of items (or rather highly limited). Example: XCOM (the old one) - you'd have items on each soldier as well as a common "warehouse".
A cross-and-circle game? That's doable. (I'm not a fan of Checkers, so any excuse to make something else...)It's already up instead of checkers I'd rather have "Mensch ärgere Dich nicht" with an irregular gameboard (or a ladder game), to show us identifying game pieces out of several choices and how to move them around on a not so easy gameboard.
I'm not sure what the patent / trademark / copyright issues are for Ludo and Mensch ärgere Dich nicht are, but the rules aren't that far removed from Pachisi, so I can just make my own. I like Celtic art, so using a Celtic Cross as the basis for the board's layout should work.
And this gives me an excellent testbed for learning NGUI too. (Apparently, it's fine to include the Free version for educational uses—the Asset Store is explicitly mentioned.)
A good question. I wonder if I could create a more complex variation of Pachisi and include an 'inventory' of some sort. There's no need to just simulate a traditional board game...Also one very annoying topic is saving games. PlayerPrefs are extremely limited in that, and if you have ressources you don't want easily duplicated (think of Diablo-like items), XML doesn't cut it either. What is one to do when you create a random, non-limited number of items (or rather highly limited). Example: XCOM (the old one) - you'd have items on each soldier as well as a common "warehouse".
I'll have a think and try sketching something out over the weekend.
Sean Baggaley
Author of "Tic-Tac-Tut" turn-based game tutorial. Get it from the Asset Store here! (Tic-Tac-Toe game with illustrated 40-page documentation.)
"Tic-Tac-Tut" turn-based game tutorial support thread.
A thought just occurred to me: I could create a published game based on the (above) concept, then release it on the Asset Store as a tutorial with placeholder art instead of the published art. And, of course, plenty of docs.
I need to design the game first though.
Sean Baggaley
Author of "Tic-Tac-Tut" turn-based game tutorial. Get it from the Asset Store here! (Tic-Tac-Toe game with illustrated 40-page documentation.)
"Tic-Tac-Tut" turn-based game tutorial support thread.
Hi!
Working through the tutorial I have a few questions.
1. In GameController.cs why is gameStates outside the Class?
Code:
public enum gameStates { Idling, PlayerX, PlayerO, VictoryAnimation};
2. When I try to take the framework of MVC out of the tutorial to build my own code, I do get an error message "NullReferenceException: Object reference not set to an instance of an object
MissionView.OnGUI () (at Assets/_Scenes/MissionView.cs:82)"
There really is not much to MissionView.cs :
Code:
using UnityEngine; using System.Collections; public MissionController controller; public MissionMap map; public bool playerTurn; playerTurn = true; } } { if ( playerTurn ) { } } } // end if } }
I cleaned out a lot of comments - line 82 is the "marked" debug statement in line 40 now. Basically I am trying to access the missionState from the MissionController.cs script to find out whether it's the player's turn and then hide/show the UI.
What am I missing? I really have trouble with dividing up the code into separate classes.
This is MissionController.cs:
Code:
using UnityEngine; using System.Collections; public enum missionStates { alienTurn, trooperTurn, MissionOver }; public missionStates _missionState; public missionStates missionState { get { return _missionState; } set { if (value != _missionState) // This ensures we only call GameStateHasChanged() if it's actually changed. { _missionState = value; MissionStateHasChanged(); } } } public MissionView missionView; public MissionMap map; missionState = missionStates.trooperTurn; } } public void MissionStateHasChanged () { } // end method MissionStateHasChanged } // end method MissionController
Hi AstaSyneri,
Just a heads-up: my laptop is broken at the moment, so I'm relying on my iPad and my memory...
By placing the enum outside the class, I don't need to qualify "gameStates" by adding the class name in front of it (e.g. "GameController.gameStates.PlayerX". It puts the enum in the global namespace, so all the scripts can see it and use it as if it were defined in their own file.Hi!
Working through the tutorial I have a few questions.
1. In GameController.cs why is gameStates outside the Class?
Code:
public enum gameStates { Idling, PlayerX, PlayerO, VictoryAnimation};
Looking at the OnGUI code, the only reason I can think of for that error is that the controller variable hasn't been assigned anything. You need to drag a MissionController script onto it in the Inspector if you don't set it up in the Start() function.2. When I try to take the framework of MVC out of the tutorial to build my own code, I do get an error message "NullReferenceException: Object reference not set to an instance of an object
MissionView.OnGUI () (at Assets/_Scenes/MissionView.cs:82)"
In the tutorial, I tend to grab the relevant script links using GetComponent<COMPONENT_NAME_HERE>()
I try not to rely on remembering to drag things into the Inspector if I can avoid it as I usually forget to do so.
Sean Baggaley
Author of "Tic-Tac-Tut" turn-based game tutorial. Get it from the Asset Store here! (Tic-Tac-Toe game with illustrated 40-page documentation.)
"Tic-Tac-Tut" turn-based game tutorial support thread.
hi, would this work on iOS as well and is it local or online turn based?
thanks
Time to make time for games and apps - UnityPro / iOS Pro
Hi ProjectOne,
If you're asking whether the 'Tic-Tac-Tut' project runs on iOS: yes, it does, but I only have an iPhone 4 and a 3rd generation iPad for testing, so I don't know how it looks on non-Retina models. In theory, it should run on Android too.
As long as you're not using multitouch input, the usual checks for "Fire1" for clicks seems to work fine, as does the Unity GUI.
I'm afraid there's no online turn-based support; it's local only.
Sean Baggaley
Author of "Tic-Tac-Tut" turn-based game tutorial. Get it from the Asset Store here! (Tic-Tac-Toe game with illustrated 40-page documentation.)
"Tic-Tac-Tut" turn-based game tutorial support thread.
Right, my laptop's working properly again and seems to be behaving itself. (Note to anyone who's got a Crucial M4 SSD fitted to their computer: some older versions of that drive's firmware have a very nasty bug that only kicks in after just over 5100 hours of use!)
So... I've decided to make my next project a "turn-based board game tutorial / framework". I'm aiming for something pretty generic, so it'll come with a "race" game demo, and probably something based on the cross-and-circle board game genre (like "Ludo"). I'll throw in some computer-specific features to show how a traditional board game can be jazzed up with incidental animations and other stuff.
One minor issue: As the new Unity GUI appears to be some way off yet—it's unlikely to make it into the 4.0 release, for example—I've decided to switch to the NGUI package for all future tutorials. (Why NGUI? There's a free version of this available which can be freely used in tutorials and frameworks.) Anyone wanting to make a full game with the end result will need to buy the full version of NGUI as this removes the DOG that appears with the free version. Or you can rip it out and replace it with your own. The principles should remain the same.
All this will take me about a couple of weeks to write. I'm also considering using the framework for a couple of actual games to be sold in the various App Stores later on.
I'm open to artwork contributions and suggestions for the tutorial demo projects. (Please PM me rather than posting here as I'd prefer not to clutter this thread with discussions about another tutorial.)
Last edited by stimarco; 07-08-2012 at 02:47 PM.
Sean Baggaley
Author of "Tic-Tac-Tut" turn-based game tutorial. Get it from the Asset Store here! (Tic-Tac-Toe game with illustrated 40-page documentation.)
"Tic-Tac-Tut" turn-based game tutorial support thread.
Dear Sean,
I bought your tutorial several days ago and I love it; I am curently trying to move smoothly the camera to the the clicked cell, for this I am using a coroutine called MoveObject and I update the SmoothFollow script.target with the interpolated position
(cf my code below) but that just don''t work, it's like everything is moving (you can see the GameModel moving together with the camera) so everything looks static in the game view.
Can you help ? Thanks
Code:
{ // Construct a ray from the current mouse coordinates { if (cellScript) { ; if (!m_Moving){ } } } } } m_Moving = true; float i = 0; while (i < 1) { yield return 0; } m_Moving = false; // MoveObject ended }
Hi Davidoux,Dear Sean,
I bought your tutorial several days ago and I love it; I am curently trying to move smoothly the camera to the the clicked cell, for this I am using a coroutine called MoveObject and I update the SmoothFollow script.target with the interpolated position
(cf my code below) but that just don''t work, it's like everything is moving (you can see the GameModel moving together with the camera) so everything looks static in the game view.
Can you help ? Thanks
I'm not sure what's happening as it's been a while since I had a chance to look at this project. (I'm a translator by day and haven't had much free time lately.)
I'll take a look this evening and get back to you.
Sean Baggaley
Author of "Tic-Tac-Tut" turn-based game tutorial. Get it from the Asset Store here! (Tic-Tac-Toe game with illustrated 40-page documentation.)
"Tic-Tac-Tut" turn-based game tutorial support thread.
Just a heads-up: I've been struck by a UDN problem that's preventing me from 'claiming' my "stimarco" username. I've emailed UT support to see if this can be resolved, but I can't access any PMs sent to "stimarco" in the meantime.
@Davidoux: I'm looking into the problem, but have had to upgrade my project to Unity 4, so it's going to take me a bit longer to investigate your issues than I hoped.
OK. Let me know when you are ready and thanks for the heads-up.
PS : I also emailed you about your nex project "turn-based board game tutorial / framework", any heads up on this ? thanks !