HERSEY BURDA
Would you like to react to this message? Create an account in a few clicks or log in to continue.

HERSEY BURDA

HERSEYİ BULABİLDECEĞİN TEK ADRES
 
AnasayfaLatest imagesAramaKayıt OlGiriş yap
Arama
 
 

Sonuç :
 
Rechercher çıkıntı araştırma
En son konular
» free slot machines win cash
Oyun Programlama Tekniği Icon_minitimeÇarş. Ağus. 03, 2011 3:57 am tarafından Misafir

» watch naruto hentai watch naruto hentai free
Oyun Programlama Tekniği Icon_minitimeÇarş. Ağus. 03, 2011 3:52 am tarafından Misafir

» major fish oil
Oyun Programlama Tekniği Icon_minitimeSalı Ağus. 02, 2011 10:26 pm tarafından Misafir

» hentai about hentai academy
Oyun Programlama Tekniği Icon_minitimeSalı Ağus. 02, 2011 10:10 am tarafından Misafir

» гинекология ответы
Oyun Programlama Tekniği Icon_minitimePtsi Ağus. 01, 2011 9:18 am tarafından Misafir

» x-Hack hack you
Oyun Programlama Tekniği Icon_minitimePtsi Ağus. 01, 2011 8:00 am tarafından Misafir

» When the first Whirlpool Duet album was released in December 2001
Oyun Programlama Tekniği Icon_minitimePtsi Ağus. 01, 2011 3:05 am tarafından Misafir

» women at work hentai online women at work hentai stream
Oyun Programlama Tekniği Icon_minitimePtsi Ağus. 01, 2011 2:56 am tarafından Misafir

» facebook likes xb
Oyun Programlama Tekniği Icon_minitimePaz Tem. 31, 2011 9:22 am tarafından Misafir

Tarıyıcı
 Kapı
 Indeks
 Üye Listesi
 Profil
 SSS
 Arama
Forum
HABERLER
Fikri Türkel köşe yazıları

 

 Oyun Programlama Tekniği

Aşağa gitmek 
YazarMesaj
Admin
Admin



Mesaj Sayısı : 3361
KULLANICI PUANLARI : 9918
Kayıt tarihi : 16/05/10

Oyun Programlama Tekniği Empty
MesajKonu: Oyun Programlama Tekniği   Oyun Programlama Tekniği Icon_minitimePaz Haz. 27, 2010 5:26 pm

Oyun Programlama Tekniği
3B Oyun yapımını öğrenmek istiyormusunuz? Ozaman bu makaleyi lütfen okuyun!!!

2005 yılında oyun yapımına merak salmıştım. Daha sonra internette gezinirken Dark Basic 3D oyun tasarım editörünü keşfettim.

İlk başlarda bu programı kullanmak bana zor gelmişti, ancak zamanla C++ dilinide bildiğim için hiçte zor olmadığını gördüm.

Türkiyede oyun programlamanın gelişen bir sektör olarak düşünüyorsanız bu program tam size göre. Ayrıca programın yardım menüsüde mevcut olduğundan kolayca öğrenebilirsiniz.

Aşağıda size denenmiş basit bir örnek vermek istedim. Tabi önce programı indirip bilgisayarınıza kurmanız gerekir.

Kutuların Savaşı Oyunu
rem basit oyun
rem direk çalışan kodlar

_MENU:
rem Menu yapılıyor

set display mode 640,480,16
cls rgb(0,0,0)
do
ink rgb(255,0,0),0
box 230,120,430,160
box 230,200,430,240

if mousex()>230 and mousex()<430 and mousey()>120 and mousey()<160
ink rgb(0,255,0),0
box 230,120,430,160

if mouseclick()=1 then GOTO NEW_GAME
endif

if mousex()>230 and mousex()<430 and mousey()>200 and mousey()<240
ink rgb(0,255,0),0
box 230,200,430,240
if mouseclick()=1 then end
endif

ink rgb(255,255,255),0
set text font "Viner Hand ITC"
set text size 60
text 250,10,"KUTULARIN SAVASI"
set text font "Times New Roman"
set text size 14
text 300,130,"Yeni Oyun"
text 310,210,"CIKIS"
sync
loop
return

NEW_GAME:
rem matriks kaplanıyor
cls rgb(0,255,0)
for x=0 to 1024
dot rnd(32),rnd(32),rgb(0,125,0)
next x
get image 1,0,0,32,32
rem oyuncu yapılıyor
make object cube 1,1
color object 1,rgb(255,0,0)
rem düşman yapılıyor
ink rgb(255,0,0),rgb(255,255,0)
cls rgb(255,255,0)
circle 16,16,16
dot 9,5 ; dot 23,5
line 9,23,23,23
get image 3,0,0,32,32
make object cube 2,1
texture object 2,3

rem matriks de yarık vs yapılıyor
make matrix 1,500,500,100,100
randomize matrix 1,2
prepare matrix texture 1,1,1,1
for x=1 to 99
for y=1 to 99
yes=rnd(20)
if yes=10
set matrix height 1,x,y,-70
set matrix height 1,x,y+1,-70
set matrix height 1,x+1,y,-70
set matrix height 1,x+1,y+1,-70
endif
next y
next x
update matrix 1

