Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (523)
Games in Android Showcase (127)
games submitted by our members
Games in WIP (592)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Scr4mble - 4K's first word game!  (Read 5910 times)
0 Members and 1 Guest are viewing this topic.
Offline woogley
« Posted 2008-12-20 18:26:39 »

I've been working on this for the past 6 hours or so, it's about as complete as it's gonna get..

So here it is, Scr4mble:


The idea is simple.. the game will show you a scrambled word. Your goal is to unscramble it. You're awarded 1-point-per-letter of the word. You have 2 minutes to achieve a high score.

Depending on which version of Java you use, there are 750-1000 unique words

Controls:

Welcome screen:
  • Press -ENTER- to start the game
  • Press -ESCAPE- to quit the application

In-game:
  • Type the correct spelling of the scrambled word
  • Press -SPACE- to rescramble the word
  • Press -ENTER- to cheat (and lose 1-point-per-letter)
  • Press -ESCAPE- to return to the welcome screen

The game will run on 1.4.2+
The unsigned, non-standalone version weighs in at 3.56k. 3.88k with manifest, and 4.97 when signed

I "accidentally" created this game while experimenting with word scraping. For those who would like to create their own 4K word game, you can find my word scraping code here

Thanks for reading

-- Matt

edit: added webstart
Offline Markus_Persson

JGO Wizard


Medals: 16
Projects: 19


Mojang Specifications


« Reply #1 - Posted 2008-12-20 19:03:26 »

Very nice! It feels complete and polished, and the idea of word scraping via reflection is pretty darn clever.
It feels like the actual words are either very obscure or too simple, but I guess it's kind of hard to work around that by just scraping what's available from within java. =)

Play Minecraft!
Offline woogley
« Reply #2 - Posted 2008-12-20 20:07:55 »

Very nice! It feels complete and polished, and the idea of word scraping via reflection is pretty darn clever.
Cheers. Though I should mention I read about this idea a few years ago (I think Abuse was talking about it).

It feels like the actual words are either very obscure or too simple, but I guess it's kind of hard to work around that by just scraping what's available from within java. =)

Yes definitely. That's actually what prompted me to add the rescramble feature. But, unfortunately, some words (coalesce, postscript) are just too obscure when scrambled Smiley
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Abuse

JGO Knight


Medals: 14


falling into the abyss of reality


« Reply #3 - Posted 2008-12-20 21:38:53 »

I like it, very polished!

I've still not done anything with the 2nd revision of my word scraper code.
The 1st revision used reflection like yours, but after losing the code, I rewrote it.
This time it reads the binary class files directly from rt.jar, extracts all utf8 Strings from the constants pool & then does some filtering.

I found this gets a much bigger dictionary (~20000 unique words), alot coming from comments contained in the classes.
It also gives slightly smaller code due to fewer references to api methods.

Though, i'm using regex for performing all of the word filtering - and it's incredibly slow atm.
The culprit is mostly this monstrosity:
1  
s.replaceAll("([a-z])([A-Z])","$1 $2" ).split("\\[L|(.)\\1{2,}|[\\W\\d_]+")

It takes about 2 minutes to fully parse the contents of rt.jar! Cheesy

Though due to word duplication there are obviously diminishing returns the further you get into the process... the first few 1000 words only take a second or two, so it isn't quite so fundamentally flawed Cheesy

p.s.

I havn't looked at that regex expression since I wrote it back in sept. and I can honestly say without a regex manual, I have no idea what that split(...) is doing - isn't regex brilliant! Grin

Make Elite IV:Dangerous happen! Pledge your backing at KICKSTARTER here! https://dl.dropbox.com/u/54785909/EliteIVsmaller.png
Offline appel

JGO Wizard


Medals: 51
Projects: 4


I always win!


« Reply #4 - Posted 2008-12-21 00:16:21 »

Nice.

Maybe create difficulty levels for more difficult words?

Check out the 4K competition @ www.java4k.com
Check out GAMADU (my own site) @ http://gamadu.com/
Offline zeroone
« Reply #5 - Posted 2009-03-15 16:03:20 »

This game reminds me of Text Twist, though not as fun.  How is the word list stored?  Why does retrieving it require reflection?  The cheat option does not make that much sense to me.  Maybe you should make this more like Lingo where there are effectively hints pointing you in the right direction.
Offline pjt33
« Reply #6 - Posted 2009-03-15 22:00:07 »

How is the word list stored?  Why does retrieving it require reflection?
It isn't stored. He uses reflection to get class names which can then be split to generate words. Having a full list of words is impossible in 4k - I have a list of all 3 to 6 letter words in English and it zips to over 18kB.
Offline CyanPrime
« Reply #7 - Posted 2009-03-16 07:16:27 »

But 4mb is way past the size limit.  Tongue
Offline woogley
« Reply #8 - Posted 2009-03-16 07:35:11 »

Wow, I almost forgot I posted this game

Don't take it too seriously, reviewers Smiley

As the source code states, it was just an experiment, I wouldn't try too hard to find value in the game Tongue
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

SHC (24 views)
2014-11-25 12:00:59

SHC (23 views)
2014-11-25 11:53:45

Norakomi (21 views)
2014-11-25 11:26:43

Gibbo3771 (22 views)
2014-11-24 19:59:16

trollwarrior1 (36 views)
2014-11-22 12:13:56

xFryIx (74 views)
2014-11-13 12:34:49

digdugdiggy (52 views)
2014-11-12 21:11:50

digdugdiggy (46 views)
2014-11-12 21:10:15

digdugdiggy (41 views)
2014-11-12 21:09:33

kovacsa (68 views)
2014-11-07 19:57:14
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!