Results 1 to 12 of 12

Thread: Online Game <help please>

  1. #1

    Thread Starter
    New Member
    Join Date
    May 2007
    Posts
    9

    Question Online Game <help please>

    I am planing to make an online walkaround game using graphics as in Goblin Hack Or Rouge, I know how to make people(labels) move with the arrow keys or w,a,s,d keys and i know the collision detection and i know shooting. What i plan on useing ontop of that is... A chat system(i might know how already), A way to have plenty characters on the screen at once, a character creation menu (Choose your letter and color), and weapons and items... none of which I want made with DirectX... can someone help? Big order I know... sorry... But I am fairly new...
    P.S. Im using VB 6.0

    I posted this in the game/graphics forum as well but i didnt get any replys maybe you can help? thanks
    Attached Files Attached Files

  2. #2
    "Digital Revolution"
    Join Date
    Mar 2005
    Posts
    4,471

    Re: Online Game <help please>

    For the chat system you will want to use Winsock...either the Winsock control (much easier and better in most cases, in my opinion) or it's API functions.

    There are a lot of tutorials for using that control so I'd read those first (it's not hard to learn).

    How are you planning on making this multiplayer? Will it be 2 player, 1v1? Or will there be more than 2 players? If there's more than 2, then one player will need to act as the server, or the one that 'hosts' the game. The server would be what's responsible for relaying the chat messages to all the clients. (All clients connect to the server and the server is responsible for relaying messages, etc to all the connected clients).

    If it's a 1v1 then you can just connect the 2 people together directly.

    There are 2 protocols with Winsock. TCP and UDP. UDP is faster and might be good enough for chat messages, but I'd still use TCP. UDP is better if it's for sending game data rapidly (character movements, etc.). It's up to you.

    Either way, I'd familiarize yourself with the Winsock control.

  3. #3

    Thread Starter
    New Member
    Join Date
    May 2007
    Posts
    9

    Re: Online Game <help please>

    ok thanks, i plan on making more of a mmo game so ya a server would be needed i guess. Ill work on learning Winsock stuff, and if UDP is faster then Ill use it. Thanks for helping!

  4. #4
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Online Game <help please>

    This might help.

    Winsock

  5. #5

    Thread Starter
    New Member
    Join Date
    May 2007
    Posts
    9

    Re: Online Game <help please>

    Thanks Hack, Ill look through them and see if it comes in handy. If it does should I mark this tread as resolved?

  6. #6

    Thread Starter
    New Member
    Join Date
    May 2007
    Posts
    9

    Re: Online Game <help please>

    so a quick question... if I want a character to move, could I simply type
    vb Code:
    1. Winsock1.senddata Label1.Top = Label1.Top - 10
    What would I need on the server for that... or is it harder than I think?
    Last edited by Valentine-less; Jun 2nd, 2007 at 04:36 PM. Reason: Error

  7. #7
    Lively Member
    Join Date
    Jan 2007
    Posts
    95

    Re: Online Game <help please>

    naaH! i'm also new to winsock... but i think this will not work... cyou have to send data in some other way..like this
    Winsock1.senddata "movechar|-10"
    because, the only recieve and sends messages...
    you can use these messages as commands
    you have to add a function that, when a player press left button, the winsock sends this message: "movechar|player1|-10"
    then you have to make another function wich will read the message, if the msg is a command it will move the character otherwise it will print the message to the chat box...i think i have not clear the ...

    let me try once again in rough coding

    function left_btn_onPress()
    {
    winsock.senddate "movechar|player1|-10" // if the user is player 2, change it to two
    }

    function right_btn_onPress()
    {
    winsock.senddate "movechar|player1|10"
    }

    function winsock_onRecieveData()
    {
    if data.startswith("movechar|") then
    data = split data with '|', (the first will be 'movechar', second you will get the player, and third u will get the distance to move. understand??)
    data[1] will be player
    data[2] will be the distance (u can use it like this: Label[data[1]].Top = Label[data[1]].Top + data[2] )

    elseif
    chatbox.text = chatbox.text + "\n" + data
    endif
    }

    this is just to give you the idea.... you can you your chatting program as the command sending program as well as chatting program

    dont forget to rate if the idea is good!
    Last edited by extreme.aly; Jun 13th, 2007 at 02:52 PM.

  8. #8

    Thread Starter
    New Member
    Join Date
    May 2007
    Posts
    9

    Re: Online Game <help please>

    hmmm thats confusing because of the code... it was all out of wack lol, you had works and stuff in it... it was realy hard to understand. I basicly get what you are saying. Use functions that moves a character and sends that data, correct?

  9. #9
    Lively Member
    Join Date
    Jan 2007
    Posts
    95

    Re: Online Game <help please>

    function left_btn_onPress()
    {
    winsock.senddate "movechar|player1|-10" // if the user is player 2, change it to two
    }

    function right_btn_onPress()
    {
    winsock.senddate "movechar|player1|10"
    }
    well, it is winsock.senddata, not winsock.senddate.. i made a mistake..
    and yes, you have to send a message to other computer using winsock, and use that message as a command, and then you can use that command to move the character!

  10. #10

    Thread Starter
    New Member
    Join Date
    May 2007
    Posts
    9

    Re: Online Game <help please>

    ok, thanks... I havnt been working on this for a while, but Ill start it up again in a bit. Does anyone know if Java is easy to make an online RPG with?

  11. #11
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Online Game <help please>

    Quote Originally Posted by Valentine-less
    ok, thanks... I havnt been working on this for a while, but Ill start it up again in a bit. Does anyone know if Java is easy to make an online RPG with?
    I would ask this question in the Games section.

    They would know.

  12. #12

    Thread Starter
    New Member
    Join Date
    May 2007
    Posts
    9

    Re: Online Game <help please>

    Oops, This topic arose in the games section and then I stoped and forgot about it... Thanks Hack!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width