Help needed with Mouse-Control and Game-creation
Author |
Message |
Demagogue

|
Posted: Mon May 12, 2008 9:59 pm Post subject: Help needed with Mouse-Control and Game-creation |
|
|
I don't mean to spam but I couldn't find another way.
For my G10 cultimating, I intend to write a turing program for an interactive game. More specifically, a test of mouse-control. I'll need a menu, with difficulty levels for the game and some background information; rules, instructions etc.
The game I've picture as something like a maze which you guide your mouse pointer through, without touching the edges (yes I'm your genuine noobling) and if the user does so an, error pops up having him restart the game until he reaches the end.
What I'm not sure is, how to create the maze, rather the more complicated mazes. This is difficult because although I could create a box and apply conditions to it (the mouse pointer has to stay within the box) I couldn't do this for the more intricate mazes, the ones that might actually be fun and challanging. Perhaps even a few animated objects flying across that the user has to doge.
So, I'm pretty clear on how to make the menu (suggestions would yet be appreciated) but how do I create the game with minimum hassle? Being the lazy boy that I am, your help is MUCH appreciated.
To readers who aren't interested in the prolix above, I offer objectivity.
I need:
-Programming help for an interactive mouse-control game
-Help on multiple collision detections, (I guess referring to the above paragraph might help here)
-General tips on creating a Menu and scoring system
-Some sleep, so goodnight  |
|
|
|
|
 |
Sponsor Sponsor

|
|
 |
syntax_error

|
Posted: Mon May 12, 2008 11:19 pm Post subject: RE:Help needed with Mouse-Control and Game-creation |
|
|
DO NOT USE THE TURING GUI, DO NOT.
now that's out of the way, as for the "limits" for the mouse to travel in, a simple yet, brilliant way is first have a 2D array controlling the screen and use a .txt file to load in what ever maze pattern you wish you import into the array and then you can simple check if the mouse stays in the given area or not.
And yes, God night at 10? sure. |
|
|
|
|
 |
r691175002
|
Posted: Mon May 12, 2008 11:43 pm Post subject: Re: Help needed with Mouse-Control and Game-creation |
|
|
There are a couple ways to approach making a maze game, I am not familiar with turing so I don't know which ones are feasible.
The one I would first suggest is just draw your mazes in a graphics editing program and look up the pixel color that the mouse is over. Make a generic rule like "If the mouse is not over a white pixel, he dies".
This way you can get some nicely complicated mazes and it is incredibly easy. You may even be able to load animated .gif's for moving mazes.
The next step up involves creating some form of maze format and writing an editor as well. Something simplistic would just consist of line coordinates that you cannot cross or box areas that you cannot cross.
You could try a cross between the two, with a bitmap for the static portion of the map and a simplistic maze format for the animated parts.
Anything beyond that really just involves a more complicated maze format and editor. For something like a maze I would consider an art based solution ideal since math isn't really necessary nor does it add anything to the game. |
|
|
|
|
 |
Demagogue

|
Posted: Tue May 13, 2008 7:42 pm Post subject: RE:Help needed with Mouse-Control and Game-creation |
|
|
Quote: The one I would first suggest is just draw your mazes in a graphics editing program and look up the pixel color that the mouse is over. Make a generic rule like "If the mouse is not over a white pixel, he dies".
that sounds incredibly convenient, but is it poissible? |
|
|
|
|
 |
gitoxa

|
Posted: Tue May 13, 2008 9:49 pm Post subject: Re: Help needed with Mouse-Control and Game-creation |
|
|
whatdotcolour |
|
|
|
|
 |
Insectoid

|
Posted: Wed May 14, 2008 10:17 am Post subject: RE:Help needed with Mouse-Control and Game-creation |
|
|
Whatdotcolor |
|
|
|
|
 |
isaiahk9

|
Posted: Sun May 18, 2008 6:36 pm Post subject: RE:Help needed with Mouse-Control and Game-creation |
|
|
For the menu, DON'T USE PROCEDURES! Procedures in menus will result in more than a few errors that takes several hours to fix (!). Personally, procedures in a main menu will cause more trouble than processes. Make your entire game in the one file, or the entire menu, with one porcedural link to the game.
Now that I've got my rant over, as for scoring, make a variable called
var score : int := 20
var youlost : boolean := false
If the user dies, then youlost := true.
If youlost := true then
score := score - 1
youlost := false |
|
|
|
|
 |
gitoxa

|
Posted: Sun May 18, 2008 7:55 pm Post subject: RE:Help needed with Mouse-Control and Game-creation |
|
|
Quote: Procedures in menus will result in more than a few errors that takes several hours to fix
Then you have no idea what the real purpose of a procedure is. |
|
|
|
|
 |
Sponsor Sponsor

|
|
 |
isaiahk9

|
Posted: Sun May 18, 2008 7:57 pm Post subject: RE:Help needed with Mouse-Control and Game-creation |
|
|
Procedure : off the top of my head, a procedure is made to simplify your code and to allow error-tracing easier. It allows a collective folder be a single file. It makes coding simpler, and life simpler.
Outside of menus. |
|
|
|
|
 |
Sean

|
Posted: Mon May 19, 2008 9:00 am Post subject: RE:Help needed with Mouse-Control and Game-creation |
|
|
You want Procedures in your games. Avoid processes. They are only good for music, and with that, they are not the best. |
|
|
|
|
 |
isaiahk9

|
Posted: Mon May 19, 2008 9:15 am Post subject: RE:Help needed with Mouse-Control and Game-creation |
|
|
No, I've never had issues with processes. Only procedures (and only in my menu, when clicking activates a procedure). |
|
|
|
|
 |
riveryu

|
Posted: Fri May 23, 2008 10:32 pm Post subject: Re: Help needed with Mouse-Control and Game-creation |
|
|
Its hard to argue without proofs, but I advice the use of procedures and discourage processes.
I've never had problems with proc except when my program has more than 400 lines.
I simply avoid processes because of reading thisWhy You Should Avoid Processes |
|
|
|
|
 |
isaiahk9

|
Posted: Sat May 24, 2008 8:47 am Post subject: RE:Help needed with Mouse-Control and Game-creation |
|
|
OK |
|
|
|
|
 |
|
|