hate these ads?, log in or register to hide them
Page 1 of 2 12 LastLast
Results 1 to 20 of 29

Thread: Still working

  1. #1

    Join Date
    April 9, 2011
    Location
    2006
    Posts
    3,849

    Still working

    Yeah I'm still plugging away at this.

    We had some crunch time in work recently (big client that leads on to other big clients if we do it right), so a lot of my free time has been spent doing development work for my day job. What remains of my free time has been spent doing anything except coding.

    That's over now, so I'm cracking back on with this.

  2. #2
    Sp4m's Avatar
    Join Date
    August 5, 2013
    Posts
    5,677
    You better be.

  3. #3

    Join Date
    April 9, 2011
    Location
    Chichester, UK
    Posts
    1,574
    Looking forward to the next update!

  4. #4

    Join Date
    April 9, 2011
    Location
    2006
    Posts
    3,849
    It's coming along.

    I'm using uLink under the hood to deal with networking (It lets me use unity logic on the server and is infinitely better than the terrible built in unity networking) and as always when using third party plugins there are…integration issues.

    I'm using a component/system architecture in this game, which involves attaching data classes to in-game entities and then feeding my entities into logical systems that process them based on that data. This is a little different to the norm (which is attaching data and logic to entities) but it is in my opinion superior as it allows better organisation of logic and a much more modular approach to adding new mechanics.

    uLink isn't too fond of this, as its automated network call-backs don't integrate too well with the top level systems I use. This has now been resolved, so I can continue with splitting the single-player logic into a client/server pairing.
    Last edited by Nicholai Pestot; October 4 2013 at 02:25:56 PM.

  5. #5

    Join Date
    April 9, 2011
    Location
    2006
    Posts
    3,849
    Connection handling has been dealt with, so I now have a server that will allow people to connect/disconnect gracefully. There is a (very) crude connection menu that lets players define a Name, enter a password and specify an IP/Port to connect to.

    Players connecting now prompts the spawning of a ship for them, which is synchronised across the server and all clients.

    The camera controls from the single player have now been re-implemented and the client half of the hotkey/interface has been migrated over.

    Next up is dealing with the server half of receiving user input that is routed from the clients.

  6. #6

    Join Date
    April 9, 2011
    Location
    2006
    Posts
    3,849
    Client handling of user input for movement has been setup.

    Fixed bugs with movement synchronisation.
    Fixed bugs with disconnect destroying the clients main game camera (don't ask).
    Fixed bugs with disconnect causing null-reference errors on server.
    Fixed bugs with rapid connection/disconnection causing inconsistent connection control panel behaviour.

    Next up - server/client handling of shield systems.

  7. #7

    Join Date
    April 9, 2011
    Location
    Chichester, UK
    Posts
    1,574
    sounds good so far

  8. #8

    Join Date
    April 9, 2011
    Location
    2006
    Posts
    3,849
    It's getting there.

    This morning rather than pushing on with the shield system I did a quick review of what I've already created.

    I've setup some more refined logging of the existing systems that should allow me to more quickly identify bugs in the future and documented the existing systems/components/data so that a month from now I'm not left looking at this code going "wtf does this do?".

    Now, on to the shield system.

  9. #9

    Join Date
    April 9, 2011
    Location
    2006
    Posts
    3,849
    Modification of the shield system to work in a networked environment for the owner of the ship and the server is complete. The server is now correctly interpreting commands from users and applying them to that user’s ship. In return the server is correctly sending data back to the ships owner about the status of the shields, with all that being correctly displayed on the client side as it was in the single player alpha.

    Much of this communication is just passing mode changes as and when a mode change occurs, but shield hit points are a continually changing variable that appear on a number of readouts for the user. In an effort to reduce bandwidth, I have set the shield hit points to only synchronise twice a second (and then, only if they change), rather than with every frame. One of my first optimisation passes (after the first multiplayer alpha test) will probably be to have a client-side approximation of the shield calculations that is re-synchronised with the server every second. This will further reduce bandwidth while providing a more smoothly changing interface readout. For now however the half-second ‘ticks’ of shield updates are acceptable.

    The last thing I have to do for the shield system now is apply it to the proxy representation of player ships on other clients. As a player needs significantly less information about other player’s ships these proxy representations are going to have a more limited update procedure and slightly less frequent numerical synchronisations. The important part here are the visual cues that provide information about the status of other player’s shields. Everything other than that is just an added bonus that can be sacrificed to limit bandwidth usage. As the proxy version of the code is really just going to be a paired down implementation of the owner version I can easily copy-and-paste my way to victory this evening after work.

    Next up (probably starting tomorrow though I may take a one day break) will be turret battery controls.

  10. #10

    Join Date
    April 9, 2011
    Location
    2006
    Posts
    3,849
    Ohgodsomanybugs with that networked shield system.

    Had an issue that was causing other peoples shields to flicker on/off on the client each frame.
    Had an issue with shields initialising incorrectly if a certain combination of orders had been issued to someone else's ship prior to the client connecting.
    Had a great issue with shield commands intended for the proxy being routed back to the owner (turned out to be a uLink issue, which I devised a workaround for).

    All resolved.

    Now, on to the turret battery controls.

  11. #11
    How's it coming along man?
    The world is against me, it wouldn't be fair otherwise"

  12. #12

    Join Date
    April 9, 2011
    Location
    2006
    Posts
    3,849
    I realised that the turret battery systems needs the turret system working first.

    I have to be really careful with how I synch this as streaming rotational data about hundreds of turrets every frame(or even every few frames), is simply not viable.

    What I'm working on is:-

    -Rather than sending rotational data I'm sending target data and allowing clients to make their own rough approximation of turret rotations. Because the turrets are arranged into a hierarchical structure and parented to 6 directional turret banks I only have to worry about maintaining up to 6 targets per ship and even then, only when a user decides they want to flip targets.

    -Whenever a turret actually fires a quick 'firing package' containing the servers reality of the target location/turret rotation is sent out from the server.

    -The client takes the data from this firing package and then quickly synchs its local approximation of the turret up with it, before initiating a local simulation of firing.

    Because the turrets calculate their rotations based off the positions/rotations of the ships and the ships themselves do have their positions/rotations updated over the connection, the local client approximation should be so close to the server reality that this doesn't produce a judder in the turret just before/after it fires.

    So in effect the client will always be running its own local 'best guess' of rotational statuses that is periodically updated by the server (which holds the authoritative reality of what's really going on)

    I'm still slugging away at that.
    Last edited by Nicholai Pestot; October 23 2013 at 10:44:23 PM.

  13. #13
    Cripes, sounds like a good and proper mind-fuck
    The world is against me, it wouldn't be fair otherwise"

  14. #14

    Join Date
    April 9, 2011
    Location
    Chichester, UK
    Posts
    1,574
    You are a hero, is the "server" a standalone application or is it a client that acts as the server? If that makes sense?

  15. #15

    Join Date
    April 9, 2011
    Location
    2006
    Posts
    3,849
    The client and server both share the same codebase/dev environment, but they have separate scenes assigned to each of them in Unity. When I do a build I include either the client scenes or the server scenes and that produces one or the other as an isolated executable.

    The server runs as a unity instance, without any graphics/input enabled. One of the reasons I chose uLink as a networking solution is that it supports creating the server-side in unity. It's basically the only professional-quality unity networking solution that allows this and it is highly scalable - its designed to work with PikkoServer (by the same company) which is the networking tech supporting the upcoming Warhammer 40k MMO.

    Client SOI issues aside, there is nothing stopping me plonking my server straight into a pikkoserver solution and having it load-balanced across dozens of physical servers, allowing it to process an MMO-scale environment. Given that one-man-MMO's just don't get made, that's not something I'm planning to do, but it's nice to have as an option


    Once the MP Alpha is ready for abuse by forumites, I'll sort out some hosting to hold a death-match style test of the environment. I won't be throwing out the server for others to use until I at least have some form of version tracking integrated into connection negotiations.
    Last edited by Nicholai Pestot; October 25 2013 at 11:35:25 AM.

  16. #16
    Super Moderator Global Moderator QuackBot's Avatar
    Join Date
    March 7, 2012
    Posts
    19,556
    Quote Originally Posted by Equium Duo View Post
    You are a hero, is the "server" a standalone application or is it a client that acts as the server? If that makes sense?
    If i have to spend stupid amounts of points to do it standalone.

  17. #17

    Join Date
    April 9, 2011
    Location
    2006
    Posts
    3,849
    Quote Originally Posted by QuackBot View Post
    Quote Originally Posted by Equium Duo View Post
    You are a hero, is the "server" a standalone application or is it a client that acts as the server? If that makes sense?
    If i have to spend stupid amounts of points to do it standalone.
    Tell me about it Quackers. Tell me about it.

  18. #18
    Donor Rami's Avatar
    Join Date
    April 10, 2011
    Location
    London/Snuffbox
    Posts
    1,276
    Nicolai, are you sharing codebase? With the holidays coming up I feel guilty for not having paid more attention to this subforum (in my defense nobody poked me and I forgot about it for ages). That does imply the code is visible to other members who help out though. Happy to pay for a secure git if needed.


    Location: My Genolution 'Auroral' AU-79, inside a Macharial, some docking bay, Sujarento VIII - Moon 1 - Republic Security Services Assembly Plant, Sujarento (Naught point three), Isoma Constellation, The Citadel (Caldari State), New Eden, Eve Online, Tranquility, some servers in a datacenter, London, United Kingdom, Europe, Earth, Sol system, the Milky Way, Local Group, the Virgo Supercluster, the Universe, (potentially) the Multiverse

  19. #19

    Join Date
    April 9, 2011
    Location
    2006
    Posts
    3,849
    I'm not sharing the codebase at the moment.

    I did ask for coding help at the start, but no-one stepped forward to assist so I didn't bother setting stuff up for easy cooperation . Since then I've purchased some additional third-party add-ons so I'm going to have to go over their license details to see what impact that will have.

    With the arrival of my first born son 3 weeks ago I've been a little slack on the coding and have done nothing since the 29th of October. I'll be diving back into this again in a few days so I'll see if I can sort something out then.

  20. #20
    Donor Rami's Avatar
    Join Date
    April 10, 2011
    Location
    London/Snuffbox
    Posts
    1,276
    Roger that, unfortunately as this is a subforum in a subforum my front page doesn't show it (and I generally venture into gen. games only). Consider this an open offer, for when you feel ready to take on some extra hands

    Congrats on the newborn, best feeling ever c/c?


    Location: My Genolution 'Auroral' AU-79, inside a Macharial, some docking bay, Sujarento VIII - Moon 1 - Republic Security Services Assembly Plant, Sujarento (Naught point three), Isoma Constellation, The Citadel (Caldari State), New Eden, Eve Online, Tranquility, some servers in a datacenter, London, United Kingdom, Europe, Earth, Sol system, the Milky Way, Local Group, the Virgo Supercluster, the Universe, (potentially) the Multiverse

Bookmarks

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
  •