Jump to content

Recommended Posts

Terlebih dahulu aku ingin meminta maaf kepada member kelab bina game, sbb aku terstopkan diri aku buat game bersama korang, dan stop buat game untuk MSC. Ada masalah dalaman yang tragis x dptkan aku cerita kat sini. Cuma doakan agar kelab nie dapat terus berlangsung.


Jom kawan - kawan kita cipta Multiplayer Online Game just for fun, later for something good for the team.

Tujuan : Play and meet Kelab Bina Game in the game

Sapa setuju......... angkat tangan...

Yg diperlurkan

1. Math expert
2. Programmer (Zsuperxtreme)
3. 3D modeller
4. Art

Let's begin

Share this post


Link to post
Share on other sites
assalamualaikum...

ada kisah tragis la plak...takpela..at least ko dah kembali..kehkeh

multiplayer game..3d ke? mcm Arena Pahlawan dulu tu?

Share this post


Link to post
Share on other sites
Ha ah mcm arena pahlawan, tapi nak upgrade kod sikit sbb nak support byk geng putera nie... ::icon_biggrin::

Otai 3d kita vib kata nak join, leh la asah bakat kat sini.. hok hok hok.

Sapa nak supply 3d character dipersilakan.

Share this post


Link to post
Share on other sites
Hehehe... ZX dah kembali rupenya... kisah tragis tu jadikan sejarah, sekarang kita perlu looking forward for future mission and vision.

PS:/ Concept 3D apa nak buat?

Share this post


Link to post
Share on other sites
TARGET USER: Lebih dari 30,000 player.

Problem (define dari Arena Pahlawan)
- packet latency (walau guna UDP)
- good support (4 user), if more than latency

Solution
- Socket through TCP
- User Clipping (by distance e.g 1000px, longer reduce by alpha transparent and vanish)
- Client terminal cuma receive data by perimeter.

Ini flow project

Share this post


Link to post
Share on other sites
Thanks lanog. ::icon_biggrin::

KOnsep mcm arena pahlawan, fire-fire, tapi for the time being, target jumlah user, without latency.

So kalau nak buat object 3d, just design je apa-apa jenis object, mcm pahlawan ke, alien ke, robot ke....

format .3ds atau .mdl for 3d object


Current progress
- Tgh buat coding untuk Socket client and server
- 3D world - *empty environment

Progress needed to follow up
- 3d Character

Share this post


Link to post
Share on other sites
Okey... nak bongkar balik model2 lama nanti nie. BTW, low poly kan.. ker dah support high poly.. hehehe. Count me in 3d Character design (sumbang sikit2 jer arr..).

Share this post


Link to post
Share on other sites
huhuh... soalan...

1. guna game enjin apa?
2. satu kerekter brapa poly
3. texture size?

PS: Ada sesapa yg byk idea pasal kerekter...bleh la post concept/kerekter art kat sini...jadikan reference.. ::icon_smile::

Share this post


Link to post
Share on other sites
Sapa2 rajin, sila ler meng'3D'kan character2 nie.. hehe.



Dari kiri ke kanan: Profesor Memory, Budak Nerd dan Uncle Beard.



Dari kiri ke kanan: Magicianjin, Budak Gemuk dan Appleman.

Source:Lanogame

Share this post


Link to post
Share on other sites
VIB
-1. Still guna A6, hoho, A7 byk pakai bone rigging, leceh sikit. Untuk next project nanti nak try torque, Vib, ada lelanun torque tak?
-2. Poly the most optimum la (MAX : 1000 vertex), (BEST : Around 500 vertex)
-3. Texture size (The Best : 300px), kalau lebih, takut lagging. Tapi untuk object mcm rumah ke, building ke, boleh but less than 1000 px

Naz
Ko tak tertinggal apa apa lagi, huhu, jom join. tengok flow kalau nak involve,

Lanog
Cute character hehehehe. Nice.


Kepada geng-geng sekalian, kalau kenal member yg best, ajak la join. daripada kita melepak, lagi baik kita produce something utk asah skill dan looking forward on something.

Share this post


Link to post
Share on other sites
Programming Parameter Strategy for Mass Multiplayer Online Game

1. Client send location and other parameters to server
Parameter
- user(id) name
- user(id) score
- user(id) weapon
- user(id) health
- user(id) message
- user(id) location x
- user(id) location y
- user(id) location z
- user(id) pan
- user(id) action
- user(id) bullet x
- user(id) bullet y
- user(id) bullet z
- user(id) bullet pan

