|
3D-программирование Вопросы, касающиеся программирования 3D мира |
17.12.2011, 00:40
|
#31
|
Бывалый
Регистрация: 17.12.2011
Сообщений: 862
Написано 443 полезных сообщений (для 1,133 пользователей)
|
Ответ: Все для Blitz 3D. Сборники файлов, примеров, ресурсов и т.д.
Вот у меня тоже исходник есть
"Graphics3D 640,480,16,2 Const OME_AUTOHIDE=1 ;GraphicsMode() SetBuffer BackBuffer() Const UPS=60 ;свет ;light=CreateLight() ;GraphicsMode() ;камера cam=CreateCamera() wheeldy1#=1 ; PositionEntity cam,0,8,-wheeldy1 EntityType cam,Tcubik ;ScaleEntity cam,11,100,11 Const Tcubik=1,Tplane=2,enti=3 SeedRnd MilliSecs() Global FlyMode3=0 Global Jum=0 Global Gravity3# = 0.1 Global PlayerG# = 0.1 Global upr3#=0.0 Type Dude Field entity,speed# End Type Type Egro Field efecti End Type speed#=0 ;sp#=0 se#=0 ;ZVEZDA=LoadSprite("bioscansmoke.tga",1 ) ZVEZDA=LoadTexture("bioscansmoke.tga ",3);bioscansmoke.tga bot8=LoadMesh( "ZVEZDA.b3d" ) EntityShininess bot8,5 hdle=LoadMesh( "ZVEZDA.b3d" ) EntityShininess hdle,5 EntityFX bot8,-9*99 OpenMeshExt("ZVEZDA.b3d",xx#=+10,yy#=+10,zz#=+10,pp#=+10,ya#=+5,rr#=+10,parent=+20,flags=+10) PositionEntity bot8,15,10,0 EntityType bot8,Tcubik EntityTexture bot8,ZVEZDA ;создаём плоскость plane=CreatePlane() RotateEntity plane,0,0,0 EntityType plane,Tplane EntityFX plane,9*8 plane2=CreatePlane() PositionEntity plane2,0,-2,0 ;текстурим texture=LoadTexture("ccc.jpg") ScaleTexture texture,1,1 EntityTexture plane,texture Collisions Tcubik,Tplane,2,2 Collisions Tcubik,Tcubik,2,2 Collisions enti,Tplane,2,2 sph=LoadSprite("red3.png",1 ) spg=LoadSprite("red3.png",1) spf=LoadSprite("red3.png",1) EntityFX sph,16 EntityFX spg,16 EntityFX spf,16 PositionEntity sph,0,10,0 PositionEntity spg,0,10,0 PositionEntity spf,0,10,0 ScaleSprite sph,5,5 ScaleSprite spg,4,4 ScaleSprite spf,3,3 sph1=LoadSprite("red4.png",1 );red4.png spg1=LoadSprite("red4.png",1 );red4.png spf1=LoadSprite("red4.png",1 );red4.png PositionEntity sph1,0,10,0 PositionEntity spg1,0,10,0 PositionEntity spf1,0,10,0 ScaleSprite sph1,4,4 ScaleSprite spg1,3,3 ScaleSprite spf1,2,2 cub=CreateCube() ScaleEntity cub,5,5,5 PositionEntity cub,-20,10,0 EntityType cub,Tcubik EntityFX cub,1 cub1=CreateCylinder (6) ScaleEntity cub1,.5,.5,.5 ;Include"levelmesh2.ini" PositionEntity cub1,-50,wheeldy#,0 ;EntityAlpha base\mesh,.4 ;cub3=CreateCube() ;ScaleEntity cub3,5,5,5 ;PositionEntity cub3,35,10,0 ;Text31=LoadTexture("2\UTAarch01b.bmp",4) ;EntityTexture cub3,Text31 Text1=LoadTexture("ccc.jpg") ClearTextureFilters EntityTexture cub,Text1 Fire=LoadSprite("ccc.jpg",1) PositionEntity Fire,30,10,0;30 ScaleSprite Fire,5,5 SpriteViewMode Fire,3 Svet=LoadSprite("2.bmp",1) PositionEntity Svet,50,47,0;30 ScaleSprite Svet,6,6 SpriteViewMode Svet,3 mesh=LoadMesh( "ZVEZDA2.b3d" ) PositionEntity mesh,50,1,0 ScaleEntity mesh,.5,.5,.5 Repeat period=1000/UPS time=MilliSecs()-period Repeat If KeyDown(6) If wheeldy# <99 wheeldy#=wheeldy# +1 PositionEntity cub1,-50,wheeldy#,0 EndIf Else If KeyDown(7) If wheeldy#>1 wheeldy#=wheeldy#-1 Include"levelmesh2.ini" PositionEntity cub1,-50,wheeldy#,0 EndIf Else wheeldy#=wheeldy# End If ini = WriteFile("levelmesh2.ini") WriteLine ini,";levelmesh2 " WriteLine ini,"wheeldy#="+wheeldy#+";x" WriteLine ini,"wheeldy1#="+wheeldy1#+";y" WriteLine ini,"wheeldy2#="+wheeldy2#+";z" CloseFile(ini) elapsed=MilliSecs()-time Until elapsed ticks=elapsed/period tween#=Float(elapsed Mod period)/Float(period) For k=1 To ticks time=time+period If KeyHit(1) End UpdateWorld Next ;ReadFileAsString$=(txt) For i=1 To G ist=LoadTexture("2\untitled"+i+".tga") EntityTexture Fanar,ist,0,3;Svet Next ;speed#=speed#+.1*2 ;G=Rnd(speed#,speed#) ;If speed#>10 Then speed#=1 ;в цикл или после Repeat или While Not KeyDown(1) ;это для тех кто незнает что токое цикл ;внемание имена файлов QWU001 и т.д ;пишем QWU00 For t=1 To Y ist2=LoadTexture("2\QWU00"+t+".bmp",6) EntityTexture Fire,ist2 ;накладываем текстуру на >Fire< Next sp#=sp#+.1*2;это скорасть кадтов анимации 1*#на чесло которое вас устроит Y=Rnd(sp#,sp#) If sp#>57 Then sp#=0;If sp#>57 сколько кадров грузим ;sp#=0 каким кадром заканчиваем и наченаем ;заново проигрывать до кадра которым заканчиваем ;тоесть пример огонь начало If sp#>57 до sp#=30 ;в этом случие агонь наченает разгораться ;и горит всё время в цикле от If sp#>57 до sp#=30 PointEntity spg,sph PointEntity spf,sph MoveEntity spg,0,0,(EntityDistance (spg,sph)-2)*1.04 MoveEntity spf,0,0,(EntityDistance (spf,spg)-3)*1.04 MoveEntity sph,0,0,-1 TurnEntity sph,0,-2,0 ;a#=a#+2 Mod 360 ;PositionEntity sph,Cos(a#)-15,Sin(a#)*50,0,-1 ;PointEntity cub,spg ;MoveEntity cub,0,0,(EntityDistance (cub,spg)-3)*1.04 PointEntity spg1,sph1 PointEntity spf1,sph1 MoveEntity spg1,0,0,(EntityDistance (spg1,sph1)-2)*1.04 MoveEntity spf1,0,0,(EntityDistance (spf1,spg1)-3)*1.04 MoveEntity sph1,0,0,1 TurnEntity sph1,0,2,0 TurnEntity cub,0,0,0 ;For i=1 To Ct ;dfaa=LoadTexture("efect\QWU00"+i+".png",3) ;EntityTexture x\efecti,dfaa ;Next ;s1e#=s1e#+.1*3 ;Ct=Rnd(s1e#,s1e#) ;If s1e#>54 Then s1e#=20 pick=CameraPick(cam,MouseX(),MouseY()) For x.Egro=Each Egro ;If EntityDistance(cam,x\efecti)>50 If PickedEntity()=x\efecti FreeEntity x\efecti Delete x EndIf Next If MouseHit(1) For Eg=1 To 1 efect1=CreateCube();LoadSprite("efect\QWU001.png",1 ) x.Egro=New Egro x\efecti=CopyEntity(efect1) PositionEntity x\efecti,EntityX#(cam,1),EntityY#(cam)-0.3,EntityZ#(cam,1) ResetEntity x\efecti EntityPickMode x\efecti, 2 Next FreeEntity efect1 End If ;--------------------------------------------- For d.Dude=Each Dude MoveEntity d\entity,0,+1,0 If EntityDistance(bot8,d\entity)>5;200 FreeEntity d\entity Delete d EndIf Next If bull<MilliSecs() bul=bul*1 If bul=25 bul=0 bull=MilliSecs()+1 EndIf For k=1 To 1 sphere=LoadSprite("efect\QWU001.png",1 ) ScaleSprite sphere,2,2;2,4 EntityBlend sphere,1 EntityColor sphere,40,0,1 If bul=0 d.Dude=New Dude d\entity=CopyEntity(sphere) PositionEntity d\entity,EntityX#(bot8,1),EntityY#(bot8)-0.3,EntityZ#(bot8,1) TurnEntity d\entity ,Rnd(-20,20),Rnd(-20,20),Rnd(-20,20); ResetEntity d\entity EntityType d\entity,Tcubik Collisions Tcubik,Tplane,2,2 EndIf Next FreeEntity sphere For i=1 To CC icc=LoadTexture("efect\QWU00"+i+".png",3) EntityTexture d\entity,icc;,0,2 Next se#=se#+.1*3 CC=Rnd(se#,se#) If se#>54 Then se#=20 ;-------------------------------------------------------------------------------------- If KeyHit( 18 ) PlayerG# =0.5 Jum =0 EndIf If FlyMode3=0 If EntityCollided( cam,Tplane ) PlayerG# =0.0 Jum =0 Else PlayerG# = PlayerG# - Gravity3# EndIf EndIf ;TranslateEntity cam, 0, PlayerG#, 0 MoveEntity cam,(KeyDown(205)-KeyDown(203))*spd,0,(KeyDown(200)-KeyDown(208))*spd TurnEntity cam,-MouseYSpeed()*0.25,-MouseXSpeed()*0.25,0 RotateEntity cam,EntityPitch(cam,True),EntityYaw(cam,True),0 MoveMouse 320,240 If KeyDown(30) MoveEntity cam ,0,0,+.3 End If If KeyDown(31) MoveEntity cam,0,0,-.3 End If RenderWorld(tween) Flip Until KeyHit(1) End Function OpenMeshExt(filename$,xx#=0,yy#=0,zz#=0,pp#=0,ya#=0,rr#=0,parent=0,flags=0) hdle=LoadMesh(filename$,parent) PositionEntity hdle,xx#,yy#,zz# RotateEntity hdle,pp#,ya#,rr# Select flags Case OME_AUTOHIDE HideEntity hdle End Select Return hdle End Function"]Graphics3D 640,480,16,2 Const OME_AUTOHIDE=1 ;GraphicsMode() SetBuffer BackBuffer() Const UPS=60 ;свет ;light=CreateLight() ;GraphicsMode() ;камера cam=CreateCamera() wheeldy1#=1 ; PositionEntity cam,0,8,-wheeldy1 EntityType cam,Tcubik ;ScaleEntity cam,11,100,11 Const Tcubik=1,Tplane=2,enti=3 SeedRnd MilliSecs() Global FlyMode3=0 Global Jum=0 Global Gravity3# = 0.1 Global PlayerG# = 0.1 Global upr3#=0.0 Type Dude Field entity,speed# End Type Type Egro Field efecti End Type speed#=0 ;sp#=0 se#=0 ;ZVEZDA=LoadSprite("bioscansmoke.tga",1 ) ZVEZDA=LoadTexture("bioscansmoke.tga ",3);bioscansmoke.tga bot8=LoadMesh( "ZVEZDA.b3d" ) EntityShininess bot8,5 hdle=LoadMesh( "ZVEZDA.b3d" ) EntityShininess hdle,5 EntityFX bot8,-9*99 OpenMeshExt("ZVEZDA.b3d",xx#=+10,yy#=+10,zz#=+10,pp#=+10,ya#=+5,rr#=+10,parent=+20,flags=+10) PositionEntity bot8,15,10,0 EntityType bot8,Tcubik EntityTexture bot8,ZVEZDA ;создаём плоскость plane=CreatePlane() RotateEntity plane,0,0,0 EntityType plane,Tplane EntityFX plane,9*8 plane2=CreatePlane() PositionEntity plane2,0,-2,0 ;текстурим texture=LoadTexture("ccc.jpg") ScaleTexture texture,1,1 EntityTexture plane,texture Collisions Tcubik,Tplane,2,2 Collisions Tcubik,Tcubik,2,2 Collisions enti,Tplane,2,2 sph=LoadSprite("red3.png",1 ) spg=LoadSprite("red3.png",1) spf=LoadSprite("red3.png",1) EntityFX sph,16 EntityFX spg,16 EntityFX spf,16 PositionEntity sph,0,10,0 PositionEntity spg,0,10,0 PositionEntity spf,0,10,0 ScaleSprite sph,5,5 ScaleSprite spg,4,4 ScaleSprite spf,3,3 sph1=LoadSprite("red4.png",1 );red4.png spg1=LoadSprite("red4.png",1 );red4.png spf1=LoadSprite("red4.png",1 );red4.png PositionEntity sph1,0,10,0 PositionEntity spg1,0,10,0 PositionEntity spf1,0,10,0 ScaleSprite sph1,4,4 ScaleSprite spg1,3,3 ScaleSprite spf1,2,2 cub=CreateCube() ScaleEntity cub,5,5,5 PositionEntity cub,-20,10,0 EntityType cub,Tcubik EntityFX cub,1 cub1=CreateCylinder (6) ScaleEntity cub1,.5,.5,.5 ;Include"levelmesh2.ini" PositionEntity cub1,-50,wheeldy#,0 ;EntityAlpha base\mesh,.4 ;cub3=CreateCube() ;ScaleEntity cub3,5,5,5 ;PositionEntity cub3,35,10,0 ;Text31=LoadTexture("2\UTAarch01b.bmp",4) ;EntityTexture cub3,Text31 Text1=LoadTexture("ccc.jpg") ClearTextureFilters EntityTexture cub,Text1 Fire=LoadSprite("ccc.jpg",1) PositionEntity Fire,30,10,0;30 ScaleSprite Fire,5,5 SpriteViewMode Fire,3 Svet=LoadSprite("2.bmp",1) PositionEntity Svet,50,47,0;30 ScaleSprite Svet,6,6 SpriteViewMode Svet,3 mesh=LoadMesh( "ZVEZDA2.b3d" ) PositionEntity mesh,50,1,0 ScaleEntity mesh,.5,.5,.5 Repeat period=1000/UPS time=MilliSecs()-period Repeat If KeyDown(6) If wheeldy# <99 wheeldy#=wheeldy# +1 PositionEntity cub1,-50,wheeldy#,0 EndIf Else If KeyDown(7) If wheeldy#>1 wheeldy#=wheeldy#-1 Include"levelmesh2.ini" PositionEntity cub1,-50,wheeldy#,0 EndIf Else wheeldy#=wheeldy# End If ini = WriteFile("levelmesh2.ini") WriteLine ini,";levelmesh2 " WriteLine ini,"wheeldy#="+wheeldy#+";x" WriteLine ini,"wheeldy1#="+wheeldy1#+";y" WriteLine ini,"wheeldy2#="+wheeldy2#+";z" CloseFile(ini) elapsed=MilliSecs()-time Until elapsed ticks=elapsed/period tween#=Float(elapsed Mod period)/Float(period) For k=1 To ticks time=time+period If KeyHit(1) End UpdateWorld Next ;ReadFileAsString$=(txt) For i=1 To G ist=LoadTexture("2\untitled"+i+".tga") EntityTexture Fanar,ist,0,3;Svet Next ;speed#=speed#+.1*2 ;G=Rnd(speed#,speed#) ;If speed#>10 Then speed#=1 ;в цикл или после Repeat или While Not KeyDown(1) ;это для тех кто незнает что токое цикл ;внемание имена файлов QWU001 и т.д ;пишем QWU00 For t=1 To Y ist2=LoadTexture("2\QWU00"+t+".bmp",6) EntityTexture Fire,ist2 ;накладываем текстуру на >Fire< Next sp#=sp#+.1*2;это скорасть кадтов анимации 1*#на чесло которое вас устроит Y=Rnd(sp#,sp#) If sp#>57 Then sp#=0;If sp#>57 сколько кадров грузим ;sp#=0 каким кадром заканчиваем и наченаем ;заново проигрывать до кадра которым заканчиваем ;тоесть пример огонь начало If sp#>57 до sp#=30 ;в этом случие агонь наченает разгораться ;и горит всё время в цикле от If sp#>57 до sp#=30 PointEntity spg,sph PointEntity spf,sph MoveEntity spg,0,0,(EntityDistance (spg,sph)-2)*1.04 MoveEntity spf,0,0,(EntityDistance (spf,spg)-3)*1.04 MoveEntity sph,0,0,-1 TurnEntity sph,0,-2,0 ;a#=a#+2 Mod 360 ;PositionEntity sph,Cos(a#)-15,Sin(a#)*50,0,-1 ;PointEntity cub,spg ;MoveEntity cub,0,0,(EntityDistance (cub,spg)-3)*1.04 PointEntity spg1,sph1 PointEntity spf1,sph1 MoveEntity spg1,0,0,(EntityDistance (spg1,sph1)-2)*1.04 MoveEntity spf1,0,0,(EntityDistance (spf1,spg1)-3)*1.04 MoveEntity sph1,0,0,1 TurnEntity sph1,0,2,0 TurnEntity cub,0,0,0 ;For i=1 To Ct ;dfaa=LoadTexture("efect\QWU00"+i+".png",3) ;EntityTexture x\efecti,dfaa ;Next ;s1e#=s1e#+.1*3 ;Ct=Rnd(s1e#,s1e#) ;If s1e#>54 Then s1e#=20 pick=CameraPick(cam,MouseX(),MouseY()) For x.Egro=Each Egro ;If EntityDistance(cam,x\efecti)>50 If PickedEntity()=x\efecti FreeEntity x\efecti Delete x EndIf Next If MouseHit(1) For Eg=1 To 1 efect1=CreateCube();LoadSprite("efect\QWU001.png",1 ) x.Egro=New Egro x\efecti=CopyEntity(efect1) PositionEntity x\efecti,EntityX#(cam,1),EntityY#(cam)-0.3,EntityZ#(cam,1) ResetEntity x\efecti EntityPickMode x\efecti, 2 Next FreeEntity efect1 End If ;--------------------------------------------- For d.Dude=Each Dude MoveEntity d\entity,0,+1,0 If EntityDistance(bot8,d\entity)>5;200 FreeEntity d\entity Delete d EndIf Next If bull<MilliSecs() bul=bul*1 If bul=25 bul=0 bull=MilliSecs()+1 EndIf For k=1 To 1 sphere=LoadSprite("efect\QWU001.png",1 ) ScaleSprite sphere,2,2;2,4 EntityBlend sphere,1 EntityColor sphere,40,0,1 If bul=0 d.Dude=New Dude d\entity=CopyEntity(sphere) PositionEntity d\entity,EntityX#(bot8,1),EntityY#(bot8)-0.3,EntityZ#(bot8,1) TurnEntity d\entity ,Rnd(-20,20),Rnd(-20,20),Rnd(-20,20); ResetEntity d\entity EntityType d\entity,Tcubik Collisions Tcubik,Tplane,2,2 EndIf Next FreeEntity sphere For i=1 To CC icc=LoadTexture("efect\QWU00"+i+".png",3) EntityTexture d\entity,icc;,0,2 Next se#=se#+.1*3 CC=Rnd(se#,se#) If se#>54 Then se#=20 ;-------------------------------------------------------------------------------------- If KeyHit( 18 ) PlayerG# =0.5 Jum =0 EndIf If FlyMode3=0 If EntityCollided( cam,Tplane ) PlayerG# =0.0 Jum =0 Else PlayerG# = PlayerG# - Gravity3# EndIf EndIf ;TranslateEntity cam, 0, PlayerG#, 0 MoveEntity cam,(KeyDown(205)-KeyDown(203))*spd,0,(KeyDown(200)-KeyDown(208))*spd TurnEntity cam,-MouseYSpeed()*0.25,-MouseXSpeed()*0.25,0 RotateEntity cam,EntityPitch(cam,True),EntityYaw(cam,True),0 MoveMouse 320,240 If KeyDown(30) MoveEntity cam ,0,0,+.3 End If If KeyDown(31) MoveEntity cam,0,0,-.3 End If RenderWorld(tween) Flip Until KeyHit(1) End Function OpenMeshExt(filename$,xx#=0,yy#=0,zz#=0,pp#=0,ya#=0,rr#=0,parent=0,flags=0) hdle=LoadMesh(filename$,parent) PositionEntity hdle,xx#,yy#,zz# RotateEntity hdle,pp#,ya#,rr# Select flags Case OME_AUTOHIDE HideEntity hdle End Select Return hdle End Function
|
(Offline)
|
|
17.12.2011, 00:41
|
#32
|
Бывалый
Регистрация: 17.12.2011
Сообщений: 862
Написано 443 полезных сообщений (для 1,133 пользователей)
|
Ответ: Все для Blitz 3D. Сборники файлов, примеров, ресурсов и т.д.
А как вы так делаете что сообщение на другой странице открывается?
|
(Offline)
|
|
13.02.2012, 15:47
|
#33
|
AnyKey`щик
Регистрация: 13.02.2012
Сообщений: 1
Написано 0 полезных сообщений (для 0 пользователей)
|
Ответ: Все для Blitz 3D. Сборники файлов, примеров, ресурсов и т.д.
LLI.T.A.L.K.E.R., прошу перезалить данную сборку на любой удобный вам ресурс .Заранее большое спасибо.
|
(Offline)
|
|
20.12.2012, 10:10
|
#34
|
Оператор ЭВМ
Регистрация: 17.12.2012
Адрес: Минск
Сообщений: 25
Написано 3 полезных сообщений (для 4 пользователей)
|
Ответ: Все для Blitz 3D. Сборники файлов, примеров, ресурсов и т.д.
Сси +_+ конечно круче, не на бэйсике винду писали, а каждая новая винда в 5 раз тяжелее, это её главный бонус.
Но, Блиц это старый добрый бэйсик который я со школы знаю и конечно мне на нём веселее ]]]]] (робот лах) )))) (лол) >>>>>>>> (дикий смех).
если я упрусь в какие-то неудобства, всегда можно перейти на Сси х_х, я его изучал по вечерам и ночью на работе втайне от директора. когда своего компа не было.
|
(Offline)
|
|
27.12.2012, 01:18
|
#35
|
Быдлокодер
Регистрация: 05.07.2009
Адрес: Проспит
Сообщений: 5,019
Написано 2,312 полезных сообщений (для 5,349 пользователей)
|
Ответ: Все для Blitz 3D. Сборники файлов, примеров, ресурсов и т.д.
Дополнение к посту #27.
Тут жаловались на файлообменники которые не пускают по IP'у.
По этому выкладываю альтернативную ссылку на Яндекс " Blitz3DFullExamples.rar"
Последний раз редактировалось Arton, 27.12.2012 в 05:10.
|
(Offline)
|
|
Эти 2 пользователя(ей) сказали Спасибо Arton за это полезное сообщение:
|
|
Ваши права в разделе
|
Вы не можете создавать темы
Вы не можете отвечать на сообщения
Вы не можете прикреплять файлы
Вы не можете редактировать сообщения
HTML код Выкл.
|
|
|
Часовой пояс GMT +4, время: 08:37.
|