Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Validate this program outline? <3

Author
Message
Paladeus
18
Years of Service
User Offline
Joined: 26th Feb 2006
Location: Oklahoma
Posted: 3rd Jul 2006 08:29 Edited at: 3rd Jul 2006 08:33
Oki guys. For those of you who have seen my post for my RPG-esque interface, I decided to try out a FEW different ones and see what I like best. BUT, until I finish that off, I decided to learn how to work with 2-d interfaces first so I would have less trial and error later with my plans on my other games. This should be relatively simple and a very simple place to start.

My plan in HangMan (revamped from the text-based one I did.) I will make a very simple interface where I add buttons and backgrounds, and MAYBE a music selection for added complexity (otherwise, it is gonna be boring for me, I need to figure music out also, though it will probably wait until after the program is mostly finished and working for simplicity.)

This is my outline/plan for the game. I am going to start it tomorrow (or about 14 or so hours from now anyway) and use what responses I get from here as the decision on if what I thought up would be nice, stupid, good, an accident waiting to happen, etc.

First off, I will be using arrays for my wordlists for categories and words. I plan on this because it will cut down on multiple files and ease. Also.. I never figured out how to make the program choose a word from random in its list ^^ I had it working at 1 point, but sadly, I had to reformat my computer and lost EVERYTHING I had worked on up to a few days ago.

After making my worldlist arrays, I will load all images (and music if used) and then display all my visuals on-screen. The category, the letters chosen, the parts of the body that have accumulated, etc.

From there, I will probably use functions (to learn them and get accustomed to them) to call words and show an equal number of "_"'s for each letter to be chosen.

Key user input. Basically, check keystroke, and log it against number of guesses left each time, and display key pressed on screen either in the word where it belongs, or in letters guess (or both if right).

-----------------------------------------------------------

Okay, so.. I feel like I am forgetting something.. something NEEDED. Hence this post. Does anyone have any ideas as to what isn't on there that should be? I know that I won't have a decent-looking interface.. I am not good with graphics, lol. But I do have some halfway decent graphics obtained through one of the posts (they were posted with permission given.) I just need to figure out what I am missing.. It seems just... too simple.. o.O'

Thanks for any help offered, criticize if you would like.. but be gentle. I'm a Libra, I don't like stiff situations. <3

Paladeus

[edit] Program is DBP [/edit]
Xarshi
18
Years of Service
User Offline
Joined: 25th Dec 2005
Location: Ohio
Posted: 4th Jul 2006 15:08
Well from the sounds of it,I can help you with one thing. I won't give some really good code at the moment,but I will eventually(I'm at my friends house). Basicly,you'll wanna just read out of a file to get all the "keywords" to look for. And make for each line it reads an array. You can number the arrays,like when you make a function to add an index to the array,increase a global variable once. Then you can keep the total amount of ids in use,then use a for i = 1 to NumWords then just check if the id is a word. Make a udt to store the word string,the total number of letters as well. I'll re-post soon and give a more clear answer.

all ben needs is his band,his guitar,and his computer
Paladeus
18
Years of Service
User Offline
Joined: 26th Feb 2006
Location: Oklahoma
Posted: 4th Jul 2006 22:01
o.O' I don't know what you mean by "UDT". Sorry. The rest seems like an interesting idea on how to make it work out, and gives practice reading from files and such. Definitely gonna check out what you give me. If nothing else, I like the idea of seeing how it would have been done on your side. I like seeing several ways of doing the same thing.

Paladeus
Dream And Death
18
Years of Service
User Offline
Joined: 21st Feb 2006
Location: The circus! Juggling job, kids and DBPro
Posted: 4th Jul 2006 23:00
UDT=User Defined Type - DBP only.

Means you can do things like this:

Then you can store a sprite number in each part of the hangman along with the word to guess.

1001+ uses!

"You get what everyone gets, you get a lifetime!" - Death, The Sandman Library

First you Dream, then you ... - Neil Gaiman, 2001
Xarshi
18
Years of Service
User Offline
Joined: 25th Dec 2005
Location: Ohio
Posted: 5th Jul 2006 21:12 Edited at: 5th Jul 2006 21:15
Ok,I'm back with some code. I made a little program,it doesn't require media so I'll just post it(But I'm disecting it first). First,I always use a sub to setup stuff that has anything to do with arrays. Here is the sub:


That sets up a udt called tKeyword, it declares the global array gKeyword as the udt,and it declares a variable that will store the total number of keywords at the moment. Then we move onto a function. Its called AddKeyword. It will be needed for the reading function. Here is the code to that:


What that does is it injects the array,increases the total amount of keywords. The total number of keywords,say like 10,would be the id for this single keyword. Thats what the w is,and thats why we use it as the array index. We simply just assign the gKeyword(w).kword as the string parameter. That means that you now have the keywords actual word assigned. Then it stores the number of letters in the keyword.

Next is the ReadKeywords function. Its quite simple,you just give the filename and it reads the lines of the file and stores them as keywords. Here is the code for that:


The first line is just checking if the file exist,then it uses one of my functions to get a free file. it then opens to read. I told it to repeat the reading of the file until the file ends,so it will add each word on each line as a keyword(if you have two words on a line,they will be considered one word...). It uses the AddKeyword function to assign the words read to a keyword index in the gKeyword array. Here is the code for the freeFile thingy:


Now here is an example used with the above code snippets:


The keywords .txt is attatched. Hope this helped

all ben needs is his band,his guitar,and his computer

Attachments

Login to view attachments
Paladeus
18
Years of Service
User Offline
Joined: 26th Feb 2006
Location: Oklahoma
Posted: 7th Jul 2006 10:52
o.o

*Nuzzles Benny53*

[Slow voice] I liiike you... <pinky to mouth>

Those are QUITE helpful. Those are example types that I learn from quite well with.

And thankies to Dream and Death as well. Sorry for not replying quickly/early. I have had a lot of workload on-site.

I will definitely be looking over those and tweaking and such. ^^ And fiddling.. lots and lots of fiddling ^^

For now, however, it is SOO bedtime. I just wanted to check this out before I hit the rack. I rather enjoy the UDT idea. It seems very interesting and I can see a lot of uses for it. Nighties for now.

PS :: Once I get everything set up, I will give you guys a playable version. I had a text version, but, needless to say, that was SO boring it wasn't even funny.

Paladeus
Xarshi
18
Years of Service
User Offline
Joined: 25th Dec 2005
Location: Ohio
Posted: 9th Jul 2006 01:10
hahaha,glad they helped.

all ben needs is his band,his guitar,and his computer
Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 9th Jul 2006 03:31
Did benny just get laid?

Login to post a reply

Server time is: 2024-09-25 03:39:10
Your offset time is: 2024-09-25 03:39:10