Page 1 of 5 123 ... LastLast
Results 1 to 10 of 46

Thread: My multiplayer RTS

  1. #1

    My multiplayer RTS

    Just letting you know what's going on behind the scenes And this is just a spare time project that is done somewhere between everything else and World of Warcraft when motivation strikes hit... (It may never complete at all but i think its idea worth mentioning)

    Inspired by good old Total Annihilation, Settlers and Mmorpg network gaming styles, this is small game, a futuristic realtime strategy game with massive forces in player control. I would make it for single to upto maybe 8 players AI or human controlled players. Games would take place in a world that is saved on exit and continuable upon start. Idea is to have a huge map, now imagine largest possible map in Starcraft that is 256x256. This game would have that size times 10. Max unit counts per player are likely set for 30000 or more, they decide whether those units are all buildings or other units.

    Using Next3D (and maybe some from old Tlib) that is my own OpenGL graphics wrapper and function libraries. dglOpenGL 1.8 beta?, WSockets 1.20.

    How is it possible to make massive forces, consisting of thousands of units and buildings and then synchronize it all through TCP/IP? Now, as i don't have a technical test ready yet its in theory level. Lets put security aside and think of this as a small game for some fun wanting people. The game server or client will never send a single tcp packet holding information on unit location, bullet shot or resource gained etc, its all game engine. When i draw a rectangle over 1000 units i see on my game client, i will not transmit what those 1000 units are to server. Instead i send cursor coordinates and camera position. Additionally i can click a single unit when i can send that unit ID. (There are numbered unit groups to ease selection aswell.) Server gathers data in its pace and in timed intervals (perhaps every 50-100ms) send all clients order to increase tick. This tick is key to synchronizing everything. All physics and movement are calculated on both server and client side. When that selection comes to server, it transmits it back to all clients including the sender. This is when sender and all other clients get to know what that player has selected and next command through server might be order for that selection to attack.

    Edit: However, if someone has plan to make a cheat, it will only effect his own client. Other clients will see the cheating player play stupid and only he just becomes non synchronized. Cheater might not get all his commands through when server thinks unit he is commanding may not even exist.

    Now, during the ticks is the animation. Any command that comes from server during that time is executed when tick changes, same tick every client. Clients send a reply for receiving each tick so server will know if they are lagging behind, halt game and resend until players match. Because games are done in small friend networks it is acceptable, alternative to store all data from during lagspike to server side can grow big. Or third alternative to completely send the whole game situation to new guy is a little stressful. New players can perhaps join midgame but should game pause then aswell... Small problem here is to animate movement during ticks, it may require a little interpolation or not, but i have math functions ready for all of that anyway.

    Ideas for game itself (lots of things from Total Annihilation sound sweet):
    - 2 cybernetic races evolved in 2 distant galaxies, annihilated their biologic creators and expanded in numerous star systems, collide to gain control over universe
    - Air and ground forces, big starships
    - Workers
    - Buildings, these have a number of workers assigned to them that automatically move to the task
    - Construction use materialization tech to create units from atoms using resources and energy
    - Defensive and very offensive turrets designed for quick and creative annihilation for short to whole map wide range
    - Shield generators for base defence using energy available
    - Propably power lines

    And because the tick system is all theoretical so far, my worst fear is tick system that would make delay unplayable. But i hope for best and maybe find some support here And if it works it would be unique first one of its kind multiplayer rts game that noone thought was possible to build.

    Edit: First ship prototype made on my own modelling program:
    http://i42.tinypic.com/2d83o8n.jpg

  2. #2

    My multiplayer RTS

    Happy to say i got 3D textures supported in engine now:
    (Seemless terrain tiling with simply adjusting texture Z coordinate)
    http://i39.tinypic.com/2enruc9.jpg

    Also planned on storyline a little... It is hard to think like a machine would, or what the circumstances would be. Anyway humans will survive, however artificial computer breaks free to form a colonization of its own. It doesn't need humans (yet) but also don't have a reason to exterminate them. For human perspective it is a unstoppable force that keeps expanding in galaxy. They have hard time to expand and develop on by themselves.

    Few hundred years in the future of the incident, AI scouts other galaxy only to find about a big rival. With some logic 2 AI might plan to integrate into 1 being, however this AI did not think alike, or found that be unnecessary and complicated thing to do. Needless to say, scout was vaporized. It became a war to decide who the supreme being in the universe is. For humans are different case as they are no threat to balance of everything like another "unstoppable" AI with different logics. 10 years later, battle had expanded to huge proportions while real winner was not able to be decided. It is logical, too mathematical thinking that became obstacle for both.

    Slight modifications for fleet were needed for organic, random, illogical, brutal humans were given chance to lead some starships into battle! And there we get to player part

  3. #3

    Re: My multiplayer RTS

    So where the game is now...

    Most interesting thing about making it has been world that wraps in X and Y directions There is so many things 1 has to take in to account, but glad it's all solved and done now (rectangular unit selection, rendering near borders and functions will work for AI pathing).

    What's also done is particles and units that has so far just falling physics colliding and little bouncing from heightmapped terrain but at least it's some movement. I managed to make this all with integer numbers while still looking very smooth. Sine, cosine and arccos tables are precalculated and i will aim not to use floating point numbers where accuracy is needed in networking.

    I made thousands of these falling 3D models on terrain while it didn't affect fps by much. Next up would be simple multiplayer demo once i find time for it...

  4. #4

    Re: My multiplayer RTS

    Wow. that's really exciting. Seems like you have some great plans for this game. I honestly hope you can finish it.
    Coders rule nr 1: Face ur bugz.. dont cage them with code, kill'em with ur cursor.

  5. #5
    Legendary Member NecroDOME's Avatar
    Join Date
    Mar 2004
    Location
    The Netherlands, Eindhoven
    Posts
    1,059

    Re: My multiplayer RTS

    Hi User137. I see you have splatting working nice work!

    I also noticed the repetitiveness of the texture. For your intereset: Tile-Based Texture Mapping http://http.developer.nvidia.com/GPU...chapter12.html
    NecroSOFT - End of line -

  6. #6

    Re: My multiplayer RTS

    I am most definitely interested in this. Sound very intriguing
    Peregrinus, expectavi pedes meos in cymbalis
    Nullus norvegicorum sole urinat

  7. #7

    Re: My multiplayer RTS

    Quote Originally Posted by NecroDOME
    Hi User137. I see you have splatting working nice work!

    I also noticed the repetitiveness of the texture. For your intereset: Tile-Based Texture Mapping http://http.developer.nvidia.com/GPU...chapter12.html
    Hey thanks! That doesn't seem too hard to implement on my current system, actually 3D texture might make it look even cooler.

    In current system texture coordinate is linearly count from heightmap (not exactly same as terrain screen above) but yes tiling is still noticable, so that would need a different approach. Maybe separate texturemap along with heightmap.

  8. #8
    Legendary Member NecroDOME's Avatar
    Join Date
    Mar 2004
    Location
    The Netherlands, Eindhoven
    Posts
    1,059

    Re: My multiplayer RTS

    Yeah just give it a try and post the result
    NecroSOFT - End of line -

  9. #9

    Re: My multiplayer RTS

    Lol it was fast to make ..anyway i'm not yet happy enough about result because it looks worse than before. This is now caused by issue that each tiles are not seamless with themselves (and each other?), i think. But that's artistic problem..

    http://i39.tinypic.com/2lw6b5y.jpg

  10. #10
    Legendary Member NecroDOME's Avatar
    Join Date
    Mar 2004
    Location
    The Netherlands, Eindhoven
    Posts
    1,059

    Re: My multiplayer RTS

    it looks like that yeah. Nice work though.
    NecroSOFT - End of line -

Page 1 of 5 123 ... LastLast

Bookmarks

Posting Permissions

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