Server send information to client

- same as above
- Server yang decide health player bukan client.
- Rules : if(inside_circle(user(id),1000)){ send(..all user information within range..)}

Untuk delay, lagging n latency

- jika information x dpt send dlm 1 second, player dpt aura of protection.

Hall of fame
- simpan score kat server....
- Otai medal display.

Share this post


Link to post
Share on other sites
Aku try come up with basic game by this week... ::icon_wink:: boleh la buat reunion dalam game... hohohoho
Ok kpd member-member let's do it seriously... ::icon_biggrin::

Aku guna server opis untuk start this game as server-side:D

Share this post


Link to post
Share on other sites
assalamualaikum...

aku modelling karakter, atau benda2 organik mmg tak reti..objek2 biasa buleh le..kehkeh

Share this post


Link to post
Share on other sites
zsuperxtreme wrote:Aku guna server opis untuk start this game as server-side:D

Boss opis ko tak marah ker guna server opis tu... ::icon_bounce::

Share this post


Link to post
Share on other sites
assalamualaikum...

blom lagi kot zx..masing2 bz agaknya..nanti2 ada la yg pos tu.. ::icon_biggrin::

Share this post


Link to post
Share on other sites
MalaYneuMaya wrote:assalamualaikum...

blom lagi kot zx..masing2 bz agaknya..nanti2 ada la yg pos tu.. ::icon_biggrin::

Yup.. semua nampak sibuk. Aku pun lagi ler sibuk macam2... so tak dapat ler nak contribute cam dulu2, memandangkan komitmen dah bertambah. Komputer pun baru bukak kotak nie... dah lama berbalut tak sentuh.... hahaha.

Share this post


Link to post
Share on other sites
Ok kepada member sekalian, disini serba sedikit kod , segala komen dihargai

Kepada yang nak study study buat multiplayer game code, bleh la usya usya.

Code Client - Server (50% done, x siap lagi) setup for 1000 player at this moment
Code:

Dim key(100) As Integer
Dim x(100) As Integer
Dim y(100) As Integer
Dim z(100) As Integer
Dim tArray() As String
Dim num_of_Player As Integer
Dim host As Integer
Const SERVER As Integer = 1
Const CLIENT As Integer = 2
Dim Data As String




Private Sub bntListen_Click()
On Error GoTo t

'sock1 is the name of our Winsock ActiveX Control

sock1.Close 'we close it in case it listening before


'txtPort is the textbox holding the Port number
sock1.LocalPort = txtPort  'set the port we want to listen to
                            '( the client will connect on this port too)
                           
host = SERVER
sock1.Listen                'Start Listening
tmrSendData.Enabled = True
txtLog = txtLog & "*** Server Listening" & vbCrLf

Exit Sub
t:
MsgBox "Error : " & Err.Description, vbCritical
End Sub

Private Sub bntExit_Click()
End
End Sub



Private Sub btnClient_Click()
On Error GoTo t

'sock1 is the name of our Winsock ActiveX Control

sock1.Close 'we close it in case it was trying to connect

'txtIP is the textbox holding the host IP
'txtIP can contain both hostnames ( like www.google.com ) or IPs ( like 127.0.0.1 )
sock1.RemoteHost = InputBox("What is the IP for the server?", "Server IP", "127.0.0.1")  'set the remote host to the ip we wrote
                            'in the txtIP textbox

'txtPort is the textbox holding the Port number
sock1.RemotePort = txtPort  'set the port we want to connect to
                            '( the server must be listening on this port too)
                           
                           
sock1.Connect              'try to connect
host = CLIENT

Exit Sub
t:
MsgBox "Error : " & Err.Description, vbCritical

End Sub

Private Sub sock1_Close()
'handles the closing of the connection

sock1.Close  'close connection

txtLog = txtLog & "*** Disconnected" & vbCrLf

End Sub

Private Sub sock1_Connect()
'txtLog is the textbox used as our
'chat buffer.

'sock1.RemoteHost returns the hostname( or ip ) of the host
'sock1.RemoteHostIP returns the IP of the host

txtLog = "Connected to " & sock1.RemoteHostIP & vbCrLf

End Sub

Private Sub sock1_ConnectionRequest(ByVal requestID As Long)
'txtLog is the textbox used as our
'chat buffer.

