На старом харде нашел древнюю мои разработку на Blitz3D - игру для двоих на одном компе.
Судя по дате в исходнике - 2003-2004 год.
;Made in Russia
;Autor Larionov Andre(Lar Group)
;Copyright 2003-2004.
Global title$="VertiTen ver 0.99"
AppTitle title$
;Include"Path.ini"
Const h=640
Const w=480
Global cfgvt$="vt.cfg"
Global inp$
Global score01,score02,shots0,pos_plat_x0,pos_plat_y0,pos_plat2_x0,pos_plat2_y0,pos_ball_x0,pos_ball_y0
Global pos_plat_x=25
Global pos_plat_y=0
Global pos_plat2_X=640 ;640
Global pos_plat2_y=0
Global pos_ball_x=h/2
Global pos_ball_y=0
Global pos_ball_x_mov=5,pos_ball_y_mov=5
contr_keyb=1
contr_joy=0
contr_mouse=0
Global tag#,tag_speed#=0.5
Global score1=0,score2=0,shots=0
Global cfgfile=ReadFile(cfgvt)
ReadString(cfgfile)
move_speed0=ReadInt(cfgfile)
Global move_speed=move_speed0
Function save_game(Namesave$)
savefile=WriteFile("save\"+namesave+".sav")
WriteString(savefile,title$)
WriteInt(savefile,score1)
WriteInt(savefile,score2)
WriteInt(savefile,shots)
WriteInt(savefile,pos_plat_y)
WriteInt(savefile,pos_plat2_y)
WriteInt(savefile,pos_ball_x)
WriteInt(savefile,pos_ball_y)
CloseFile(savefile)
End Function
Function fast_load_game(loadname$)
loadfile=ReadFile("Save\"+loadname+".sav")
title0$=ReadString(loadfile)
score01=ReadInt(loadfile)
score02=ReadInt(loadfile)
shots0=ReadInt(loadfile)
pos_plat_y0=ReadInt(loadfile)
pos_plat2_y0=ReadInt(loadfile)
pos_ball_x0=ReadInt(loadfile)
pos_ball_y0=ReadInt(loadfile)
score1=score01
score2=score02
shots=shots0
pos_plat_y=pos_plat_y0
pos_plat2_y=pos_plat2_y0
pos_ball_x=pos_ball_x0
pos_ball_y=pos_ball_y0
If title0=title
okl=1
Else
RuntimeError"Этот фаил поврежден или другой версии(игры)!"
End If
CloseFile(loadfile)
End Function
Graphics h,w,16,1
Goto def
.Menu
SetBuffer BackBuffer()
code("Data\m_back_t.vtg","BM")
code("data\m_name_t.vtg","BM")
code("data\m_arrow_t.vtg","BM")
code("data\m_b1.vtg","BM")
;Menu gfx
logo_back=LoadImage("data\m_back_t.vtg")
logo_name=LoadImage("data\m_name_t.vtg")
arrow=LoadImage("data\m_arrow_t.vtg")
butt=LoadImage("data\m_b1.vtg")
code("Data\m_back_t.vtg","VT")
code("data\m_name_t.vtg","VT")
code("data\m_arrow_t.vtg","VT")
code("data\m_b1.vtg","VT")
font=LoadFont("Arial",30)
c#=0
c_speed#=-0.5
While Not KeyDown(88)
Color 255,255,255
ClsColor c,c,c
c=c+c_speed
If c<200
c_speed=-c_speed
ElseIf c>=255
c_speed=-c_speed
End If
Select ma
Case 0 : mova=w/2-ImageWidth(butt)/2
Case 1 : mova=w/2-ImageWidth(butt)/2+100
Case 2 : mova=w/2-ImageWidth(butt)/2+200
Case 3 : mova=w/2-ImageWidth(butt)/2+300
End Select
TileImage logo_back,0,0
DrawImage logo_name,h/2-ImageHeight(logo_name)/2-100,30
DrawImage butt,h/2-ImageHeight(butt)/2-50,w/2-ImageWidth(butt)/2;game
DrawImage butt,h/2-ImageHeight(butt)/2-50,w/2-ImageWidth(butt)/2+100;loadgame
DrawImage butt,h/2-ImageHeight(butt)/2-50,w/2-ImageWidth(butt)/2+200;options
DrawImage butt,h/2-ImageHeight(butt)/2-50,w/2-ImageWidth(butt)/2+300;quit
If KeyHit(208) Then ma=ma+1
If KeyHit(200) Then ma=ma-1
If ma>3 Then ma=0
If ma<0 Then ma=3
If KeyHit(28)
If ma=1 Then Goto Loadgame
End If
If KeyDown(28)
If ma=0 Then Goto game
End If
If KeyDown(28)
If ma=3 Then End
End If
If KeyDown(28)
If ma=2 Then Goto options
End If
tag#=tag#+tag_speed#
If tag>15
tag_speed=-tag_speed
ElseIf tag<=0
tag_speed=-tag_speed
End If
DrawImage arrow,h/2-ImageHeight(butt)/2-50-50-15+tag,mova
SetFont font
Text h/2-ImageHeight(butt)/2-50+25,w/2-ImageWidth(butt)/2,"New Game"
Text h/2-ImageHeight(butt)/2-50+25,w/2-ImageWidth(butt)/2+100,"Load Game"
Text h/2-ImageHeight(butt)/2-50+45,w/2-ImageWidth(butt)/2+200,"Options"
Text h/2-ImageHeight(butt)/2-50+65,w/2-ImageWidth(butt)/2+300,"Quit"
Flip
Cls
Wend
End
.options
SetBuffer BackBuffer()
code("Data\m_back_t.vtg","BM")
code("data\m_name_t.vtg","BM")
code("data\m_arrow_t.vtg","BM")
code("data\m_b1.vtg","BM")
butt=LoadImage("data\m_b1.vtg")
arrow=LoadImage("data\m_arrow_t.vtg")
bk=LoadImage("data\m_back_t.vtg")
bkl=LoadImage("data\m_name_t.vtg")
code("Data\m_back_t.vtg","VT")
code("data\m_name_t.vtg","VT")
code("data\m_arrow_t.vtg","VT")
code("data\m_b1.vtg","VT")
mvo=0
While Not KeyDown(88)
Select mvo
Case 0 : my=w/2-ImageWidth(butt)/2+100
Case 1 : my=w/2-ImageWidth(butt)/2+300
End Select
If KeyHit(208) Then mvo=mvo-1
If KeyHit(200) Then mvo=mvo+1
If mvo>1 Then mvo=0
If mvo<0 Then mvo=1
If KeyDown(28)
If mvo=1 Then Gosub menu : End
End If
If KeyHit(28)
If mvo=0 Then move_speed=move_speed+1
End If
If move_speed>6 Then move_speed=4
If move_speed<4 Then move_speed=6
TileImage bk,0,0
DrawImage bkl,h/2-ImageHeight(bkl)/2-100,30
tag#=tag#+tag_speed#
If tag>15
tag_speed=-tag_speed
ElseIf tag<=0
tag_speed=-tag_speed
End If
DrawImage butt,h/2-ImageHeight(butt)/2-50,w/2-ImageWidth(butt)/2+100
DrawImage arrow,h/2-ImageHeight(butt)/2-50-50-15+tag,my
DrawImage butt,h/2-ImageHeight(butt)/2-50,w/2-ImageWidth(butt)/2+300 ;back m
Text h/2-ImageHeight(butt)/2-50+15,w/2-ImageWidth(butt)/2+100,"Move Speed "+move_speed
Text h/2-ImageHeight(butt)/2-50+65,w/2-ImageWidth(butt)/2+300,"Back"
Flip
Cls
Wend
End
.def
SetBuffer BackBuffer()
Text 0,0,"Loading..."
code("Data\small_logo_2.vtg","BM")
code("data\back3.vtg","BM")
code("data\panel_cent.vtg","BM")
im=LoadImage("data\small_logo_2.vtg")
back3=LoadImage("data\back3.vtg")
pan=LoadImage("Data\panel_cent.vtg")
code("Data\small_logo_2.vtg","VT")
code("data\back3.vtg","VT")
code("data\panel_cent.vtg","VT")
d=64*3
f=48*4
MaskImage im,255,0,0
ResizeImage im,ImageWidth(im)-8,ImageHeight(im)-8
While Not KeyDown(88)
If KeyDown(57) Or KeyDown(1) Or KeyDown(58) Then Goto menu : End
TileImage back3,0,0
DrawImage pan,640/2-ImageWidth(pan)/2,480/2-ImageHeight(pan)/2
DrawImage im,640/2-ImageWidth(pan)/2+4,480/2-ImageHeight(pan)/2+4
Flip
Cls
Wend
End
.Loadgame
SetBuffer BackBuffer()
code("Data\m_back_t.vtg","BM")
code("data\m_name_t.vtg","BM")
code("data\m_arrow_t.vtg","BM")
code("data\m_b1.vtg","BM")
logo_back=LoadImage("data\m_back_t.vtg")
logo_name=LoadImage("data\m_name_t.vtg")
arrow=LoadImage("data\m_arrow_t.vtg")
butt=LoadImage("data\m_b1.vtg")
code("Data\m_back_t.vtg","VT")
code("data\m_name_t.vtg","VT")
code("data\m_arrow_t.vtg","VT")
code("data\m_b1.vtg","VT")
font=LoadFont("Arial",25)
mvo0=0
While Not KeyDown(88)
Select mvo0
Case 0 : my=w/2-ImageWidth(butt)/2+100
Case 1 : my=w/2-ImageWidth(butt)/2+300
End Select
SetFont font
If KeyHit(208) Then mvo0=mvo0-1
If KeyHit(200) Then mvo0=mvo0+1
If mvo0>1 Then mvo0=0
If mvo0<0 Then mvo0=1
If KeyHit(28)
If mvo0=1 Then Gosub menu : End
End If
If KeyDown(28)
If mvo0=0 Then fast_load_game(ns$) : Gosub game : End
End If
TileImage Logo_back,0,0
DrawImage Logo_name,h/2-ImageHeight(logo_name)/2-100,30
tag#=tag#+tag_speed#
If tag>15
tag_speed=-tag_speed
ElseIf tag<=0
tag_speed=-tag_speed
End If
savedir$="C:\"
Mydir=ReadDir(savedir$)
nameofsave$=NextFile$(mydir)
NS$="Not Working!!!"
names$=ns$+".sav"
DrawImage butt,h/2-ImageHeight(butt)/2-50,w/2-ImageWidth(butt)/2+100
DrawImage arrow,h/2-ImageHeight(butt)/2-50-50-15+tag,my
DrawImage butt,h/2-ImageHeight(butt)/2-50,w/2-ImageWidth(butt)/2+300
Text h/2-ImageHeight(butt)/2-50+15,w/2-ImageWidth(butt)/2+100,Names
Text h/2-ImageHeight(butt)/2-50+65,w/2-ImageWidth(butt)/2+300,"Back"
If nameofsave$="" Then Text h/2-ImageHeight(butt)/2-50+65,w/2-ImageWidth(butt)/2+200,"Saves Not found."
Flip
Cls
Wend
End
.Game
SetBuffer BackBuffer()
;Configuration
code("Data\back1_t.vtg","BM")
code("data\ball2_t.vtg","BM")
code("data\plat_t.vtg","BM")
code("data\back2.vtg","BM")
code("Data\ball.vtg","BM")
code("data\ball3.vtg","BM")
;gfx
Global back=LoadImage("data\back1_t.vtg")
Global back2=LoadImage("data\back2.vtg")
Global ball0=LoadImage("data\ball.vtg")
Global ball=LoadImage("data\ball.vtg")
Global ball2=LoadImage("data\ball2_t.vtg")
Global ball3=LoadImage("data\ball3.vtg")
Global plat=LoadImage("data\plat_t.vtg")
Global plat2=plat
code("Data\back1_t.vtg","VT")
code("data\ball2_t.vtg","VT")
code("data\plat_t.vtg","VT")
code("data\back2.vtg","VT")
code("Data\ball.vtg","VT")
code("data\ball3.vtg","VT")
;fonts
font=LoadFont("Arial",30)
;setup
RotateImage plat,90
TFormFilter 0
;ints
;pos_Object_coordinate
;other
pos_mode=Rnd(1)
While Not KeyDown(88)
If KeyHit(1) Then Gosub menu : End
ClsColor a,b0,c
If KeyHit(55)
inp3$=Input$("Enter cheat :")
End If
If inp3$="speed" Then move_speed=175
If inp3$="nospeed" Then move_speed=4
If inp3$="light"
oncl=1
End If
If inp3$="nolight"
oncl=0
End If
If oncl=0
a=0
b0=0
c=0
End If
If oncl=1
a=Rnd(50,255)
b0=Rnd(50,255)
c=Rnd(50,255)
End If
TileImage back,0,0
Select gfx_balls
Case 0 : ball=ball2
Case 1 : ball=ball3
Case 2 : ball=ball0
End Select
Select pos_mode
Case 0 : pos_ball_x=pos_ball_X+pos_ball_x_mov : pos_ball_y=pos_ball_y+pos_ball_y_mov
Case 1 : pos_ball_x=pos_ball_X-pos_ball_x_mov : pos_ball_y=pos_ball_y-pos_ball_y_mov
End Select
b=Rnd(150,255)
Color 0,0,b
SetFont font
Text 30,0,score1
Text 592,0,score2
Text h/2,440,shots
If KeyHit(59) Then newgame()
If KeyHit(60)
inp$=Input$("Name of save? :")
save_game(inp$)
End If
If KeyHit(61)
inp2$=Input$("Name of load? :")
fast_load_game(inp2$)
score1=score01
score2=score02
shots=shots0
pos_plat_y=pos_plat_y0
pos_plat2_y=pos_plat2_y0
pos_ball_x=pos_ball_x0
pos_ball_y=pos_ball_y0
End If
If contr_keyb=1 Then keyb2()
collide_ball()
collide_plat()
add_effect()
DrawImage ball3,h/2-ImageHeight(ball)/2,w/2-ImageWidth(ball)/2
DrawImage plat,pos_plat_x,pos_plat_y
DrawImage plat2,pos_plat2_x,pos_plat2_y
DrawImage ball,pos_ball_x,pos_ball_y
Flip
Cls
Wend
End
Function NewGame()
pos_plat_x=25
pos_plat_y=0
pos_plat2_X=640 ;640
pos_plat2_y=0
pos_ball_x=h/2
pos_ball_y=0
pos_ball_x_mov=5
pos_ball_y_mov=5
score1=0
score2=0
shots=0
End Function
Function keyb2()
;P1
If KeyDown(30) Then pos_plat_y=pos_plat_y-move_speed
If KeyDown(44) Then pos_plat_y=pos_plat_y+move_speed
;P2
If KeyDown(200) Then pos_plat2_y=pos_plat2_y-move_speed
If KeyDown(208) Then pos_plat2_y=pos_plat2_y+move_speed
End Function
Function collide_plat()
If pos_plat_y<0 Then pos_plat_y=0
If pos_plat_y>355 Then pos_plat_y=355
If pos_plat2_y<0 Then pos_plat2_y=0
If pos_plat2_y>355 Then pos_plat2_y=355
End Function
Function collide_ball()
If pos_ball_y=<0 Then pos_ball_y_mov=Rnd(0,8)*-1
If pos_ball_y=>365 Then pos_ball_y_mov=Rnd(0,8)
If ImagesOverlap(ball,pos_ball_X,pos_ball_y,plat,pos_plat_x,pos_plat_y) Then pos_ball_x_mov=Rnd(0,8)*-1 :gfx_balls=Rnd(0,2):shots=shots+1 :pos_ball_y_mov=Rnd(0,8)
If ImagesOverlap(ball,pos_ball_X,pos_ball_y,plat2,pos_plat2_x,pos_plat2_y) Then pos_ball_x_mov=Rnd(0,8) :gfx_balls=Rnd(0,2):shots=shots+1 : pos_ball_y_mov=Rnd(0,8)
If pos_ball_x=<0 Then pos_ball_x=h/2 : pos_ball_y=0 : score2=score2+1
If pos_ball_x=>640 Then pos_ball_x=h/2 : pos_ball_y=0 : score1=score1+1
End Function
Function add_effect()
;right
Line pos_plat_x,pos_plat_y,pos_plat_x,pos_plat_y+ImageWidth(plat)*4+20
;right2
Line pos_plat2_x-ImageWidth(plat2)-1,pos_plat2_y,pos_plat2_x-ImageWidth(plat2)-1,pos_plat2_y+ImageWidth(plat2)*4+20
End Function
Function code(Namef$,Cod$)
f=OpenFile(namef$)
WriteLine(f,cod$)
CloseFile(f)
End Function
PS. На современно железе будет работать как угорелая.