Jump to content
  • Advertisement

Project: Unsettled World

C# meet Linux, Linux meet C#.. Play nice now!



Well, since adopting the KV database into my server architecture I've begun to rethink many of my earlier assumptions, one of them being that I would continue developing my servers on Windows until I was past alpha stage...  Since I've already brought a Linux solution into the core of the architecture, now is the best time to rewrite the servers to meet their life-long hosts.  Not only that, it's a good opportunity to rethink and retouch some bits and bytes.

So, using the same CentOS7 VM I'm running redis on, I'll begin the process using what appears to be a fairly polished version of Visual Studio for Linux (Visual Studio Code) https://code.visualstudio.com/

But first, because I installed from the minimal distribution.. Gonna need a Gui.

yum groupinstall "GNOME Desktop"

Gotta get all Microsofty with it next..

Here's the Microsoft repos to install the dotnet sdk: https://docs.microsoft.com/en-us/windows-server/administration/linux-package-repository-for-microsoft-software

Got those installed and then:

yum install dotnet-sdk-x.x.x


To get the sdk commands to work I did have to manually install 'libunwind-devel' as the ONLY missed prerequisite in this whole process.  If you know anything about installing non-standard packages on linux, that's fairly impressive.

I installed VSC from Microsoft's downloadable .rpm file.  It actually had a reasonable number of STANDARD package dependencies, and didn't miss any...  I'm still in shock.


All in all, so far, I have to say I'm quite impressed with the progress that Microsoft's cross platform tools have made in the last few years...  I haven't tried to do anything like this (.net on linux) in probably 4 or 5 years, but it was fairly crap back then...  That's probably another reason I was initially putting off the rewrite for Linux.

Now, well, you know where I'll be. ;)



Recommended Comments

I'm really impressed with .Net core 2.x . I also just ported my game server to .Net Standard / Core and only had a few minor issues due to slashes and case-sensitivity in paths.

What is your reason for choosing to develop on Linux too? Do you find Visual Studio Code is a viable alternative to Visual Studio Community?

Share this comment

Link to comment

I'm developing for Linux because I prefer it in the production server environment, it's consistent, secure, and FLEXIBLE.  I think VSCode is certainly a viable alternative, but I also think it has some room to mature.  The interface is still a little clunky too, but truthfully, that's probably just because I've been using Visual Studio on  Windows for years now and my perception is skewed.  They've still got some work to do to make it behave properly in an environment with multiple users though, it's got some permissions problems here and there.  Nothing major that inhibits development on the individual scale though. :D

