Skip to main content
gamedev.net
🔒 Locked

BlitzBasic...good for Newbies!

Started by Krylar Sep 26, 2000 at 1:42 PM 6 replies 2.1k views
Original Post
Krylar
Krylar
Hiya, I've been messing around with BlitzBasic and I think it rocks! It's really great for newbies, but it's certainly got potential for veterans doing some prototyping. It doesn't currently have a 3D component, but they're working on it. Anyways, if anyone's interested, I put up a tutorial on my site for the fundamentals of use on it. You can get to the tutorial of the front page of Christian Coders Network. I plan on putting up more tutorials on it soon. Anyone else use this product, and if so how do you like it? -Krylar Christian Coders Network Edited by - Krylar on 9/26/00 1:44:03 PM
c h i e f
c h i e f
hehe, Krylar's right alright mateys !!

Well have you ever seen blitzbasic in action ??

try this top quality motorcycle training quiz

my FIRST effort in BB at all! so considering it's a FIRST programme.... what do you think of it?

As I say, it's all about motorcycle training, so if you're 17, thinking about riding then try my quiz, you'll see if you're up to the theory test or not , at least

my second programme slightly better ..

an 'encyption utility', if you're interested, then more... much more below ::


First puzzle I’ve ever dreamt up, that stalled somebody for more than a day!
AMAZING!

Imagine an array… 2700 long…. by 10 pages wide

Split the 2700 into three, because we need to allow 900 characters per page

Remember Morduun said the file was probably “expanded to hell” ?? He was right

Where there should be 900 characters a page, there are 2700, but why?

ANSWER
:ENCRYPTION

the first set of 900 : random….all random …but this is crucial = LOGGED

the second set of 900 : real data for the page

the third set of 900 : another random set BUT LOGGED

TO DECODE
Subtract from middle group of 900, the value of the corresponding data member in the first group and subtract the value of the corresponding member of the last group from that :
Hence
.rbrick
b=te(xx+900,page)-(te(xx+1800,page)-te(xx,page))
DECODES the encrypted characters, character by character but ALL 3 sets of characters are needed to arrive at the REAL center group’s true value J
Without all 3 groups “co-operation,” the middle group can never be disclosed and trying to decode groups 1 or 3 is a hiding to nothing, because those groups contained random numbers from the start and there’s nothing there to flippin’ decode!!!!

FEEDBACK
So what do you think? Stupid, a joke – whacky, or deserved of a good bollicking from some moderator from www.3dcafe.com that I just GOT this morning via e-mail. A strict ticking off, that so far I have not had the gumption to formulate a reply to, maybe I should throw a complete flippin’ wobbler – announce that I’m definitely permanently leaving, open a thread headed “Chiefy’s total flippin’ wobbler” and then pull all the plugs out of my PC stuffing cheese through the A:\ drive rapidly simultaneously and noisily at the same time as and horizontally opposed to the moderator’s attitude, persona and general poxy character, what do you think??


NITTY GRITTY – CAUTION : have you got a cup of tea and 2 doughnuts ready? Apologies for lack of REMS and terrible “STOS” style coding

Graphics 640,480:Dim te(2704,9),ma$(9):ClsColor 221,221,221:Cls:Color 255,0,204:Rect 17,37,400,300:Color 255,153,255:Rect 29,49,360,260
Data "You can Type in up To ten pages of Text Then","save the ten pages (Or less) To a SECURED file"," ","The file is totally UNREADABLE To anyone","Else including MI5, paratroopers And SAS !!"," ","Press 0 now To Exit Or T To Type in Text","Press R to read a file","Snarkbait not you","or you Morduun !! :-)"
;after this data then w$(99,9) stuff for the side comments
Data "It was ","a right ","hot day "," at ","Sandown.","Plenty "," of ","Go Kart ","action ","alright.","Trouble ","
For i=0To 9:Read ma$(i):Next
SetBuffer FrontBuffer():Color 204,102,51:For i=0 To 9:Text 29,69+(i*19),ma$(i):FlushKeys:Next:Color 253,251,200:Text 9,3,"All file operations from here go to/from [A:\]":Goto texto

.reg
b=GetKey():If b=0 Then Goto reg
If iz>19 Or b=46 Then Color 153,255,204:Text 29,200,"Name accepted":Goto git
Text xmaze,ymaze,Chr$(b):xmaze=xmaze+29:iz=iz+1:name$=name$+Chr$(b):Goto reg


