Another Programming Enigma...

Off-topic chat, talk about whatever you like..
Locked
User avatar
Matt Vinyl
Senior Member
Posts: 7198
Joined: Wed May 11, 2005 6:56 pm
Location: Lost in the outback, Bryan

Another Programming Enigma...

Post 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!

:)
"And do you ever contradict yourself, Minister?" "Well, yes and no..."
rocket
Senior Member
Posts: 491
Joined: Sun Nov 20, 2005 12:55 pm

Re: Another Programming Enigma...

Post 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?!
User avatar
Matt Vinyl
Senior Member
Posts: 7198
Joined: Wed May 11, 2005 6:56 pm
Location: Lost in the outback, Bryan

Post 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... ;)
"And do you ever contradict yourself, Minister?" "Well, yes and no..."
rocket
Senior Member
Posts: 491
Joined: Sun Nov 20, 2005 12:55 pm

Post 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!
BidJam
Junior Member
Posts: 1
Joined: Thu Feb 01, 2007 2:36 am

Post by BidJam »

That's awesome mate, what's it programmed in? Can't wait to see it up and running!
rollem
Senior Member
Posts: 438
Joined: Thu Nov 30, 2006 11:49 pm

Post by rollem »

Thats really wicked Matt, your initial design looks really smart too.

Keep it up matey!
User avatar
Istenem
Senior Member
Posts: 5918
Joined: Sat Apr 30, 2005 2:42 pm
Location: the nation's capital
Contact:

Post 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?
nobody ever wins on those things.
Weyland
Senior Member
Posts: 1001
Joined: Fri Nov 18, 2005 9:58 pm

Post 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.
Mattb
Senior Member
Posts: 5809
Joined: Sat Apr 30, 2005 2:43 pm
Location: Cambridge

Post by Mattb »

I'd agree with the font point unknown raised.....the G and C look very similar!

Looks awesome though 8)

Matt
"Sixty percent of the time, it works, every time!"
User avatar
Matt Vinyl
Senior Member
Posts: 7198
Joined: Wed May 11, 2005 6:56 pm
Location: Lost in the outback, Bryan

Post 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> ;)

:)
"And do you ever contradict yourself, Minister?" "Well, yes and no..."
Guest

Post by Guest »

unknownpseudonym wrote: depending on the rules i think i've got six six-letter words. can anyone find a seven?
SPICERY
User avatar
Matt Vinyl
Senior Member
Posts: 7198
Joined: Wed May 11, 2005 6:56 pm
Location: Lost in the outback, Bryan

Post by Matt Vinyl »

;) I thought you'd be the man to spot it... ;)

You could also have FILTERS... ;)
"And do you ever contradict yourself, Minister?" "Well, yes and no..."
Locked