Time for Words

Hey all,

I’m a long-time lurker here, and I’m pretty involved with a few other Java forums. A lot of what you guys discuss is a bit over my head, but I learn a ton just admiring your work (the featured games forum has stolen entire days of my life).

I do a lot of “just messing around” programming on my own, and I’ve thrown a few programs up on a site here. It doesn’t always work in Internet Explorer (those rectangles with pictures in them are supposed to look/act like buttons), as I’m still painfully new to the web side of things.

My latest addition is admittedly a clone of the “unscramble the letters” type games, but I think it’s pretty playable.

http://www.kevinworkman.com/code/TimeForWords/screenshot.png

Play here: Time for Words

If the buttons on that site don’t work for you, here are some direct links:
Applet
Web Start
Jar

I know this game isn’t going to change the world or make me famous, but I’d still love any feedback on it (or any of my other programs), especially on the web side of things. It’s taken me a while to get to this from the “single applet on a gray background” awfulness, so I’d love any pointers if anybody has the time.

Thanks again. I’m looking forward to hearing what the real experts have to say.

Fun! But very hard when playing on 1024x600 :slight_smile: I have to keep scrolling to type, and see the letters. Or try to remember the letters, but that’s really hard.

Eek! Sorry. I develop on a 1680x1050 monitor, and one of the things I need to learn how to do better is to remember that not everybody will use my programs on the same size screen.

That being said, you could use the web start or runnable jar versions and resize the window to whatever size you want!

Again, thanks so much for taking the time to play around and give some feedback.

You asked for review/critque

Time for words: It worked, I played/did good, I wish it told me what words I didn’t guess after the game ended.

