Page 1 of 1
WRITING A SIMPLE GAME PROGECT.
Posted: Mon Mar 31, 2008 1:15 pm
I Am Trying To Write A Simple Game Program With Qbasic.
The Idea Is For The Game To Have An Option (continue, Quit), 3levels, A Timer And Preferably A Sound.
The Basic Pattern Is To Have A Few Boxes Moving From Left To Right At The Top Of The System, And For A Shooter To Be Below Aiming At The Boxes Above.
Please Someone Try And Come Up With Something In Time. PLEEEASE.
I'VE GOT TO SUBMIT IT THIS WEEK, BUT TAKE YOUR TIME.
Posted: Mon Mar 31, 2008 2:07 pm
removed the code, write your own stuff
Posted: Mon Mar 31, 2008 2:34 pm
We don't do homework here! If a person cannot spend a little effort on their own, then the heck with them. We can help with code problems however.
Posting code for a cheater is NOT acceptable on this or any other QB forum! DO NOT DO it again! You could be banned TMEE!
Besides, your code is probably EASY to spot by a teacher LOL.
Posted: Mon Mar 31, 2008 2:37 pm
OK, I'll not do it again !!! Is it mentioned in the forum rules too somewhere ? (I might have missed something)
Posted: Mon Mar 31, 2008 6:30 pm
Not sure here, but it is a well known tradition. I cannot say that the poster is looking to cheat, but if he does not post any code he has tried then he is just being lazy.
That and the fact his post is in all capital letters, SCREAMS for help without any participation from him/her.
Thanks for removing it!
Posted: Mon Mar 31, 2008 8:38 pm
Well, break it down into parts. Such as a sub for drawing boxes.
Burger is right. We're here to help, not do work somebody else should be doing. And regurgitating code doesn't help with the learnign process. If somebody wants to know correct syntax of PUT or help with debugging a sub, then it's okay.
Posted: Tue Apr 01, 2008 12:47 am
I'm totally new here, so I don't know everything, sorry.... anyway I plan to stay and if there's more thing to avoid tell me.
Posted: Tue Apr 01, 2008 1:11 am
TmEE wrote:OK, I'll not do it again !!! Is it mentioned in the forum rules too somewhere ? (I might have missed something)
The "no do homework" rule is universal. No forum anywhere will simply do your homework.
a) You do the best you can
b) You post what you did
c) We give hints and answer specific questions
You: Why does it stop when it gets to e=a=n?
Us: The answer is that you meant e=a-n which is a legal statement.
THE GAME DESIGN AGAIN.
Posted: Tue Apr 01, 2008 3:05 am
HELLO ONCE AGAIN,
PLEASE DONT GET ME WRONG, I AM NOT ASKING ANYBODY TO DO THW WHOLE WORK.
I AM USED TO SOME QBASIC PROGRAMMING LANGUAGE, I HAVE INFACT DRAWN THE BOXES, BUT I DON'T KNOW HOW TO MOVE THE BOXES HORIZONTALLY IN AN ANIMATION WAY.
AND THEN MOVE THE BULLETS VERTICALLY.
I KNOW MY LINE STATEMENTS, BUT I NEED TO KEEP THE BOXES MOVING HORIZONTALLY WHILE AIMING AT THEM WITH A SHOOTER BELOW.
THANKS FOR YOU MUCH ANTICIPATED EFFORT.
Posted: Tue Apr 01, 2008 6:06 am
Okay, think in coordinates. Now move the coordinates.
way to move a dot across the screen in QB
Code: Select all
'something to hold keyboard input
'move the dot 1 over, 1 down
'clear up behind it
'slow down the frame
loop while key$=""
Posted: Tue Apr 01, 2008 8:16 am
Just so you know, orgmatter, posting in all capitals is rude because all capitals in emails and forum posts means shouting. Just post in all lowercase if you don't feel like using the shift key anymore.
No doubt the Clip will fly off his handle when he sees your post...
Posted: Tue Apr 01, 2008 9:54 am
POST YOUR CODE if you want help!
blanked out by user
Posted: Wed Apr 02, 2008 12:28 am
blanked out by user
Posted: Wed Apr 02, 2008 12:41 am
gimmie a break.. take your knives and put them up... sheesh..
you have to make a timer,.. that is something you will need..
t!=timer:while timer-t!<1 : wend
timer thingy done
rem do space invader left right motion
a = a + c
rem check for edges of world by edges of thingy moving
if A > (320 - widthOFbox) then C= -C
if A < 0 then C = -C
rem keep your thingy on the screen for safety,especially when using PUT
if a > (320 - widthOFbox) then a = (320 - widthOFbox)
if a < 0 then a =0
As you can see, C will reverse when the thingy gets to the edges.
It will go back and forth like space invaders now.
Now, when Y of your missile is less than.. heightOFbox.. then check to see if it is within the space horizontally of the the target.
rem did user press space bar? if so move our little missile up
if inkey$=chr$(32) then d=-1
If Y < heightOFbox then
if (X => xOFbox) and (X <= (xOFbox+widthOFbox)) then
hit = TRUE
rem move new missile to bottom, reset motion flag for missile
y = 199
don't forget to say TRUE = -1 somewhere..
false = 0
true = NOT false
Ok.. simple boolean logic quiz..
z = (x = 1)
we put a math test equation inside parenthesis, the value of the whole set that is the parenthesis becomes either TRUE (-1) or FALSE (0).
-1 is TRUE because it is all the bits,.. 65536,.. but in double signed numbers, it becomes -32767 or something like that.. blah blah..
all you have to know is you can create a test for something by putting a variable is < or <= or = or => or > to a value or another variable by encasing it in ( ....) and then it will return either a 0 or a -1
now,.. you can use this by doing simple boolean logic.. (digital gates logic..)
AND ,.. OR.. XOR.. IMP.. (you can look these up in QBasic help or press F1 while your cursor is over a keyword..).. and do multiple tests in one go.
You can even use the result as math itself.
x = 4 - (y = 1)
if y was 1, then (y = 1) would equal -1, which would mean x = 5.
this is simple code.. but if you look at it,.. you can see how it is going to work..
The essentials are this.. A timer to make it stay on the screen long enough to be visible, and variables that check themselves and modify what your thingys are doing.
I haven't answered his question or done his homework and if anyone blocks or erases my post i will toss flaming sporks at you..
kudos and good luck
Posted: Wed Apr 02, 2008 12:56 am
??? are you talking about? Until code is submitted by the original poster, do your coloring book!
NEVER TOSS CODE around bucco!
Posted: Wed Apr 02, 2008 11:45 am
there is NO RULE that you cannot help someone do thier homework
so you can repost your code if you want TMEE....
the rule is that if someone wants help with thier homework they
need to post the code they have DONE so far if they want
help...we are not here to do peoples homework for them...thats
so if you haven't done any code...your just gonna get ignored
or flamed for the most part.... or in some cases depending
on the moderator the question just gets deleted....
Posted: Sun Apr 06, 2008 1:17 am
Flaming is a waste of time in my book, no matter what "crime against humanity" people have done..
I personally think flaming is degrading,.. and I agree.. the original coder should write their code, .. but to me it sounds like this coder is a n00b to QBasic completely,.. or at least seems that way..
I don't agree with posting an answer to a problem,.. all i did was post semantics about how to do this and that.. but it's kinda depressing when someone does the work for you..
** noms on a donut.. **