How good are you at typing? Lets put your speed and accuracy to the test! Typefarmer is an arcade style typing game where you harvest crops by typing the word associated with it. Though speed is important, typing accurately is the key to scoring high. And the scoring even has a multiplier system that leaves some room for strategising too. How high of a spot can you claim on the online leaderboards?

StatusReleased
PlatformsWindows, macOS, Linux, HTML5
Rating
Rated 4.4 out of 5 stars
(9 total ratings)
Authoranttihaavikko
Tags2D, High Score, Ludum Dare 52, Score Attack, Typing, Unity
LinksLudum Dare

Download

Download
typefarmer-win.zip 36 MB
Version 2 Jan 08, 2023
Download
typefarmer-osx.zip 46 MB
Version 2 Jan 08, 2023
Download
typefarmer-linux.zip 36 MB
Version 2 Jan 08, 2023

Comments

Log in with itch.io to leave a comment.

Show post...

Hey, I get the error 

The name 'Secrets' does not exist in the current context

How do I fix this? I'm pretty much a noob when it comes to the leaderboards stuff and there wasn't a Secrets script in the source, so I'd appreciate it if you could help me here. Thanks.

Yes I have intentionally left that file/class out of the sources. All it does is calculates a verification number for the submission that is also checked on the server side. So a very rudimentary spoof check.

Hello, I'm also curious as to how you'd do this. The server stuff isn't included in the source as you know so I'd appreciate if you could show me the script... pretty please?

You mean the verification number generation? I'm not gonna share that as that'll enable you to submit to my database. It's just running some basic arithmetic based on the submitted data on both client and server side and verifying that is matches before it allows the data to be added.

Yeah, that's what I was looking for. You said that it's the first thing covered in any tutorial, I'd appreciate if you can link a tutorial where they show how to do this so I can learn it too, because I'm basically a beginner when it comes to this. Thanks.

Yup, it's as simple as this with PHP and MySQL that I'm using.

https://www.w3schools.com/php/php_mysql_insert.asp

Nice game. Could I ask how do you make the awesome leaderboard at the opening of the game?

(+2)

So basically I just serialize name, score etc to a JSON and send it to server side (PHP script) which parses/validates it and dumps it to a MySQL database. And then there is another PHP script which is used to query the same data for display then.

The game side is available in my GitHub repo (C#/Unity). The server side isn't but it very basic PHP+MySQL stuff that is like the first thing covered in any tutorial. 😅
https://github.com/anttihaavikko/typefarmer/tree/main/Assets/Leaderboards

(1 edit)

Thank you for sharing your techniques and codes, I'll study it later :)
I also noticed that your leaderboard has the flags UI, how do you make that feature? Something like: checking a table to the player's IPs and find out his country? Really appreciate your sharing!

Yeah the server side checks the IP geolocation and and uses that. Then there is a single texture with all the flags and FlagManager.cs in that same link finds the coordinates to show for any given locale.

Cool! I'll make my implementation of that feature. Thank you :)