.texto
b=GetKey():If b=0 Then Goto texto
If b=114 Then b=OpenFile("A:\stext"):Goto readsfile
;If b=118 Then Cls:Text 1,1,"View file":SetFont smallfont:Goto viewfile
If b<>116 Then Goto git
b=OpenFile("A:\stext"):If b Then Color 255,255,255:Text 99,399,"F i l e e x i s t s":Color 1,1,1:Text 55,310,"Change floppy disk to one without an stext file on":Color 51,0,255:Text 22,340,"You are only allowed one stext file per floppy disc":CloseFile b:Gosub askq:Goto git

.textq
Cls:Color 255,255,255:Rect 19,19,500,400:xmaze=22:ymaze=22:Color 255,255,255:Text 19,3,name$+"...............Press / to EXIT secured text without saving":Text 22,430,"/ exits TEXT":Color 253,253,3:sage=page+1:Text 322,430,"PrintScreen SAVES all pages so far ("+sage+")":iz=0:Color 51,102,204:xz=0:xx=0
.textp
b=GetKey():If b=0Then Goto textp
Text xmaze,ymaze,Chr$(b):te(xx,page)=Rand(99)+30:te(xx+900,page)=b:te(xx+1800,page)=Rand(255):xx=xx+1:xz=xz+1:xmaze=xmaze+12:If (xmaze>450 And b=32) Or b=13 Then Color 255,255,153:Text 535,ymaze,xi:xi=xi+1:Color 85,85,85:Text 555,ymaze,xz:Color 255,51,204:xmaze=22:ymaze=ymaze+20:xz=0:If ymaze>410 Then ClsColor 136,136,136:Cls:Color 255,0,0:Text 33,4,name$+"........PAGE "+sage: Color 255,255,253:xmaze=22:ymaze=22:xz=0:xx=0:xi=0:Goto brick
If b=42 Then Color 68,68,68:Rect 99,99,400,300:Color 204,204,204:Rect 119,119,360,260:Color 204,51,0:Text 135,135,"Enter username >":lusername=0:xmaze=120:ymaze=150:Color 255,255,153:Text 121,101,"* USE all 9 characters *":Gosub askq:Goto usernam
If b=47 Or b=1 Then Goto git:Else Goto textp
.brick
b=te(xx+900,page):Text xmaze,ymaze,Chr$(b):xx=xx+1:xz=xz+1:xmaze=xmaze+12:If (xmaze>410 And b=32) Or b=13 Then Color 255,255,153:Text 535,ymaze,xi:Color 85,85,85:Text 555,ymaze,xz:xz=0:Color 5,5,4:xmaze=22:ymaze=ymaze+20:xz=0:xi=xi+1:If ymaze>410 Then page=page+1:VWait 99999:FlushKeys:WaitKey:xi=0:xx=0:Goto textq
Goto brick
.usernam
If passw$<>""Then Goto skippasswd
.username
b=GetKey():If b=0 Then Goto username
Color 0,0,0:Text xmaze,ymaze,Chr$(b):xmaze=xmaze+35:lusername=lusername+1:If lusername<9 Then Color 255,255,255:xi=xmaze-99:sage=9-lusername:Text 555,xi,sage:user$=user$+Chr$(b):Goto username
user$=user$+Chr$(b):Color 0,0,221:Text 130,270,"Enter password >":xmaze=120:ymaze=310:Color 255,255,153:Text 111,378,"Username accepted"
.password
b=GetKey():If b=0 Then Goto password
Color 225,0,0:Text xmaze,ymaze,Chr$(b):xmaze=xmaze+35:lusername=lusername+1:If lusername<18 Then sage=18-lusername:Color 255,255,255:xi=xmaze-99:Text 600,xi,sageassw$=passw$+Chr$(b):Goto password
passw$=passw$+Chr$(b)
.skippasswd
Color 225,51,255:Rect 8,8,300,199:Color 204,0,153:Rect 18,18,280,179:Color 255,255,51:Text 28,28,"Username confirmed as :":Text 28,98,"Password confirmed as :":VWait 9999:Color 255,255,255:Text 28,60,user$:Text 28,140,passw$:fido=OpenFile("A:\stext"):lido=WriteFile("A:\stext"):For i=0To 9:For b=0 To 900:te(b+900,i)=te(b+900,i)+(te(b+1800,i)-te(b,i)):Next:Next:For i=0 To 9:For b=0 To 2700:WriteInt (lido,te(b,i)):Next:Next:i=Asc(user$):b=Asc(passw$):WriteInt(lido,i):WriteInt(lido,b):sa$=Right$(user$,1):b=Asc(sa$):WriteInt(lido,b):sa$=Right$(passw$,1):b=Asc(sa$):WriteInt(lido,b):CloseFile lido:WaitKey:Text 99,99,"SAVED secure file"age=0:Goto git
.readsfile
If b=0 Then Color 1,1,1:Text 99,399,"* Secured file not found *":Goto git
Color 0,102,0:Rect 99,99,400,300:Color 0,255,2:Rect 119,119,360,260:Color 244,251,250:Text 135,135,"Enter username >":lusername=0:xmaze=120:ymaze=150:Color 5,255,3:Text 121,101,"* you must USE all 9 characters *":Gosub askq:If npassw$<>""Then Goto skipnpass

