WRITING A SIMPLE GAME PROGECT.
WRITING A SIMPLE GAME PROGECT.
Hello All,
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.
Thanks Sincerely.
orgmatter@gmail.com
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.
Thanks Sincerely.
orgmatter@gmail.com
orgmatter
removed the code, write your own stuff
Last edited by TmEE on Mon Mar 31, 2008 2:45 pm, edited 1 time in total.
Mida sa loed ? Nagunii aru ei saa
- burger2227
- Veteran
- Posts: 2466
- Joined: Mon Aug 21, 2006 12:40 am
- Location: Pittsburgh, PA
Bad boy!
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.
Ted
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.
Ted
Please acknowledge and thank members who answer your questions!
QB64 is a FREE QBasic compiler for WIN, MAC(OSX) and LINUX : https://www.qb64.org/forum/index.php
Get my Q-Basics demonstrator: https://www.dropbox.com/s/fdmgp91d6h8ps ... s.zip?dl=0
QB64 is a FREE QBasic compiler for WIN, MAC(OSX) and LINUX : https://www.qb64.org/forum/index.php
Get my Q-Basics demonstrator: https://www.dropbox.com/s/fdmgp91d6h8ps ... s.zip?dl=0
- burger2227
- Veteran
- Posts: 2466
- Joined: Mon Aug 21, 2006 12:40 am
- Location: Pittsburgh, PA
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!
Ted
That and the fact his post is in all capital letters, SCREAMS for help without any participation from him/her.
Thanks for removing it!
Ted
Please acknowledge and thank members who answer your questions!
QB64 is a FREE QBasic compiler for WIN, MAC(OSX) and LINUX : https://www.qb64.org/forum/index.php
Get my Q-Basics demonstrator: https://www.dropbox.com/s/fdmgp91d6h8ps ... s.zip?dl=0
QB64 is a FREE QBasic compiler for WIN, MAC(OSX) and LINUX : https://www.qb64.org/forum/index.php
Get my Q-Basics demonstrator: https://www.dropbox.com/s/fdmgp91d6h8ps ... s.zip?dl=0
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.
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.
For any grievances posted above, I blame whoever is in charge . . .
The "no do homework" rule is universal. No forum anywhere will simply do your homework.TmEE wrote:OK, I'll not do it again !!! Is it mentioned in the forum rules too somewhere ? (I might have missed something)
a) You do the best you can
b) You post what you did
c) We give hints and answer specific questions
Example
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.
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.
orgmatter@gmail.com
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.
orgmatter@gmail.com
orgmatter
Okay, think in coordinates. Now move the coordinates.
Here's a way to move a dot across the screen in QB
Here's a way to move a dot across the screen in QB
Code: Select all
screen 12
cls
'coordinates
dim x%
dim y%
'something to hold keyboard input
dim k$
do
'keyboard input
k$=inkey$
'move the dot 1 over, 1 down
x%=x%+1
y%=y%+1
'draw it
pset(x,y),15
'clear up behind it
pset(x-1, y-1),0
'slow down the frame
sleep 1
loop while key$=""
end
For any grievances posted above, I blame whoever is in charge . . .
- burger2227
- Veteran
- Posts: 2466
- Joined: Mon Aug 21, 2006 12:40 am
- Location: Pittsburgh, PA
POST YOUR CODE if you want help!
Ted
Ted
Please acknowledge and thank members who answer your questions!
QB64 is a FREE QBasic compiler for WIN, MAC(OSX) and LINUX : https://www.qb64.org/forum/index.php
Get my Q-Basics demonstrator: https://www.dropbox.com/s/fdmgp91d6h8ps ... s.zip?dl=0
QB64 is a FREE QBasic compiler for WIN, MAC(OSX) and LINUX : https://www.qb64.org/forum/index.php
Get my Q-Basics demonstrator: https://www.dropbox.com/s/fdmgp91d6h8ps ... s.zip?dl=0
- Kiyotewolf
- Veteran
- Posts: 96
- Joined: Tue Apr 01, 2008 11:38 pm
blanked out by user
blanked out by user
Last edited by Kiyotewolf on Wed Apr 02, 2008 12:42 am, edited 1 time in total.
Banana phone! We need more lemon pledge. * exploding fist of iced tea! * I see your psycho cat and counter with a duck that has a broken leg, in a cast.
- Kiyotewolf
- Veteran
- Posts: 96
- Joined: Tue Apr 01, 2008 11:38 pm
repost
gimmie a break.. take your knives and put them up... sheesh..
ok..
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
c=1
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
y=y-d
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
d=0
END IF
END IF
don't forget to say TRUE = -1 somewhere..
or..
false = 0
true = NOT false
Ok.. simple boolean logic quiz..
z = (x = 1)
wait.. what?
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
Kiyote Wolf
ok..
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
c=1
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
y=y-d
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
d=0
END IF
END IF
don't forget to say TRUE = -1 somewhere..
or..
false = 0
true = NOT false
Ok.. simple boolean logic quiz..
z = (x = 1)
wait.. what?
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
Kiyote Wolf
Banana phone! We need more lemon pledge. * exploding fist of iced tea! * I see your psycho cat and counter with a duck that has a broken leg, in a cast.
- burger2227
- Veteran
- Posts: 2466
- Joined: Mon Aug 21, 2006 12:40 am
- Location: Pittsburgh, PA
Awarewolf?
??? are you talking about? Until code is submitted by the original poster, do your coloring book!
NEVER TOSS CODE around bucco!
NEVER TOSS CODE around bucco!
Please acknowledge and thank members who answer your questions!
QB64 is a FREE QBasic compiler for WIN, MAC(OSX) and LINUX : https://www.qb64.org/forum/index.php
Get my Q-Basics demonstrator: https://www.dropbox.com/s/fdmgp91d6h8ps ... s.zip?dl=0
QB64 is a FREE QBasic compiler for WIN, MAC(OSX) and LINUX : https://www.qb64.org/forum/index.php
Get my Q-Basics demonstrator: https://www.dropbox.com/s/fdmgp91d6h8ps ... s.zip?dl=0
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
cheating...
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....
regards
moderator...
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
cheating...
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....
regards
moderator...
- Kiyotewolf
- Veteran
- Posts: 96
- Joined: Tue Apr 01, 2008 11:38 pm
flame on
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.. **
bai peeps..
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.. **
bai peeps..
Banana phone! We need more lemon pledge. * exploding fist of iced tea! * I see your psycho cat and counter with a duck that has a broken leg, in a cast.