Boggle game.

This is a discussion on Boggle game. within the Game Programming forums, part of the General Programming Boards category; Hey guys. I'd like to know how I would get started coding a game like Boggle. I don't think it ...

  1. #1
    Registered User
    Join Date
    May 2006
    Posts
    903

    Boggle game.

    Hey guys. I'd like to know how I would get started coding a game like Boggle. I don't think it would require a full-fledged game engine with all its bells and whistles since there is very little to do. There aren't many rules to the game and most of the work is in the procedure making sure all the words the user enters are valid. What kind of structure can I use ? I thought maybe the best option would be going procedural all-the-way yet I'm afraid to lose the code clarity and structure object-oriented programming provides... Yet object-oriented programming seems like hitting a fly with an hammer.

    What is you guys' opinion on that ?

    Thanks.

    Here's a link for you guys in case you do not know what the Boggle game is.

    http://en.wikipedia.org/wiki/Boggle

  2. #2
    Registered User manofsteel972's Avatar
    Join Date
    Mar 2004
    Posts
    317
    Pick your development method and stick with it. If you want to do the program using proceedural programming then do so. If you want to use OOP then do so. It is your project, so you can do whatever you want. You don't need a game engine for any game. Game engines are made so it is easier to make games. You would start off with a basic working framework that you can hang the rest of your pieces of game code on instead of having to code those parts for each game. You do not make a game engine if you are only going to make just a single game. You would probably use one that has already been made by someone else. The first step in getting started is analyzing your problem. You need to break down the game of Boggle. What are the variables you will need? You are going to have a grid either 4x4 or 5x5. Maybe you could use a 2d vector or map. You are going to have that many number of word dice with letters on each side. So 6 letters per word dice with the exception of Qu being two letters. You need to have some way of randomizing not only what side of the dice is face up but also where the dice will be in the grid. You will need a timer. You will need a way to enter words you have found. You would need to verify that 1. they are valid words and 2. that they appear in the grid in a valid form. You will need to keep a list of all the valid words entered so a vector of strings would probably work. You will then need to score each word for points. So you will need to go over each letter in each word and add it to your point total. A lot of these can be considered objects which would make it easy to do OOP. They also group nicely into functions that you could use a proceedural approach so it is really up to you.

    If your only concern about OOP is that it is "like hitting a fly with a sledgehammer," I would go with OOP. Since your concern for losing clarity is probably more serious.
    Last edited by manofsteel972; 08-02-2007 at 11:25 PM.
    "Knowledge is proud that she knows so much; Wisdom is humble that she knows no more."
    -- Cowper

    Operating Systems=Slackware Linux 9.1,Windows 98/Xp
    Compilers=gcc 3.2.3, Visual C++ 6.0, DevC++(Mingw)

    You may teach a person from now until doom's day, but that person will only know what he learns himself.

    Now I know what doesn't work.

    A problem is understood by solving it, not by pondering it.

    For a bit of humor check out xkcd web comic http://xkcd.com/235/

  3. #3
    Dr Dipshi++ mike_g's Avatar
    Join Date
    Oct 2006
    Location
    On me hyperplane
    Posts
    1,218
    I think it would be a small enough project for you to do it in procedural C without it becoming a mess. Then again, I don't know a lot and I'm probably biased because I suck at OOP :P

    Just incase you are interested theres some C source code for solving Boggle games and stuff on this page. The D/L link is under FINDWORD.ZIP. I had a look at it when I was coding a prog to find words in a string. It was created by the guy who made duke nukem so it should be good, shame I couldent understand any of it :'( Maybe you would have better luck

  4. #4
    Deathray Engineer MacGyver's Avatar
    Join Date
    Mar 2007
    Posts
    3,211
    OOP would certainly make is easier for you, but if you can handle it procedurally, and wish to do so, then go for it. I guess it depends how advanced you want to make this. Will it be a console app? Procedural might make a little more sense if you plan on just implementing the bare basics and want to rush it. If you want a GUI with it, and such, then I'd suggest going OOP.

    The main problem I see would be your dictionary. Depending on how large it is, you may want to get slightly creative with how you manage it, although I imagine you're already ahead of the game and have plans for this.

  5. #5
    Algorithm Dissector iMalc's Avatar
    Join Date
    Dec 2005
    Location
    New Zealand
    Posts
    6,293
    This was just asked about recently.
    You'll find the solution I mentioned last time, in this thread:
    Every possible combination/best combination
    My homepage
    Advice: Take only as directed - If symptoms persist, please see your debugger

    Linus Torvalds: "But it clearly is the only right way. The fact that everybody else does it some other way only means that they are wrong"

  6. #6
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,590
    Moved to Game programming forum.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. how do the game engine and the api interact?
    By Shadow12345 in forum Game Programming
    Replies: 9
    Last Post: 12-07-2010, 11:08 PM
  2. Open Source / Semi Open source game idea. Help needed
    By CaptainPatent in forum Projects and Job Recruitment
    Replies: 10
    Last Post: 05-16-2007, 10:44 AM
  3. game engine advice?
    By stien in forum Game Programming
    Replies: 0
    Last Post: 01-23-2007, 02:46 PM
  4. My Maze Game --- A Few Questions
    By TechWins in forum Game Programming
    Replies: 18
    Last Post: 04-24-2002, 11:00 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21