.rusername
b=GetKey():If b=0 Then Goto rusername
Color 0,2,2:Text xmaze,ymaze,Chr$(b):xmaze=xmaze+35:lusername=lusername+1:If lusername<9 Then Color 255,255,255:xi=xmaze-99:sage=9-lusername:Text 555,xi,sage:nuser$=nuser$+Chr$(b):Goto rusername
nuser$=nuser$+Chr$(b):Color 0,0,221:Text 130,270,"Enter password >":xmaze=120:ymaze=310:Color 255,255,153:Text 111,378,"Username being compared to encrypted data..."
.rpassword
b=GetKey():If b=0 Then Goto rpassword
Color 225,0,0:Text xmaze,ymaze,Chr$(b):xmaze=xmaze+35:lusername=lusername+1:If lusername<18 Then sage=18-lusername:Color 255,255,255:xi=xmaze-99:Text 600,xi,sage:npassw$=npassw$+Chr$(b):Goto rpassword
npassw$=npassw$+Chr$(b):Color 225,251,55:Rect 8,8,300,199:Color 154,102,53:Rect 18,18,280,179:Color 255,255,151:Text 28,28,"....checking username :":Text 28,98,"awaiting Password confirmation :":VWait 9999:Color 255,255,255:Text 28,60,nuser$:Text 28,140,npassw$

lido=ReadFile("A:\stext"):If lido =0 Then Color 1,1,1:Text 99,399, "File error in secured data":Goto git
For i= 0 To 9:For b=0 To 2700:te(b,i)=ReadInt (lido):Next:Next:firstletuser=ReadInt(lido):firstletpass=ReadInt(lido):lastletuser=ReadInt(lido):lastletpass=ReadInt(lido):CloseFile lido:WaitKey
.skipnpass
ClsColor 68,68,68:Cls:Color 238,238,238
;If Asc(nuser$)<>firstletuser Then Goto falsepars
;If Asc(npassw$)<>firstletpass Then Goto falsepars
;sa$=Right$(npassw$,1):If Asc(sa$)<>lastletpass Then Goto falsepars
;sa$=Right$(nuser$,1):If Asc(sa$)<>lastletuser Then Goto falsepars
page=0:xmaze=22:ymaze=22:xz=0:xx=0:xi=0

.rbrick
b=te(xx+900,page)-(te(xx+1800,page)-te(xx,page)):Text xmaze,ymaze,Chr$(b):xx=xx+1:xz=xz+1:xmaze=xmaze+12:If (xmaze>410 And b=32) Or b=13 Then Color 255,255,153:Text 535,ymaze,xi:Color 85,85,85:Text 555,ymaze,xz:xz=0:Color 5,5,4:xmaze=22:ymaze=ymaze+20:xz=0:xi=xi+1:If ymaze>410 Then page=page+1:VWait 99999:FlushKeys:WaitKey:xmaze=22:ymaze=22:xz=0:xx=0:xi=0:ClsColor 255,255,0:Cls

If b=42 Then WaitKey:Color 5,5,5:Rect 45,99,199,66:Color 0,204,0:Rect 55,110,179,46:Color 255,255,255:Text 60,120,"Secured file complete"age =0: Goto git
Goto rbrick


