Computer languages

Started by
20 comments, last by The_C_Guy 23 years, 10 months ago
Sure nes8bit.... here''s a simple 3D pong that one of the guys using it did...

Controls:
Player 1: S = up X= down
Player 2: Up- & Downkey

Ok, here we go:

sync onhide mousefor z=1 to 4read a,b,c,d,e,f,g,h,imake object cube z,5scale object z,a,b,cposition object z,d,e,fcolor object z,rgb(g,h,i)next adata 40,250,100,0,0,0,255,0,0,40,250,100,100,0,0,255,0,0data 6000,50,100,0,-35,0,255,255,0,6000,50,100,0,35,0,255,255,0make object sphere 10,5position camera 50,0,-70color backdrop 0xvel#=.8yvel#=.6doposition object 10,50,rnd(40)-20,0player1=0player2=0repeatif scancode()=31 and object position y(1)<28 then position object 1,0,object position y(1)+1,0if scancode()=45 and object position y(1)>-28 then position object 1,0,object position y(1)-1,0if upkey()=1 and object position y(2)<28 then position object 2,100,object position y(2)+1,0if downkey()=1 and object position y(2)>-28 then position object 2,100,object position y(2)-1,0position object 10,object position x(10)+xvel#,object position y(10)+yvel#,0point camera object position x(10),object position y(10),object position z(10)testcol=object collision(10,0)if testcol>0if testcol<3 then xvel#=xvel#*-1 else yvel#=yvel#*-1endifif object position x(10)<-5 inc player1position object 10,50,0,0endifif object position x(10)>105 inc player2position object 10,50,0,0endifcenter text 320,0,"Player1 : "+str$(player1)+" Player2 : "+str$(player2)syncuntil player1=3 or player2=3repeatif player1>player2 then center text 320,240,"The winner is Player 2 - PRESS SPACE!" else center text 320,240,"The winner is Player 1 - PRESS SPACE!"syncuntil spacekey()=1loop 


This version of BASIC isn''t actually basic... it''s an interpreted language... i think written in C++ using DirectX and uses the BASIC syntax... it''s still in development (only 6 months old) and is being worked on quite a bit.

40

www.databyss.com
www.omlettesoft.com

"Don''t meddle in the affairs of wizards, for they are subtle and quick to anger."
-40
Advertisement
C++ with C++Builder
I don''t like write 100 lines of code to make a window.

This topic is closed to new replies.

Advertisement