Live data from Hacker News

Windows game developer about porting to and using OS X

shiningrocksoftware.com

91–100 of 205 posts

Re: Windows game developer about porting to and using OS X

#92
post #64
post #2

Xcode isn’t too bad. I wish the author told me more about it than just this. Can somebody comment on how it compares to recent VS editions these days? About 5 years ago I also looked into using OSX as main OS. As I've always been using non-commandline graphic text editors and IDEs for most coding that made XCode the go-to environment but I just couldn't deal with it even though I tried. I don't remember all details b…

I use both on a regular basis, VS for my job and XCode for hobby work. I prefer VS because it performs better when editing and navigating the code base ( it is actually faster to run in it inside VirtualBox than XCode natively ). Also VS has code navigation and editing features that XCode lacks. For instance if you want to do a find/replace in VS you can double click on a word do Ctrl+H and the word you selected popu…

>For instance if you want to do a find/replace in VS you can double click on a word do Ctrl+H and the word you selected populates the search box

I'm fairly sure Xcode has a command "enter search/replace string" that puts the current selection into the search/replace box.

Re: Windows game developer about porting to and using OS X

#93
post #64

Earlier quoted context omitted.

I use both on a regular basis, VS for my job and XCode for hobby work. I prefer VS because it performs better when editing and navigating the code base ( it is actually faster to run in it inside VirtualBox than XCode natively ). Also VS has code navigation and editing features that XCode lacks. For instance if you want to do a find/replace in VS you can double click on a word do Ctrl+H and the word you selected popu…

In regards to the find and replace, you can actually rename a variable or function by placing your cursor in it and hitting Cmd+Ctrl+E (that may not be the right shortcut, but I know there is one). No danger of changing something you didn't want to change. As far as the file stack goes, I'm not really sure what that does; but Xcode has other navigation options, like tabs, and files can be switched with the fuzzy find…

>In regards to the find and replace, you can actually rename a variable or function by placing your cursor in it and hitting Cmd+Ctrl+E (that may not be the right shortcut, but I know there is one).

This only performs a rename in the current file though, not across all files in the current project. (At least in Xcode 5, maybe this has been changed in more recent releases.)

Still it is really useful.

Re: Windows game developer about porting to and using OS X

#94

> Apparently my vi command muscle memory hasn't faded. Back in the day I did most of my dev work on Solaris. I then spent 4 years as CTO as a startup that was pretty much only Windows. When I subsequently went back to working at a unix shop I was initially struggling with vi as I tried to read some of the C++ code. I couldn't remember commands, was having to refer to the man pages every few mins. It was torture. A co…

This always happens to me with passwords. I have trouble remembering some passwords. Yet, when I'm in front of the page and I actually need to get in, either I lose some focus and let my unconsciousness do the work or I won't get it right.

Heh, a few weeks ago I realised that I'd become unsure about my email password (almost never have to log in). So I logged out and tried to log back in, trying every possible combination, keeping track of them on paper. I had to give up, turns out that I was way out. The next day I wanted to check my emails and typed in the password immediately.

Re: Windows game developer about porting to and using OS X

#95
post #74

I’m not using SDL or any other library to hide those platform differences. Once start working on Linux port he'll regret about that. Every developer that start with own platform-specific code end up using SDL2 anyway. Don't do that mistake.

Furthermore SDL2 is absolutely fantastic and just works. You may say, you do not want to use it as it "just" abstracts away keyboard/mouse/controller input, window and GL context creation but these things are damn hard to get right.

Also, your game will continue working natively when linux transitions to using wayland/mir, without having to run via an X11 shim.

Re: Windows game developer about porting to and using OS X

#96
post #95

Earlier quoted context omitted.

Furthermore SDL2 is absolutely fantastic and just works. You may say, you do not want to use it as it "just" abstracts away keyboard/mouse/controller input, window and GL context creation but these things are damn hard to get right.

Also, your game will continue working natively when linux transitions to using wayland/mir, without having to run via an X11 shim.

This is true for the alternatives as well, approximately nobody writes raw Xlib apps in modern times.

Re: Windows game developer about porting to and using OS X

#97
post #64

Earlier quoted context omitted.

I use both on a regular basis, VS for my job and XCode for hobby work. I prefer VS because it performs better when editing and navigating the code base ( it is actually faster to run in it inside VirtualBox than XCode natively ). Also VS has code navigation and editing features that XCode lacks. For instance if you want to do a find/replace in VS you can double click on a word do Ctrl+H and the word you selected popu…

>For instance if you want to do a find/replace in VS you can double click on a word do Ctrl+H and the word you selected populates the search box I'm fairly sure Xcode has a command "enter search/replace string" that puts the current selection into the search/replace box.

I would love to know how to do this.

Re: Windows game developer about porting to and using OS X

#98
post #12

>unix-like Not just unix-like, OS X is certified UNIX.

Yeah, I guess the author meant more like "very similar to Unixes (unices?) I've used before", which quite possibly means 'various Linux distros'. Aside from official certification, OSX is still sufficiently different to make this mistake forgivable, and not just in terms of the UI. The filesystem organisation is unusual, to say the least.

Maybe we should start calling Unix variants 'Linux-like'.

Re: Windows game developer about porting to and using OS X

#99
post #54

Earlier quoted context omitted.

Yes, it means that someone payed money for a useless certificate. Nothing more, nothing less. BTW, Linux is UNIX too! http://www.opengroup.org/openbrand/register/brand3596.htm https://en.wikipedia.org/wiki/Inspur_K-UX

Yes, the certificate is useless Unfortunately some people will only sign big cheques if the given useless certificate is present

Hey, before you call certificates like that 'useless' just think of the thousands of government jobs that depend on them!

Re: Windows game developer about porting to and using OS X

#100
I recently went through a very similar process porting my screensaver [1] from Windows to Mac without using a library like SDL. Here are some additional difficulties I encountered during this process:

OpenGL on multiple monitors - this was much more difficult to do on MacOS. I had to create a separate window for each monitor, create a rendering context for each window, make sure my graphics code was issuing the drawing commands to the proper context, then have each context queue/batch "pending" rendering commands and issue them all at once at the end of a frame on a by-context basis. Whereas on Windows you can pretty much create a window that spans multiple monitors and draw to it with a single rendering context.

Input - I used DirectInput on Windows and wrangled a suitable implementation using HID Utilities on Mac, which was not easy given my lack of previous USB programming experience. A major annoyance was the lack of a device "guid" that you can get via HID Utilities to uniquely identify an input device - I had to manually contruct one using (among other things) the USB port # that the device was plugged into. Not ideal.

SSE intrinsics - my experience was that Microsoft's compiler was MUCH better at generating code from SSE/SSE2 intrinsics then clang - my Windows SSE-optimized functions ran significantly faster then my "pure" C++ implementations, where as the Mac versions ran a bit slower! My next thought was to take this particular bit of code gen responsibility away from clang and write inline assembly versions of these functions, but I took a look at the clang inline assembly syntax and decided to skip that effort. (I did write an inline assembly version using the MS syntax and squeezed an additional 15% perf over the MS intrinsic code.)

Prtty much everything else (porting audio from DirectSound to OpenAL, issuing HTTP requests, kludging up a GUI etc) was pretty straight forward/did not have any nasty surprises.

[1] http://www.ubernes.com/nesscreensaver.html

Post reply on HN