rem setup
cls rgb(255,0,0)
for x=0 to 512
dot rnd(32),rnd(32),rgb(255,255,0)
next x
get image 2,0,0,32,32
make particles 1,2,100,2
set particle floor 1,0
set particle life 1,5
color backdrop rgb(0,0,0)
set ambient light 0
set point light 0,0,100,0
color light 0,255,255,255
set light range 0,50
x#=260
z#=260
enemx#=265
enemz#=265
direction#=270
y#=get ground height(1,x#,z#)
gravity#=0
power=1000
lives=5
sync on
sync rate 60
do
IF LIVES<0 then gosub end_game
if power<1000 then power=power+1
gosub _control_physics
gosub _control_player
gosub _control_camera
gosub _control_effects
gosub _control_enemy
text 0,0,"Enerji:"+str$(INT(power/10))+"%"
if lives>=3 then text 0,15,"size ait "+str$(lives)+" hak."
if lives=2 then text 0,15,"Dikkat "+str$(lives)+" hak!"
if lives=1 then text 0,15,"Son hak!"
if lives=0 then text 0,15,"Uh Oh!, oyun bitti!"
sync
loop

_control_player:
powerup=0
if keystate(17)=1 and power>=0 then powerup=1

rem decrease the power of your jump
if jumpower#>0 then jumpower#=jumpower#-0.004

rem move player forwards
if upkey()=1 and move=1
x#=newxvalue(x#,a#,0.2)
z#=newzvalue(z#,a#,0.2)
if powerup=1
x#=newxvalue(x#,a#,0.3)
z#=newzvalue(z#,a#,0.3)
power=power-5
endif
endif

if downkey()=1
endif

if leftkey()=1 then a#=a#-2

if rightkey()=1 then a#=a#+2

rem sıçrama

if spacekey()=1 and move=1
if y#=g# then jumpower#=0.3
endif

y#=y#+jumpower#
yrotate object 1,a#
position object 1,x#,y#+0.5,z#

rem duraklat!
move=1
frontx#=newxvalue(x#,a#,1)
frontz#=newzvalue(z#,a#,1)
fronth#=get ground height(1,frontx#,frontz#)
if fronth#-y#>0.5 then move=0
if y#<-60
x#=rnd(500)
z#=rnd(500)
y#=6
lives=lives-1
endif

return

_control_camera:
rem kamera atarları
if y#>-5
cx#=newxvalue(x#,a#,-10)
cz#=newzvalue(z#,a#,-10)
else
cx#=x#
cz#=z#
endif

position camera cx#,6,cz#
point camera x#,y#,z#
return

_control_physics:

rem fizik motoru
g#=get ground height(1,x#,z#)
if y#>g#
gravity#=gravity#+0.005
y#=y#-gravity#
else
y#=g#
gravity#=0
endif
return

_control_effects:
position light 0,cx#,camera position y(),cz#
point light 0,x#,y#,z#
if powerup=1
position particle emissions 1,x#,y#,z#
else
position particle emissions 1,-100000,-100000,-100000
endif
return

_control_enemy:
enemt#=ATANFULL(x#-enemx#,z#-enemz#)
yrotate object 2,enemt#
enemlengthx#=(x#-enemx#)
enemlengthz#=(z#-enemz#)
enemcross#=((enemlengthx#*enemlengthx#)+(enemlengthz#*enemlengthz#))
enemdist#=sqrt(enemcross#)
enemfront#=get ground height(1,newxvalue(enemx#,enemt#,1),newzvalue(enemz#,enemt#,1))

rem düşamanın hareketleri
if enemdist#>5
if enemfront#>-1
enemx#=newxvalue(enemx#,enemt#,0.1)
enemz#=newzvalue(enemz#,enemt#,0.1)
else
rem make the enemy jump
if enemjump#<0 then enemjump#=3
if enemjump#>0
enemx#=newxvalue(enemx#,enemt#,0.1)
enemz#=newzvalue(enemz#,enemt#,0.1)
endif
endif
endif

if enemjump>0
enemjump#=enemjump#-0.001
enemy#=enemjump#
else
enemy#=get ground height(1,enemx#,enemz#)+0.5
endif

position object 2,enemx#,enemy#,enemz#
return
end

end_game:
for x=1 to 10
if object exist(x)=1 then delete object x
if image exist(x)=1 then delete image x
if matrix exist(x)=1 then delete matrix x
next x

GOSUB _MENU

return
Sayfa başına dön Aşağa gitmek
http://dessas.yetkinforum.com
 
Oyun Programlama Tekniği
Sayfa başına dön 
1 sayfadaki 1 sayfası
 Similar topics
-
» Oyun Programlama Nedir
» Oyun Programlama
» pygame ile Oyun Programlama
» Opengl-Glut ile oyun programlama
» Java'da Oyun Programlama

Bu forumun müsaadesi var:Bu forumdaki mesajlara cevap veremezsiniz
HERSEY BURDA :: OYUN PROGRAMLAMA :: OYUN PROGRAMLAMA-
Buraya geçin: