Porting to Monogame

Discussion in 'Development News' started by Afr0, Apr 28, 2013.

Thread Status:
Not open for further replies.
  1. RHY3756547

    RHY3756547 FreeSO Developer Staff Member Moderator

    OK, so I just found out that this bug is being caused by the screen being started by the network thread instead of the game thread:
    upload_2015-1-25_22-22-47.png
    I suspect a lot of other surprise crashes have been happening this way occasionally in the normal build too! (modifying things in use while ui is drawing). What we should do is keep the thread for receiving packets, but then send them to a queue which is read and run through in the game thread just before the game update loop. This will keep our client code simple and cost barely anything performance wise - since processing input packets instantly is not important for this game.
  2. RHY3756547

    RHY3756547 FreeSO Developer Staff Member Moderator

    upload_2015-1-26_23-58-54.png
    Running on latest networked version. City view crashed for me and now I can't get back in to test the messaging.
  3. RHY3756547

    RHY3756547 FreeSO Developer Staff Member Moderator

    This most likely means that we'll be moving to monogame really soon, to avoid further stupid merge conflicts.

    Afr0 - make sure that you have Visual Studio 2010 and start using the tso.client.sln build. You don't really need windows phone SDK, but you need to remember to build content via Project-Dollhouse\TSOClient\tso.client\Content\TSOClientContent.mgcb.

    I'm gonna try make all the networked stuff attempt to run on the game thread.
  4. RHY3756547

    RHY3756547 FreeSO Developer Staff Member Moderator

    upload_2015-1-27_0-7-18.png
    In city view - nobody's online so I can't test the messaging though. :I
  5. xXJDrocks450Xx

    xXJDrocks450Xx Well-Known Member

    Yeah, ahh about that :p
  6. RHY3756547

    RHY3756547 FreeSO Developer Staff Member Moderator

    Okay, so that's working. Still need to unthread the network handlers:

    Attached Files:

  7. RHY3756547

    RHY3756547 FreeSO Developer Staff Member Moderator

    I didn't get to finish talking there due to a monogame 3.3 crash bug involving the graphics context, but what I was going to say is that you can see the smooth shadow movement, as it should be in Simantics & Lot Debug mode.
    xXJDrocks450Xx likes this.
  8. xXJDrocks450Xx

    xXJDrocks450Xx Well-Known Member

    I'm going to be free for the next 2 day due to a Blizzard... If u need to test messaging more I can help... ;)
  9. RHY3756547

    RHY3756547 FreeSO Developer Staff Member Moderator

    Finished. As you can see, there are no more magenta borders and this version should actually crash less than the XNA one as a result!
    upload_2015-1-27_3-16-2.png
    (apart from this on monogame 3.3)
    upload_2015-1-27_3-16-41.png
  10. RHY3756547

    RHY3756547 FreeSO Developer Staff Member Moderator

    Merged! Here's the final pull request, with info on how to build. The error above does not appear on MonoGame 3.2, so we should stay on that for now.

    https://github.com/Afr0/Project-Dollhouse/pull/119

    Gonna lock this thread now, since the port is pretty much complete.
    aidancheddar likes this.
  11. Afr0

    Afr0 Well-Known Member

    We should definitely move to VS2k13.
    I just don't know if I can be arsed trying to put it all together, so maybe I will just get VS2k10 for now, even if I really love...

    Fuck!
    I hope VS2k13 will load VS2010 projects, otherwise it means I'll have to install VS2010 on the servers. :mad:
Thread Status:
Not open for further replies.

Share This Page