Jump to content

View more

Image of the Day

WIP title screen for #DeathOfAPartisan #screenshotsaturday #gamedev https://t.co/qJNhfZCvd4
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.

Sign up now

Linux development workflows?

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
7 replies to this topic

#1 Peppit   Members   


Posted 19 July 2014 - 05:11 PM

I'm sort of curious if anyone here develops on linux, and if they do, what do you use? Does anyone use vim/emacs as their "IDE"? How much boilerplate did you have to write?

#2 TheChubu   Members   


Posted 19 July 2014 - 05:17 PM

switch ( Platform.get() )
    case WIN:
        bpp = 32;
    case MAC:
        bpp = 32;
    case NIX:
        bpp = 24;
        bpp = 24;

And that's about it in my case (bpp is bits per pixel btw, turns out Windows/OSX defaults to 32 whereas *nix platforms default to 24).

Edited by TheChubu, 19 July 2014 - 05:17 PM.



My journals: dustArtemis ECS framework and Making a Terrain Generator

#3 Bacterius   Members   


Posted 19 July 2014 - 07:15 PM

What kind of boilerplate?

“If I understand the standard right it is legal and safe to do this but the resulting value could be anything.”

#4 Oolala   Members   


Posted 19 July 2014 - 08:33 PM

Honestly, unless I'm sealed into developing on linux, which is rare, I'll program on windows in a cross-platform fashion, and port.  It sounds dumb, but it really doesn't take that much effort to be cross-platform, outside of video/audio and sometimes networking, and sometimes threading, that it just isn't worth using things that lock you in to one platform or another.  If you're like me, and primarily working on back-end stuff or tools, there just isn't much justification for doing platform specific work.

#5 SeraphLance   Members   


Posted 19 July 2014 - 09:04 PM

I usually program windows-only, partly because my Linux workflow kind of sucks, but for comparison, this is what I use:




Editor:  For small tasks -- vim.  Larger tasks I open SublimeText for.

Compiler:  Usually gcc, but I've been toying with clang lately

Source Control:  hg (since I use bitbucket a lot)

Debugger:  command-line gdb)

Build System:  make;  More specifically, I have a non-recursive makefile that works as a great drop-in with very little customization.  I only need to specify the executable name and obscure library flags (like -lm for gcc).  All my external dependencies are handled with dependency generation features in gcc and fancy makefile macros.



Basically the same as C++ with no debugger or build system stuff.



It's kind of a pain.  While the tools are good, the system as a whole isn't cohesive enough (unix philosophy and all that) for the really nice stuff like goto definition, refactoring, or building/debugging in-editor.  So on that level, while Sublime is awesome and all, I strongly recommend finding an ide, unix philosophy be damned.


EDIT:  I should probably add that my Linux stuff all falls into two things:  homeworks from college or cross-platform stuff that I also use on windows.  As such, I generally only work on the Linux side when I need to make it work for Linux.

Edited by SeraphLance, 19 July 2014 - 09:06 PM.

#6 SeanMiddleditch   Members   


Posted 19 July 2014 - 09:37 PM

outside of video/audio and sometimes networking, and sometimes threading

Even those are all easy enough to make portable. Use OpenGL, an audio library like FMOD or Wwise, and Boost/STL threading or a library like Intel's Threading Building Blocks. IO can be done via PhysicsFS, Boost/STL, and so on as well. All the windowing and input is handled by all the common window-system libraries like SDL.

Does anyone use vim/emacs as their "IDE"?

When I used Linux as a desktop/development OS (which I haven't for some years) I used Vim exclusively. These days a lot of people swear by QtCreator which also runs on Windows and OSX so it's a decent choice for a cross-platform IDE. I can't really stand any IDE I've put time into aside from Visual Studio anymore, though, though Sublime Text (which runs on Linux) make a good run.

How much boilerplate did you have to write?

The boilerplate is no more or less on Linux than it is elsewhere when you use a window-system toolkit like SDL2, GLFW, SFML, etc. and a build system tool like CMake. If you're writing raw OS API code (Win32, X11, etc.) there's tons of boilerplate to write but there's really no good reason to ever do that these days.

Game Developer, C++ Geek, Dragon Slayer - http://seanmiddleditch.com

C++ SG14 "Games & Low Latency" - Co-chair - public forums

Wargaming Seattle - Lead Server Engineer - We're hiring!

#7 Karsten_   Members   


Posted 20 July 2014 - 07:01 AM

Since I started out with programming on UNIX I tend to use that same development environment even when on Windows.

In a typical Linux/UNIX project I generally find all of these tools useful.

Editor: Vim - Including the NETRW and Buffergator plugins. Helps navigating scattered source bases quickly. More importantly, it does not require a "project file" for source aware navigation to work. My biggest annoyance with Visual Studio or other IDEs.

Code completion / Navigation
- exuberant ctags (Vim supports by default now).
- cscope (performs some tasks ctags cannot)
- doxygen (With C the automatic flow chart generator is fantastic for development and learning codebases)

- gcc for main releases
- Any compiler I can get my hands on since they all potentially pick up on different issues.

Build System:
- cmake
- simple Makefiles for release builds and test harness

Continuous Integration: Jenkins on a bunch of VMs targeting many platforms

Misc: tmux for multiple terminals

Debuggers / Profilers:
- Valgrind
- gdb
- ElectricFence
- Intel VTune
- AddressSanitizer
- splint

Arguably GLX requires less boilerplate code than Windows alternatives when setting up an OpenGL rendering context.


You may notice it has a line count close to when using Glut.

Edited by Karsten_, 20 July 2014 - 07:08 AM.

http://tinyurl.com/shewonyay - Thanks so much for those who voted on my GF's Competition Cosplay Entry for Cosplayzine. She won! I owe you all beers :)

Mutiny - Open-source C++ Unity re-implementation.
Defile of Eden 2 - FreeBSD and OpenBSD binaries of our latest game.

#8 Ravyne   Members   


Posted 20 July 2014 - 01:25 PM

Honestly, my development experience on Linux is mostly as a kind of playground. That is, the kind of coding I do there is mostly recreational -- messing around with Arduinos or other embedded stuff who's tool chain runs best on *nix, exercising my more 'academic' language pursuits like Haskell, or playing with neat linux stuff like Docker. Because I'm not so concerned with efficiency then, that informs some of my other choices. I use Vim not because I find it to be instantly productive, but because leaning Vim is a goal in itself -- its simply useful to know at least one lightweight text editor that you can use even from a remote text console -- and because the long walk leads to becoming possibly more efficient than WYSIWYG editors and fancy IDEs.


In general I like Linux because its a more 'orthogonal' environment in some sense of the word. The trend on Windows (and old-world Macs, the trend has reversed since OS X) has been towards more monolithic, swiss-army-knife applications, or to largely independent 'kingdoms' of apps that inter-operate nicely. The trend on *nix has always been towards a more inter-operable ecosystem of smaller and more focused tools that do one thing very well. It goes beyond the apps themselves though -- even where windows has functional equivalents (say grep vs. findstr) the command-line apps on Windows all use wildly-different argument formats, and not every app necessarily supports piping in ways it ought to. The *nix world largely has that problem sorted.

throw table_exception("(ノ ゜Д゜)ノ ︵ ┻━┻");

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.