top of page

Improving the Log (Oct 17 2025)

  • Writer: Thomas Tang
    Thomas Tang
  • 4 days ago
  • 3 min read

For now I'm going with making a larger-scale game. I ported over some old code for downloading content from spreadsheets, and I'll be using that for card texts and numbers. I'm not going to have the spreadsheets do the card instructions though, since I plan on the cards having a variety of triggers and abilities that would be completely infeasible as spreadsheets. And like before, the spreadsheets will handle translations too.


Most of this week was spent figuring out how to do the log. The log has multiple issues I had to address. The first is that the current way I do log messages is messy. I create a new object for every single message and there's no way that's any good. The reason was because each log message needed to draw a yellow line underneath it in case you can click it for an undo (and undo multiple steps at once), and I didn't see any other way to do that other than having each log message technically be a button. For now I decided to give up on that, and just have it be that the undo button undos your most recent decision and that's it.


Then I had to figure out how else I could do the log. I created a 2nd Unity project just to experiment, and I eventually got something I liked. There are just 4 text objects, except that only 2 are on at once. There's one for: all messages from the past; all messages for the current turn; the most important messages from the past; and the most important messages for the current turn. When a log message is added, the text gets added to all messages from this turn (and if it's tagged as important, it also gets added to most important messages for this turn). Also when you do an undo, it just deletes the most recent line from the text object.


Adding messages to the log is also tricky though. The log has to be recreated for when you reconnect; some log messages have to be different for other players due to publicity (for you it says "draws [card name]" but for other players that card has to be hidden) and translation (in case they're playing with a different language than you). My eventual solution is to send over the text to translate and any variables, and the game goes from there. There is also a check for if it needs to be translated differently for other players. Explaining the full solution here is a bit complicated, but the spreadsheet helps here by having different elements for if information needs to be displayed differently for other players.


Finally when making cards, I realized I needed a way to differentiate the cards that get played into the different areas. I didn't want all cards to be able to do anything, it just seemed like "what area card does this card get played into" is arbitrarily chosen. My solution was to have an ability pie, like in Randomly Generated RPG. The 4 areas are themed: cards that get played to the Coast can make money and move cards; the Village makes money and makes boxes; the City makes money and removes boxes; and the Woods can do everything but make money. I enjoy it when games split up what things can do what, and this division seems solid to me.

 
 
 

Comments


Thomas Tang (DZ)

tt2195@nyu.edu

+1 (646) 236-5503

Redmond, WA

©2025 by Thomas Tang

bottom of page