Page 1 of 1

Another Programming Enigma...

Posted: Sun Feb 04, 2007 7:12 pm
by Matt Vinyl
Hi all,

Come up against another 'wall' in my quest to get a puzzle game together. I've chopped and changed the idea for the gameplay, and I still may not be 100% happy with how it is at the moment. Anyway, let me explain what's going on. Take a look at the piccy, here.

The current aim of the game is to swap the letters around to make words of 2 - 5 letters length in a 'crossword' form. So each word must be connected to another by at least one letter. As said earlier, I'm considring changing this, but at the moment, I'm sticking with this. :)

What I've come up against, is a similar problem to what I had before (finding words within words). Words can be formed anywhere within the grid, but I'm not sure how to implement the 'word checking' algorithm. Essentially, how to 'check' that the player has made a valid word following a letter 'swap'. I'll also need to take into account whether the word is attached to another, which I think will also be pretty difficult! :(

Techy details: Letters are stored in a dim'd string array of 2 dimensions (4, 4) (25 elements). I'm reading in my dictionary as before to an array.

I'm working on it most of the evening now, so may suss it out, but if anyone does have any tips, they're always appreciated!

Cheers!

:)

Re: Another Programming Enigma...

Posted: Sun Feb 04, 2007 7:52 pm
by rocket
Matt Vinyl wrote:Hi all,

Come up against another 'wall' in my quest to get a puzzle game together. I've chopped and changed the idea for the gameplay, and I still may not be 100% happy with how it is at the moment. Anyway, let me explain what's going on. Take a look at the piccy, here.

The current aim of the game is to swap the letters around to make words of 2 - 5 letters length in a 'crossword' form. So each word must be connected to another by at least one letter. As said earlier, I'm considring changing this, but at the moment, I'm sticking with this. :)

What I've come up against, is a similar problem to what I had before (finding words within words). Words can be formed anywhere within the grid, but I'm not sure how to implement the 'word checking' algorithm. Essentially, how to 'check' that the player has made a valid word following a letter 'swap'. I'll also need to take into account whether the word is attached to another, which I think will also be pretty difficult! :(

Techy details: Letters are stored in a dim'd string array of 2 dimensions (4, 4) (25 elements). I'm reading in my dictionary as before to an array.

I'm working on it most of the evening now, so may suss it out, but if anyone does have any tips, they're always appreciated!

Cheers!

:)
And I was doing so well to follow it up until that bit!

The font for the letters looks familiar......Reel Good Time by any chance?!

Posted: Sun Feb 04, 2007 7:56 pm
by Matt Vinyl
Heh, didn't notice that, but I think you're right. It's just a free font I downloaded yonks ago. Just goes to show that we all use 'em, even Global Games... ;)

Posted: Sun Feb 04, 2007 8:02 pm
by rocket
lol! Well I didnt do badly to notice it then - IIRC I think I've only ever seen that machine twice, and played it once!

Posted: Mon Feb 05, 2007 1:11 am
by BidJam
That's awesome mate, what's it programmed in? Can't wait to see it up and running!

Posted: Mon Feb 05, 2007 1:19 am
by rollem
Thats really wicked Matt, your initial design looks really smart too.

Keep it up matey!

Posted: Mon Feb 05, 2007 10:13 am
by Istenem
yep, it looks good, not 100% sure about the fount you've used though. the letters all look a bit too similar. while it may be pretty, when the letters are the player's tools it is easier to concentrate on a simpler typeface. just my (unsought) comments.

depending on the rules i think i've got six six-letter words. can anyone find a seven?

Posted: Mon Feb 05, 2007 1:33 pm
by Weyland
I think I know what you're getting at here.

Each time, up to two rows and two columns can have changes in them, right? So those four sets of five letters should be all you need to check. That'll go down to three if the two letters swapped are in the same row or column.

Posted: Mon Feb 05, 2007 1:42 pm
by Mattb
I'd agree with the font point unknown raised.....the G and C look very similar!

Looks awesome though 8)

Matt

Posted: Mon Feb 05, 2007 6:32 pm
by Matt Vinyl
Hi all,

Thanks for the constructive points and praise! I'll probably look to change the font, although it's chunky, it is quite difficult to distinguish some of the letters... :(

Yup, Weyland, that's spot on - I did get somewhere last night, but ended up getting wound up as I couldn't get part of it to work, although the code looked perfect... :x

UP has given me an idea though, by trying to find words within it that are longer than five letters... <ponderously scratches chin> ;)

:)

Posted: Tue Feb 06, 2007 9:00 pm
by Guest
unknownpseudonym wrote: depending on the rules i think i've got six six-letter words. can anyone find a seven?
SPICERY

Posted: Tue Feb 06, 2007 9:06 pm
by Matt Vinyl
;) I thought you'd be the man to spot it... ;)

You could also have FILTERS... ;)