Sign in to follow this  

Would it make sense for me to develop on virtual machine? (And question on Linux distros)

This topic is 1180 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

2

I know virtualization is used if you are targeting something like a console, but in this case I am developing with desktop computers in mind: SDL2 for linux/windows/mac.

 

Currently I run Linux Mint, and have been programming on it, but I have been interested in running a virtual machine as I use this computer for other day-to-day purposes. Would a virtual machine allow a better 'sandbox' environment for my development purposes?

 

I have about 0 experience with setting up and running virtual machines; two options I have been made aware of are VirtualBox and LXC.

 

Mint serves my purposes fairly well and I recently upgraded to 17 Qiana (which should be supported for several more years). In building some open source repositories, I have found things like the gcc included in buildessential may not be the latest version (I have 4.8.2, it appears I would have to manually install the latest 4.9.1). Does the 'rolling distro' nature of Arch make it easier to stay up-to-date on these things? or does it merely mean that I would never have to 'install' a new version of Arch?

Edited by PrestoChung

Share this post


Link to post
Share on other sites

Why are you looking for a sandboxed environment?

 

Anyway, you can use a virtual machine and it shouldn't be a problem for most things, but you may encounter some limitations. Some years ago I was working with OpenGL and the virtual machine (WIndows XP in the host PC, Ubuntu in the virtual PC) had some issues. The code wouldn't even run, I don't remember the exact error, but was related to the virtualized hardware.

 

Recently I was working on a company where we had a virtual machine with Mac OSX so we could compile and test (within a simulator runing on the virtual machine tongue.png) some apps, and it worked.

Edited by DiegoSLTS

Share this post


Link to post
Share on other sites

With what Truerror said above, dual-booting would probably be ideal, depending on why you're wanting to use a virtual environment. If it's for testing and cross-compiling, personally, I find it easier to just dual boot. Doubly so if you have an extra hard-drive laying around.

 

Are you considering a VM just to do testing on each linux distro, or for other reasons? If it's for testing, I could see how that would be handy to see where the folders are and which libraries are included by default. If you're considering just using a VM for another linux distro just to get the updated libraries, I would recommend just updating the libraries you need manually instead (or if this is for making different packages, you're likely going to want to just include the libraries with your game, I would think). I personally wouldn't switch distros just to avoid updating libraries periodically.  Unless you're really hard pressed for disk space, most libraries are rather small, relatively speaking, and bloat shouldn't be too much of a concern. 

 

GCC you can update for any distro, I believe. It's also relatively easy to update (especially if you use synaptic), even if the stock installation doesn't have the latest version. I don't have a ton of experience with VM's but, if it's for testing, you may not get the best results, performance wise.

 

One little note, if you do dual boot a windows drive, Windows is going to bork your grub loader. So, either install windows, then reinstall your linux side, or you'll need to look into how to repair Grub. There's a grub fix program somewhere out there, but I don't have a link to it handy at the moment.

Edited by Misantes

Share this post


Link to post
Share on other sites

In my setup for cross-platform development I'm using both virtualization *and* dual-boot (iMac + VMware). Even though i also use SDL2 there are a lot of cross-platform issues to deal with, it's super convenient to just push a git commit to the virtual machine and verify that the build is ok. But for performance testing I rather dual boot and profile in the native environment.

Share this post


Link to post
Share on other sites

I use VMware-Player since many years for developing games in VM. Mostly with Ogre3D and "Madewithmarmalade"-SDK. It works great.

Host and guest are both Windows 7. The VM-Image is on an external harddisc (connected now with USB 3.0) which i take with me and use it on several Computers on different Locations.

Share this post


Link to post
Share on other sites

I would strongly recommend using a VM for what you're trying to do.  VirtualBox, VMWare, they're all good. LXC is not a VM: you'll run into video driver grief sooner or later if you use it like one.  Also, you can run Windows in a VM.  You will want to make sure you have plenty of RAM and extra disk space.

 

You may find there are video driver issues inside the VM:  it's rare, but it does happen.  For full video driver testing, you will need to use bare metal.  For everything else, VM is what you want.  Video driver == OpenGL support.  You want not only bare metal, but a selection of Intel, AMD, and nVidia hardware of different generations.  If it works in the VM, it'll work elsewhere.

 

I develop on Ubuntu exclusively (it's in my job description):  the current dev release is always a rolling release (so it has the current leading edge kernel, video drivers, toolchain, etc) but it's different enough and incompatible enough from the latest stable release that I have two separate systems for testing backports from dev to stable.  Upgrading a stable system with something not in the archive (new toolchain, for example) is enough to possibly destabilize it and you're going to get real sad after a while.

Share this post


Link to post
Share on other sites

9

 

 


LXC is not a VM: you'll run into video driver grief sooner or later if you use it like one.

 

Are video drivers the only issue to worry about? I'm thinking of, for instance, if I'm just working on a command-line server for my game (SDL_net) and not using any graphics rendering.

 

Edit: crud, looks like there might not be haskell bindings for SDL_net

Edited by PrestoChung

Share this post


Link to post
Share on other sites

This topic is 1180 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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

Sign in to follow this