Hello Guest, please login or register.
Did you miss your activation email?
Login with username, password and session length.

Pages: [1]   Go Down

Author Topic: [Completed] Guessing Game  (Read 3022 times)

0 Members and 1 Guest are viewing this topic.
[Completed] Guessing Game
« on: December 09, 2006, 08:17:19 pm »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 5213
... and it took me 5 minutes.
I have always wanted to know how to program games, I tried with Game Maker but that Program pisses me off, then I tried C++ but After 4 1/2 months of trying I still haven't grasped the basics.. yeah I'm stupid. Then yesterday My step mom and my dad got me a book named 'Game Programming for Teens' Written by Maneesh Sethi and it teaches you everything you need to know about Blitz Basic to mae a game, which is a Space Invaders style game, then it gives you dozens of links to websites where you can further your knowlege. Very good Book and if your looking at buying it... do.

All it is is coding, because I haven't registered Blitz Basic, and its only a guess the number game. I thought I'd post it here because its my first ever project I have finished;
Code: [Select]
;demo02-11.bb - Try to guess the number
Print "Welcome to the Guessing Game!"
AppTitle "Guessing Game!"
;Seed the random generator...don't worry, it willl be explained later
SeedRnd MilliSecs()

;Pick a number between 1 and 100
numbertoguess = Rand(1,100)

;The num of guesses the user has used
numofguesses = 0

;set the beginning of loop label
.loopbegin
;Find out the user's guess
guess = Input$("Guess a number ")

;If player guesses outside of range, tell him to guess again
If guess > 100 Or guess < 1
Print "Pick a number between 1 and 100"
;Go back to the beginning
Goto loopbegin

EndIf

;Add a guess to the guess counter
numofguesses = numofguesses + 1 

;If the guess is too low, go back to beginning
If guess < numbertoguess Then
Print "The number was too low."
Goto loopbegin
;If guess is too high, go back to the beginning
Else If guess > numbertoguess Then
Print "The number was too high."
Goto loopbegin
EndIf


Print "You guessed the number " + numbertoguess + " in " + numofguesses  + " tries!."
WaitKey

Screenshots:


You must compile it yourself for it too work.
And, I don't think it is, but if this is in the wrong section, please move it =).
« Last Edit: April 22, 2015, 01:14:12 am by 4Sword »
Logged
Re: My first ever actually completed project...
« Reply #1 on: December 10, 2006, 12:27:49 pm »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 2890
Perhaps you should upload BlitzBASIC, because to the furthest of my knowledge, it's a discontinued software which you can't find anymore. BlitzMAX and BlitzPLUS pwn it :).
Logged
Re: My first ever actually completed project...
« Reply #2 on: December 10, 2006, 12:31:45 pm »
  • *
  • Reputation: +3/-0
  • Offline Offline
  • Gender: Male
  • Posts: 6629
Perhaps you should upload BlitzBASIC, because to the furthest of my knowledge, it's a discontinued software which you can't find anymore. BlitzMAX and BlitzPLUS pwn it :).
Actually BlitzBasic is the collective name for the different variations of last generation languages (Blitz3D, Blitz+, Blitz2D, .etc). You're probably thinking of Blitz2D which is discontinued.
Logged
Re: My first ever actually completed project...
« Reply #3 on: December 10, 2006, 02:04:25 pm »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 5213
How much does it cost for BliztBasic?
Logged
Re: My first ever actually completed project...
« Reply #4 on: December 10, 2006, 03:24:08 pm »
  • *
  • Reputation: +3/-0
  • Offline Offline
  • Gender: Male
  • Posts: 6629
How much does it cost for BliztBasic?
>.> Did you read my post? BlitzBasic is a collective name. If you want to know what the individual languages cost go to http://www.blitzbasic.com
Logged
Re: My first ever actually completed project...
« Reply #5 on: December 10, 2006, 03:36:15 pm »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 5213
ah.. okay will do

Also Screenshot added.
Logged

gm112

Re: My first ever actually completed project...
« Reply #6 on: December 10, 2006, 06:04:37 pm »
Bert, get blitzmax. Not only is it up to date all the time but it's one of the best BASIC compilers that I've ever seen. Really worth the 80$ =P. While you're at it, get maxgui for blitzmax if you're going to get Max.
Logged
Pages: [1]   Go Up

 


Contact Us | Legal | Advertise Here
2013 © ZFGC, All Rights Reserved



Page created in 0.066 seconds with 49 queries.