From site:
The Briny Depths:
I love the look of the game so much, I think I might make a game inspired from it.
The game is hard! I wish I had more control arrow keys over sub instead of mouse or it started off a little easier and got harder. (after practice I got better, but still is really hard! This isn’t a bad thing though, I like hard games, just wanted to let you know, sometimes when people play/program a game a lot, they get too good at it for their own good and difficult can get skewed.

Tree Generator:
Once again, I love it
though I think this would be even cooler if I could customize things some manual variables as well as random
i.e. number of branches, height of “initial branching” some other scalars for hanging branches/length/leaves/etc…

Fireworks:
Nice, the one thing I would personally change is offer a “scalar/time” so that instead of(or as well as) the burn time/fade is have the pixel/particle “shrink” if you can. So if its a 10x10 pixel, have it shrink to 1x1 pixel as it fades/disappear. This would only be a “feature” in addition to everything you already have though, not a replacement, because sometimes you want the fixed size.

Also perhaps an “auto” mode, so that it shoots fireworks randomly so you can watch a “firework” show using some seed value.

Wind:
This thing is creepy at first :slight_smile: I was watching it and so confused as it was moving randomly or following my mouse.
I am fascinated with this thing, I wouldnt know if I would call it wind, but its very interesting and its effects/variances of settings.
I think i like the all green, non recovering lines the best. Though sometimes it behaves VERY strange, nothing is “broken” but this thing is really neat/weird.

Little bird,
although it felt like a really long download, its pretty neat. But your cloud generating algorithm can destroy resources.(even on a fast computer)
If I fly near stop, it generates a TON of clouds, almost to the point where there is no blue sky, and it lags the system bad
Whereas if if I fly super fast. it barely generates any.
I didn’t look at the source, but perhaps a scaling amount of clouds based upon FPS. So that if FPS starts dropping, have it produces slightly fewer number of clouds. Id also love if there was some blending in the clouds between shapes instead of just transparency.
I think it would be a really fun experiment to try and make a couple A.I. birds that fly around, itd require only the most basic of AI as no obstacles in the way. Maybe even make one of them occasionally follow you, then fly away randomly.

I just read/looked, EW uncompressed wav. no wonder it was such a huge file! 39 meg wav file and a 2kb game :stuck_out_tongue: such a crazy mix you know.

Just quickly scanning through the code. One thing I noticed was that in your cloud generation, you have a lot of Java Math functions in the cloudX and cloudY generation. such as Math.toRadians I personally wouldn’t use that function for this scenario. just like I wouldn’t use the built in function for PI but declare PI yourself as a final static constant 3.14 or whatever because its unneeded accuracy/precision for a simple cloud position/rotation.

I am no expert on java performance but the other thing in the cloud generation that could add unneeded resources is that you declare a new Point everytime, could you not just make a point and redefine its x,y and stick it in there instead of making a new Point2D each time?

Alternatively, I believe it’d be neat(maybe easy?)(and without 3rd party libs) if you set it up so that the audio simply streams from your site instead of having to download the whole thing first.
(sorry for long post on little birds, but I like it a lot lot already. and I feel like it has soo much potential to be even better.

Overall:
I think everything is pretty great! Keep up the good work!!

Seriously, thanks for taking the time. Up to this point my audience has mostly been myself and a few friends who aren’t really interested in nerdy things like programming or little games, so it’s great to get a real opinion.

[quote=“namrog84,post:4,topic:36868”]
“It worked” is pretty much exactly what I was going for. :stuck_out_tongue: I thought about showing the words missed, but I wasn’t quite sure when that should happen- so in the end I got lazy and left the feature out entirely, but there probably is a better way to display it, maybe for a couple seconds between rounds.

[quote=“namrog84,post:4,topic:36868”]
I’m taking that as a big compliment, especially because that was one of the first games I made for the site. I didn’t spend too much time tweaking the level generation algorithm, so it’s really basic- and can be impossible to beat. One of my goals is to build up a library of programs that can be used as starting points for novice programmers to play with and improve, so I actually purposely stop myself from doing too much tweaking, leaving that for version 2.0. But those are all really awesome suggestions.

Thanks again. The customization is actually one thing I played with, a little too much actually. I always ended up hating the results and starting over, eventually settling on the version you saw. I had trouble finding a balance between giving customization options and guaranteeing that the things looked mostly tree-like, but I might revisit that at some time in the future.

[quote=“namrog84,post:4,topic:36868”]
Those are good ideas. Hmm, maybe I’ll throw together version 2.0 in time for the fourth of July.

[quote=“namrog84,post:4,topic:36868”]
Hahaha I like that. My initial plan was to eventually combine the tree generator and the wind program into one larger program, but I have not gotten around to it.

[quote=“namrog84,post:4,topic:36868”]
I love love love your idea of the AI birds. And yeah, I’m guilty of the uncompressed wav (I didn’t know how to play an mp3 without a third party library, and the compressed wav sounded awful, this was my first attempt at playing sounds in Java) and the oftentimes horrible framerate. I’ve been wanting to take another look at everything, but I keep getting sidetracked by new ideas instead.

[quote=“namrog84,post:4,topic:36868”]
Those are all solid ideas. I admittedly almost never focus on optimization, and it really shows in the Little Bird program. I think I’m going to make a point of updating and improving these programs, now that I’ve got a few that seem worth it. If only my brain would stop coming up with new ideas, I could focus on refining the old ones!

[quote=“namrog84,post:4,topic:36868”]
I never thought of that. That would probably work really well for at least the applet version. I have to figure out how to actually play sounds the correct way though.

[quote=“namrog84,post:4,topic:36868”]
Thank you so much! You provided a ton of awesome feedback, which is way more than I was hoping for. I appreciate it.

If you ever need someone else for audience, because I myself only really have a couple friends and my parents to demo stuff too. I would be glad to take a look or poke at things, before they are ready to show the world, even tiny small test things I enjoy. Are you ever on gmail chat or aim or something?

I like your idea about leaving room for tweaking. I am actually in the process of building a novice programmer website with a ton of samples/source/examples etc… and I may incorporate some minor "homework assignments to the samples of things for people to try and add

I always get sidetracked by new ideas as well, its unfortunate that I have a bunch of 90% completed things :frowning:

As I have often seen said, there really is no need to optimize if your program works, and it works fine for most systems.

How did you validate if a word was correct or not?

Quite a fun game btw, I love games like that :slight_smile:

Thanks. The best way to reach me is via email- kevinaworkman at gmail dot com. How is your website coming along? I’d like to check it out sometime. From other forums, I know that people are definitely interested in that kind of thing. I usually point them towards Project Euler, but people get bored with math, plus they want samples to work from.

One of my goals starting this collection was to get out of the habit of coming up with an idea, becoming really excited, getting halfway to finishing it, then having another idea about something I should add, starting that before the first thing was finished, getting another idea, etc. It takes some patience to make sure the “boring” stuff is completely laid down before even thinking about adding anything extra, but I think it’s an important habit to get into. That’s why most of my games and programs are the bare minimum- they invite you (or at least me) to think about what could be added- and they’re complete enough that it shouldn’t be too hard to do. That’s the theory anyway.

Premature optimization is evil. But I might take it a step too far by not optimizing at all, even when things should obviously be improved.

I used a dictionary file. The loading at the beginning is populating a List of all the words in that dictionary file. Then for each set of letters (generated randomly), I iterate over that entire List, checking to see whether each word can be made by the set of letters for that round. If so, I add it to a List of valid words (the whole process only takes a couple seconds, but I do it on another thread so the next round is ready as soon as new letters are requested- you’ll notice some backup if you request a set of new letters immediately after requesting a new set of letters, as it has to wait for the thread to finish). Then when the player types a word, I check whether it’s in the List of valid words.

That’s almost definitely not the most efficient way to go about it, but it seems to work fine and is WAY better than my original approach- this program was born by me idly writing a recursive algorithm that created a list of all possible words, given a list of input characters. That simply breaks with longer strings of characters (which my program doesn’t use, but theoretically could). This is interesting to me, because it’s a case of a dumb algorithm succeeding where a “smart” one fails.

I could also improve the initial loading time by taking out any words that are greater than six letters long, but I wanted to leave them in, in case somebody (or a future me) wants to allow longer letter Strings (imagine having 12 letters to work from instead of 6).

Sorry, that’s probably way more than you wanted to know, but I’m just excited to see other people look at my stuff! Thanks again for your time.

[quote=“ra4king,post:7,topic:36868”]
Thanks so much! You guys are making my day (which isn’t hard to do, considering I spent most of it writing a paper, blegh).

Yeah I thought you would have a dictionary file. I tried to make a similar game before but I could never find any dictionary files online at all :frowning:

EDIT: And I’m very impressed by that Tree generator and the Wind applet. For the Wind applet, I’m quite clueless on how to implement it! Thanks for the source!

Whaaat, really? My problem was that I found too many dictionary files online! It took me a little while to narrow my options down to a good dictionary file- a lot of them are missing words, or contain nonsense or technical words. Most linux machines have a dictionary file on them, but they seem to contain a lot of nonsense also (in my limited experience, anyway).

I googled things like “spellcheck dictionary word list file” or “anagram checker word list file” and got some promising results. Also, the dictionary file I used is available in the source, it’s just a plain text file.

Added an edit to my post :wink:

[quote=“ra4king,post:10,topic:36868”]
Hahaha I’m glad you guys like the wind one. This makes for a neat effect:

Turn “Lines Recover” off.
Turn wind resistance all the way down.
Move the wind around for a while.
Turn wind resistance all the way up.
Turn “Lines Recover” back on.

I don’t know why, I just think it looks a bit trippy as the lines slowly morph back to their original positions. Actually, I just thought of a whole new audience for this game… :wink:

That was creepy!! I like it :slight_smile:
Well nice job and good luck!!

Oh and uh…nice cat :wink:

Could it be easier and faster check dictionary with some O log(n) algrorithm and permutations.
With only six letters there can be only about 1000 different combinations of letters. Then it should be really fast to check if combination is at dictionary.

Hahahahaha thank you!

Yeah, you’re right. But the check is pretty much unnoticeable as is, and I left it that way so it’s easy to expand on later.

My first stab at this (the recursive algorithm) built up every combination of letters (720 words out of 6 letters if all the letters are different, which is much smaller than the number of words in the dictionary) and checked each against the dictionary. I think that’s basically what you’re saying to do. That might be the way to go (especially after optimization) for six letters, but as the number of letters increases, the number of word combination skyrockets to the point that it’s actually faster to work backwards- check each word in the dictionary against the letters, not each word the letters can form against the dictionary. 12 distinct letters can form 479,001,600 words, which is WAY more than the words in the dictionary, and tended to be unresponsive or cause a StackOverFlowException. And since I can see somebody (maybe me) increasing the letter count limit in the future, that’s why I stuck with the “dumb” algorithm.

Pretty impressive little game. Reminds me of Boggle :slight_smile:

I ran the Web Start version on my MacBook and it worked great. Thanks for providing a .jnlp version and other formats too to make it as easy as possible for people to run your game.

It’s pretty hard and at first I didn’t read the instructions closely enough and I spent a whole bunch of time trying to guess the full 6-letter word!

Thanks for sharing! Two thumbs up.

ps I tried a few other apps. Cool stuff. The Briny Depths webstart link is incorrect.

Awesome, thanks a lot. And thanks for the great catch of the typo- should be fixed now.

I’m still playing with the different options for making a game/program available. I’ve seen arguments for always using full installers, but I personally prefer the stand-alone applets and web starts for less threatening-looking quick access, and downloadable jars for offline access. I’m still learning though.

Applets are the most welcome since they offer quick access and no downloads :slight_smile: