Programming Thread

Started by the-pi-guy, Mar 13, 2016, 10:39 PM

previous topic - next topic

0 Members and 3 Guests are viewing this topic.

Go Down

the-pi-guy

So it takes about 1 minute and 30 seconds to load 250 million ints from a file. 

Nice.

the-pi-guy

Oct 14, 2018, 01:56 AM Last Edit: Oct 14, 2018, 03:40 AM by the-pi-guy
To do:
-keyboard access for typing game (maybe just having a user text box would automatically open it.  Gotta figure that out)
-fix intro blue screen.  I still don't know where it comes from.  I don't know enough about Android software.  But basically when I launch a game, it starts off with a blue screen that disappears when I touch the screen.  My game still has a blue background.
-make it prettier
-also figure out some small issues, with some words being incorrectly marked incorrect.
Mostly improved all of the above. 
Still not sure what to do with keyboard.

Legend

Mostly improved all of the above.  
Still not sure what to do with keyboard.
Does android not have a simple keyboard popup method?

the-pi-guy

Does android not have a simple keyboard popup method?
Issue is, I don't think I want to use Android keyboard. I think I want more control with it.  A Chinese keyboard wouldn't give tone options, instead it would just suggest characters.  

the-pi-guy

So I just figured out the dumbest problem ever.  

Working on my app again, and trying to create a new project.  

First "activity" went fine.  
Second activity broke everything.

For some reason it isn't creating the R file.  

Google doesn't help.  I literally spent a few hours trying to figure this error out.  
So I tried recreating a project again.  

Tried everything again, same issue.  

Then I noticed that my match.xml file isn't being read as an .xml file.  

Finally the solution.  For some reason, android studio added "match.xml" should be read as a text file.  

Legend

This thread is 90% posts about us debugging lol.

the-pi-guy

This thread is 90% posts about us debugging lol.
Debugging is hard.  :(

the-pi-guy

One thing that has been really awesome is seeing how much I remember from older classes.  

Like I've been helping people with their AI assignments, and my AI code from 2 years ago makes complete sense to me.

the-pi-guy

So my new app is on the way to being done.  

Vastly improved the vocab importer.  
-Doesn't rely on the slow character matching.  Saves a huge amount of time

-Also doesn't rely on silly limiters like it used to.  I had a bunch of stupid ways of how things were formatted.  A lot of very unnecessary marking for marking off where the pronunciation part ended and where the word begins.  Now it's set up to make the assumption that the first part is the character, the second part is the pronunciation, and the rest is the meaning description.    It means the files look nicer.  The only downside is if I were to start doing something in a language that did have spaces between words, it wouldn't work.  So if I wanted to make a spanish file with something like New York, it would break.   But it works great for languages without spaces.  Maybe I'll make it more dynamic someday.


Start Screen:
-Now the start screen has another button to toggle between languages.  Adding that change meant I had to make some changes to pretty much everything else.  Had to pass the language to whatever game was being started, and that had to be passed to the vocabimporter so that it'd get the right language.

Matching Game:
I made it more dynamic, so that it would ask the player different things.  
So instead of going from pronunciation to English meaning, it switches between every pair of (pronunciation, English, characters).

The worry I had was with Chinese.  Chinese has a ton of words that sound exactly the same, but mean wildly different things, so I added stuff to the matching game so that it'd make sure that there was only 1 correct choice.  So if it gave me shi, there'd only be one word or character to match with shi.  

So that's a lot of fun.  

Made a Chinese list for the words.  And ensured that it was working with the vocab importer.  

So huge improvements across the board.  

The only thing that isn't being worked on, is the writing game.  

The writing game will probably be the next and last thing that I do.  


That's where I wasn't sure what to do with the keyboard.  

Basically if you type in Chinese in the android keyboard, as far as I know, there aren't any pinyin options.  

So there's no way to differentiate between the 5 ways of spelling ma.
Depending on what android keyboard you were using, it either won't work, no difference, or it'll give the various Chinese options.  So that's a challenge, I'd like to avoid, and just make my own keyboard that does exactly what I want it to.

It won't be pretty or functional outside of the app, but in the context of the app, I think it'll be the best way to go about it.  
Far from being the most pretty thing, but this is the current state:



Legend

Congrats!

Why can't you use spaces in words? Could you not write them as an _ in your file and change it to a space when displaying it?

the-pi-guy

Congrats!

Why can't you use spaces in words?
There's not like a technical reason.  It just isn't set up that way (yet).  :D

Could you not write them as an _ in your file and change it to a space when displaying it?
I just had a different idea of how to go about it, but to be honest, this is a great idea.  
Would require minimal changes to the code too!  

the-pi-guy

So the last two challenges are:

Figuring out pinyin.  

So basically when I type something like mian, it has to know which lettersto put the tones over, depending on the setting.  

The other challenge is making it so that hard words show up more frequently.  

the-pi-guy

Figuring out pinyin.  
I believe this is all functional.  

I tried like 4 different methods of doing it.  But I ended up with the easiest way, by adding another user button to add 1,2,3, or 4 to the string. And then it basically adds that tone to the previous letter.  

A tiny speck more work for the user, but it saves the programmer an immense amount of work.  And since both of those are me, it ends up saving me time.  

Tomorrow I'm going to be testing it to ensure that everything works as it should, but so far it looks promising.  

the-pi-guy

I think unless I run into problems, I am not going to be adding anything more to my app.  

On to other projects.  :D

Legend

I think unless I run into problems, I am not going to be adding anything more to my app.  

On to other projects.  :D
Woohoo you finished it!!!

Go Up