Simple project. I want to make a game the uses the code of the fruit ninja clone. It is just that there is letter blocks instead and you have to hit the blocks to form words to get triple scores and what not to gain more points.
So how would I make it so when you hit a group of images it can check to see if that makes a word. So if i hit a D O G. I want the computer or phone to figure out the word and then give points accordingy. [import]uid: 39840 topic_id: 11967 reply_id: 311967[/import]
If you want to make the game yourself then learn lua and go through the Corona tutorials. You will learn everything you want to know by doing so. If you want someone to make the game for you as a contractor I would suggest checking out the studios section here.
http://developer.anscamobile.com/community/studios/
[import]uid: 27965 topic_id: 11967 reply_id: 43631[/import]
no, I want to know to make my game check a txt file for the words or the code [import]uid: 39840 topic_id: 11967 reply_id: 43650[/import]
no, I want to know to make my game check a txt file for the words or the code [import]uid: 39840 topic_id: 11967 reply_id: 43651[/import]
I apologize for the confusion. I thought you were asking for help with making an app and not a specific problem. [import]uid: 27965 topic_id: 11967 reply_id: 43655[/import]
i suggest look for a needed thing on this site:
www.learningcorona.com [import]uid: 16142 topic_id: 11967 reply_id: 43656[/import]
I have and I was looking at some of the tutorials but something really didn’t stick as a way to go. I thought I could have a wordbank in a lua file and when you hit a number it would print a name of a letter. So in 4 seconds you could make a word and if it is a word the you win and get points. How would I build the word function as I know the scoring [import]uid: 39840 topic_id: 11967 reply_id: 43657[/import]
Here’s one way to do it.
Create a wordbank.txt file with all the words you want to check on a new line like
dog
cat
ball etc. etc. And put this file in the main folder where main.lua is etc.
[lua]–read in the word bank txt file
local path = system.pathForFile( “wordbank.txt”, system.ResourceDirectory )
local fh = io.open( path )
–for each line store in our word table
local wordTable = {}
local i = 1 --counter
for line in fh:lines() do
wordTable[i] = line
i = i + 1
end
fh:close()[/lua]
Now you have all the words in the txt file imported and in a table.
So you can just check if the word is in that array by looping through, or use table.indexOf(wordtable, word), it will return nil if the words not there, or the position of the word if it is. [import]uid: 38562 topic_id: 11967 reply_id: 43694[/import]