;Next:i=Asc(passw$):b=Asc(user$):WriteInt(lido,i):WriteInt(lido,b):sa$=Right$(passw$,1):b=Asc(sa$):WriteInt(lido,b):sa$=Right$(users$,1):b=Asc(sa$):WriteInt(lido,b):CloseFile lido:Gosub slimer:SetFont largefont:Text 99,99,"SAVED secure file":Goto git
.falsepars
Color 153,0,0:Rect 77,77,390,99:Color 238,0,0:Rect 99,99,310,59:Color 255,204,0:Text 111,111,"Your details do not match, sorry !":Goto git

.askq
Color 0,0,204:Rect 300,2,330,99:Color 102,153,255:Rect 320,20,290,59:Color 102,255,255:Text 330,30,"Have you changed floppy discs ?":Color 255,255,102:Text 340,50,"CONFIRM: correct disc ?":Return

.viewfile
lido=OpenFile("A:\stext"):If lido=0 Then Color 255,255,255:Text 99,399,"F i l e m i s s i n g":Color 1,1,1:Text 55,310,"Change floppy disk to one with a stext file on":Color 51,0,255:Text 22,340,"You can only view a file if there is a file to view you TWONK":CloseFile b:Gosub askq:Goto git



For i= 0 To 9:For b=0 To 2700:te(b,i)=ReadInt(lido):Next:Next:CloseFile lido
For i=0 To 21:For b=0 To 30:Color 0,0,0:Text b+(b*19),20+(20*i),te(b+(i*31),0):Color 255,0,4:Text b+(b*19),30+(20*i),b+(i*31):Next:Next:WaitKey:ClsColor 221,221,221
Cls:For i=0 To 21:For b=0 To 30:Color 50,50,50:Text b+(b*19),20+(20*i),te(682+b+(i*31),0):Color 255,0,5:Text b+(b*19),30+(20*i),682+b+(i*31):Next:Next:WaitKey:ClsColor 17,17,17
Cls:For i=0 To 21:For b=0 To 30:Color 250,102,50:Text b+(b*19),20+(20*i),te(1364+b+(i*31),0):Color 255,0,4:Text b+(b*19),30+(20*i),1364+b+(i*31):Next:Next:WaitKey:Goto git


.git
Text 99,99,"Prohibited area":WaitKey:End

Obviously this is not the finished program, I have since refined the system from 900 characters down to 700 per page, 900 was way too high and increased the pages to SMALL = 19 and LARGE = 99 so the program NOW allows 2 data types

SMALL 700 x 3 =2100 result dim te(2100,19)
20 pages

LARGE 700 x3 =2100 result dim te(2100,99)
100 pages

don’t tell me “where are the fields types and nulls” please

I wrote this before Krylar’s book came out !!!!

Take it easy you guys and if you e-mail me, I expect it in CB encryption right??


from your old mate
c h i e f y
global chiefy to yer old matey chiefys



[edited by - c h i e f on August 10, 2002 6:00:32 AM]
from your old matec h i e f yglobal chiefy to yer old matey chiefys
Pipo DeClown
Pipo DeClown
Strangest Post Of The Year Award goes tooooooo:
C H I E F ! Congratulations Chief, hope you win next year!

.lick
c h i e f
c h i e f
Why Pipo, cheers me old m8, good on ya

see a few smileys got tangled into the code back there, sheesh, hope it doesn''t cause an error 5009A in your backbus eh?

keep frontbuffering eh pal ??

from your old mate
c h i e f y
global chiefy to yer old matey chiefys
from your old matec h i e f yglobal chiefy to yer old matey chiefys
nakor
nakor
hmm what is the christian code network O_o
Krylar
Krylar
Chiefy! You''re everywhere! hehehe

Christian Coders Network is just that. It''s a network of Christian developers that get together to yap about everything from Christianity to programming. I know...odd mix But it''s fun.

Actually, though, my Blitz Basic site separated from Christian Coders about a year ago and is now stand-alone. I still run them both, but they are completely separate entities now. The Blitz site is called BlitzCoder, and it''s getting roughly 100,000 hits (non-unique) per month now and is really flying along great. Thanks to people like Chiefy, of course!

If interested, it''s at http://www.blitzcoder.com

See ya!

-Krylar

Blitz Basic Game Development Resources
lor3
lor3
WTF?

ok chief take deep breaths. It tired me out just reading your post.

Good to see blitz basic is around again, i remember it on amiga and it''s essential to have tools like this for newbies to get into. VB just isnt the same as a good old procedural language.

All we need now is AMOS!!!

for a min there i thought about coding it myself... *slap*

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.