ABC game

I’m trying to make a game for pre-k kids, to help teach them that alphabet. I’m doing this at school, and I’m needing some help. I have the actual main play area set up. its got the letters of the alphabet set up on the ground and lined up. my idea is to have it so there’s a big message above the play area, and it says various letters, and you have to use the arrow keys to move a ball over the corresponding text letter on the ground. I’m hoping to make it so doing this makes the message go away, display GOOD JOB! or something, and then go to a random new letter, and to continue to do this until all the letters of the alphabet are used up, then the game ends. I was wondering if anybody can help me out with coding ideas? because I’m stumped on how I’m gonna do this. any bits of code I could use or suggestions would be appreciated,

I don’t mind helping, but especially since it’s for school, I’d rather see what you have attempted and what part you are stuck on.

It sounds like you’ve got a start, which is great. Next is to refine your question. As you’ve posted, you’re asking for code, ideas, etc but with no focus.

Let us know what part you are working on next, show examples of what you tried, and what issues/error you are encountering and we can help you debug or make suggestions on what you have tried.

Ok. well right now I have the following: a player character (read: a ball), I have the scripting to make it controlled by the arrow keys, I have the camera in a 3rd person view behind the ball, with a script to compensate for the rolling so it follows the player but doesn’t roll with it, and I have the game area, with all the text for the alphabet lined up, with spaces in-between them for the player to move. my 2 main things I’m stumped on is 1: how could I make the letter the players supposed to roll over to progress show up were they can see, and 2: how to make the letters recognize the fact that they have been rolled over by the player, and their the letter that’s being displayed, so it should trigger the UI/whatever displays the letter to display a message and move on to the next letter. I hope that helps. I will get some pictures of the coding so far, and the game itself here in a bit.

collision handling
https://unity3d.com/learn/tutorials/topics/physics/detecting-collisions-oncollisionenter

simplest approach would be to have a “game manager” script, which the collision asks “is this the right letter”, keeps track of the current target, the ui script can then interact with the game manager to update what is on the screen.

For the letter showing up, you could just use the UI system, that way no matter what way your camera is facing it will show up. Using something like TextMeshPro(free) you could make it fancier text if you wanted.

If you’ve already got the code for moving, you’re mostly there on detecting where you’re at. You could use colliders and such, but honestly, that would probably be a bit much.

I would probably just have an array and keep track of where I am in that array. Or, even that might be a bit much. Even a simple int is enough. So, if my int is 1 and I move left, it switches to 0 and I know I’m over the letter A. If I move right, then I add 1 and I know I’m over the letter C.

Use an ascii table to figure out how much to add to your int to get the int value of the character. Compare this to the int value of the displayed character and that way you’ll know if it matches or not.

… depends on what you are after, but there are lots of tutorials on things like this, a search for “hud objective indicator” should provide something sutiable

Thanks Guys. Okay so I watched the collider video, and what I get out of it is that using that, if I have a collider on it, I can make it so when the ball collides with the letters, than it will cause the UI to recognize that, hey, he’s hit it, we should display the “Good Job” message, and then show the next letter. That’s really cool.