Share this comment

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Advertisement
  • What is your GameDev Story?

    In 2019 we are celebrating 20 years of GameDev.net! Share your GameDev Story with us.

    (You must login to your GameDev.net account.)

  • Blog Entries

  • Similar Content

    • By Sambo Hobbs
      Hi there,
      I'm new to gamedev.net, but I have a question.
      If I don't have all OS types, but I know that I can build to all of them.
      How do I know what are the min and recommended specs to tell Steam?
      My game Super Kittens is a game developed in Unity engine and it will be released on 28th Feb 2019.
      It is a family friendly first person game.
      Thanks Sam
    • By Transcendent
      So this is the problem that I have :- https://youtu.be/kU8Dm5bDJXg
      This is the code i am using:-
      using System.Collections; using System.Collections.Generic; using UnityEngine; namespace SA { public class AnimatorHook : MonoBehaviour { Animator anim; StateManager states; public void Init(StateManager st) { states = st; anim = st.anim; } void OnAnimatorMove() { if (!states.canMove) anim.ApplyBuiltinRootMotion(); states.rigid.drag = 0; float multiplier = 1; Vector3 delta = anim.deltaPosition; delta.y = 0; Vector3 v = (delta * multiplier) / states.delta; states.rigid.velocity = v; } } } For additional reference see the following code
      using System.Collections; using System.Collections.Generic; using UnityEngine; namespace SA { public class StateManager : MonoBehaviour { [Header("Init")] public GameObject activeModel; [Header("Inputs")] public float vertical; public float horizontal; public float moveAmount; public Vector3 moveDir; public bool rt, rb, lt, lb; [Header("Stats")] public float moveSpeed = 5f; public float runSpeed = 8f; public float rotateSpeed = 20; public float toGround = 0.5f; [Header("States")] public bool onGround; public bool run; public bool lockOn; public bool inAction; public bool canMove; [Header("Other")] public EnemyTarget lockOnTarget; [HideInInspector] public Animator anim; [HideInInspector] public Rigidbody rigid; [HideInInspector] public AnimatorHook a_hook; [HideInInspector] public float delta; [HideInInspector] public LayerMask ignoreLayers; float _actionDelay; public void Init() { SetupAnimator(); rigid = GetComponent<Rigidbody>(); rigid.angularDrag = 999; rigid.drag = 4; rigid.constraints = RigidbodyConstraints.FreezeRotationX | RigidbodyConstraints.FreezeRotationZ; a_hook = activeModel.AddComponent<AnimatorHook>(); a_hook.Init(this); gameObject.layer = 8; ignoreLayers = ~(1 << 9); anim.SetBool("onGround",true); } void SetupAnimator() { if(activeModel == null) { anim = GetComponentInChildren<Animator>(); if(anim == null) { Debug.Log("no model found"); } else { activeModel = anim.gameObject; } } if(anim == null) { anim = activeModel.GetComponent<Animator>(); } //anim.applyRootMotion = false; } public void FixedTick(float d) { delta = d; rigid.drag = (moveAmount > 0 || !onGround) ? 0 : 4; DetectAction(); if (inAction) { // anim.applyRootMotion = true; _actionDelay += delta; if(_actionDelay > 0.3f) { inAction = false; _actionDelay = 0; } else { return; } } canMove = anim.GetBool("canMove"); if (!canMove) { return; } //anim.applyRootMotion = false; float targetSpeed = moveSpeed; if (run) targetSpeed = runSpeed; if(onGround) rigid.velocity = moveDir * (targetSpeed * moveAmount); /* if (run) lockOn = false; */ Vector3 targetDir = (lockOn == false) ? moveDir : lockOnTarget.transform.position - transform.position; targetDir.y = 0; if (targetDir == Vector3.zero) targetDir = transform.forward; Quaternion tr = Quaternion.LookRotation(targetDir); Quaternion targetRotation = Quaternion.Slerp(transform.rotation, tr, delta * moveAmount * rotateSpeed); transform.rotation = targetRotation; anim.SetBool("lockon", lockOn); if (lockOn == false) HandleMovementAnimations(); else HandleLockOnAnimations(moveDir); } public void DetectAction() { if (canMove == false) return; if (rb == false && rt == false && lt == false && lb == false) return; string targetAnim = null; if (rb) targetAnim = "Sword And Shield Attack"; if (rt) targetAnim = "Stable Sword Outward Slash"; if (lb) targetAnim = "Standing Melee Attack Horizontal"; if (lt) targetAnim = "Sword And Shield Slash (1)"; if (string.IsNullOrEmpty(targetAnim)) return; canMove = false; inAction = true; anim.CrossFade(targetAnim,0.2f); //rigid.velocity = Vector3.zero; } public void Tick(float d) { delta = d; onGround = OnGround(); anim.SetBool("onGround", onGround); } void HandleMovementAnimations() { anim.SetBool("run", run); anim.SetFloat("Vertical", moveAmount ,0.4f,delta); } void HandleLockOnAnimations(Vector3 moveDir) { Vector3 relativeDir = transform.InverseTransformDirection(moveDir); float h = relativeDir.x; float v = relativeDir.z; anim.SetFloat("Vertical", v, 0.2f, delta); anim.SetFloat("Horizontal", h, 0.2f, delta); } public bool OnGround() { bool r = false; Vector3 origin = transform.position + (Vector3.up * toGround); Vector3 dir = -Vector3.up; float dis = toGround + 0.3f; RaycastHit hit; if(Physics.Raycast(origin,dir,out hit,dis)) { r = true; Vector3 targetPosition = hit.point; transform.position = targetPosition; } return r; } } } I've been stuck on this for too long, any help will be highly appreciated
    • By HundredTai
      In the attached picture an intersection block is shown. My goal is to have the player switch lanes and (within the red bounding box) turn direction on a different road while always keeping a forward movement. Therefor the only input is left and right. The changing of the lanes has to happen quick and snappy (dependant on the player's overall speed) as visualized by the black squigly line. 
      However I'm not sure how to implement this. I tried moving left and right with coroutines but got stuck at going back to the lane one came from mid-changing. I added those nodes at the ends with the intention to lerp/move towards depending on the lane and road the player changes to but that won't work with the aforementioned quick snappy movement. Another thought that passed was creating a bit of a node graph and dynamically make a spline when switching lanes but this seems a bit overkill for what it really is (?). Finally I figured creating an object that the player controls but doesn't see that the actual player objects follows that's slightly infront of the object but haven't gotten to that yet due to too much doubts of implementation.
      The player should not be constrained. If they whish to change back to a lane halfways through changing lanes that should be possible. 
      Would like to hear some suggestions no mather how out there they might seem. Thanks!

    • By Turbo14
      I'm having some problems with path-tracing code. Not sure if it's from the random number generator or what. but my projected rays don't "stick" to surfaces.

      Here's what I'm doing:

      what I want is the hit points to appear to "stick" to surfaces but instead they're flying all around. The only time they stick is when I strafe. No idea what I'm doing wrong.

      void Update () {
      m_Clear_Buff.CopyTo(m_Color_Buff, 0);

      m_main_Cam.enabled = false;
      m_Trace_Cam.enabled = true;
      System.Random r = new System.Random(98);

      for (int i = 0; i < 300; i++)
      Vector3 dir = new Vector3((float)r.Next(360) /360f-.5f, (float)r.Next(360) / 360f - .5f, (float)r.Next(360) / 360f - .5f);

      Ray ray = new Ray(new Vector3(0,0,0), dir);
      RaycastHit rch;
      if (Physics.Raycast(ray, out rch, 50f))

      Vector3 sp = m_Trace_Cam.WorldToScreenPoint(rch.point);

      if (sp.x >=0 && sp.x < m_Trace_Cam.pixelRect.width-1 && sp.y >=0 && sp.y < m_Trace_Cam.pixelRect.height-1)
      float lv = Mathf.Max(Vector3.Dot(rch.point.normalized, new Vector3(0, 0, 0)), 0);
      lv *= 10;

      Material m = rch.collider.gameObject.GetComponent().material;
      m_Color_Buff[(int)(sp.x + sp.y * m_Trace_Cam.pixelRect.width)] = new Color(m.color.r * lv, m.color.g * lv, m.color.b * lv,1);
      m_Trace_Cam.enabled = false;
      m_main_Cam.enabled = true;

    • By sidbhati32
      https://www.youtube.com/watch?v=xuKz-komT5I&t=12s     hey     How to achieve the horizontal swipe somewhat close to the video?      

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!