'this event is triggered when a client try to connect on our host
'we must accept the request for the connection to be completed

'just check for state
If sock1.State <> sckClosed Then sock1.Close

'with this we accept the connection and we are now connected to
'the client and we can start sending/receiving data
sock1.Accept requestID
txtLog = "Client Connected. IP : " & sock1.RemoteHostIP & vbCrLf

End Sub

Private Sub sock1_DataArrival(ByVal bytesTotal As Long)
'This is being trigger every time new data arrive
'we use the GetData function which returns the data that winsock is holding

Dim dat As String    'where to put the data

sock1.GetData dat, vbString  'writes the new data in our string dat ( string format )
tArray() = Split(dat, ";")
Data = dat
If host = SERVER Then ServerUpdateList
If host = CLIENT Then ClientUpdateList
End Sub
Function ClientUpdateList()

    Open "mmorg.db" For Output As #1
        Print #1, Data
    Close #1

End Function
Function ServerUpdateList()
Dim i As Integer
Dim found As Integer
found = -1

For i = 0 To num_of_Player
    If (key(i) = Val(tArray(0))) Then found = i
Next i

If found <> -1 Then
x(found) = Val(tArray(1))
y(found) = Val(tArray(2))
z(found) = Val(tArray(3))
Else
x(num_of_Player + 1) = Val(tArray(1))
y(num_of_Player + 1) = Val(tArray(2))
z(num_of_Player + 1) = Val(tArray(3))
num_of_Player = num_of_Player + 1
End If

End Function

Private Sub sock1_Error(ByVal Number As Integer, Description As String, ByVal Scode As Long, ByVal Source As String, ByVal HelpFile As String, ByVal HelpContext As Long, CancelDisplay As Boolean)
'this event is to handle any kind of errors
'happend while using winsock

'Number gives you the number code of that specific error
'Description gives you string with a simple explanation about the error

'append the error message in the chat buffer
txtLog = txtLog & "*** Error : " & Description & vbCrLf

'and now we need to close the connection
sock1_Close

'you could also use sock1.close function but i
'prefer to call it within the Sock1_Close functions that
'handles the connection closing in general

End Sub



Private Sub tmrSendData_Timer()
On Error GoTo t
'we want to send the contents of txtSend textbox
Dim dat As String
Dim player As String
Dim i As Integer

    Open "mmorg.db" For Input As #1
        Line Input #1, player
    Close #1
    tArray() = Split(player, ";")
   
For i = 0 To num_of_Player
    dat = dat & key(i) & ";" & x(i) & ";" & y(i) & ";" & z(i) & vbNewLine
Next i
If sock1.State = sckConnected Then
If host = SERVER Then sock1.SendData dat 'trasmits the string to host
End If


'error handling
'( for example , we will get an error if try to send
'  any data without being connected )
Exit Sub
t:
MsgBox "Error : " & Err.Description
sock1_Close  'close the connection
End Sub



Code in the game for creating object
Code:


string ops[80];
var gkey;
var gx;
var gy;
var gz;
var_nsave fhandle;


var find;
function ent_find(tkey,tx,ty,tz)
{
      find=0;
      you = ent_next (NULL); // retrieve first entity
       while (you != NULL) // repeat until there are no more entities
      {
         
         if(you.skill50 == tkey && you!=player){you.x =tx;you.y=ty;you.z=tz;find=1;}
          you = ent_next (you); // get next entity
       }
       return(find);
}


function ent_other_action()
{
   my.skill99 = 1;
}

function ent_create_(tkey,tx,ty,tz)

   temp.x = tx;
   temp.y = ty;
   temp.z = tz;
   you = ent_create ("rocket.mdl", temp, ent_other_action); // store the entity pointer
   you.skill50 = tkey;
}


function other_player()
{
   while(1)
   {  gkey = 1; //to prevent end file
      fhandle = file_open_read("mmog.db"); // test.txt contains "this,is,a,test"
      while(gkey != 0)
      {
         gkey = file_var_read(fhandle); // name
         gx  = file_var_read(fhandle); // var x
         gy  = file_var_read(fhandle); // var y
         gz  = file_var_read(fhandle); // var pan
         
         if(gkey!=0)
         {
            //check_var(gkey);
            if(ent_find(gkey,gx,gy,gz) == 0){ent_create_(gkey,gx,gy,gz);}
         }
            
         wait(16);
      }
      file_close(fhandle);
      wait(1);
   }   
}


Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...