Live data from Hacker News

Windows game developer about porting to and using OS X

shiningrocksoftware.com

141–150 of 205 posts

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

#141
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…

I haven't used VS in many years, but I like what you describe. I don't know if this will be helpful, but these are my alternatives in Xcode: > 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. Your workflow sounds nicer than Xcode's here. While I don't often use find+replace, I do use project level find constantly. My muscl…

You can use Cmd+E to directly insert the selected text into the search buffer, so for the Project-Wide search you wind up with the shorter sequence:

Cmd+E, Cmd+Shift+F, Return

This sequence seems to work in many other apps, I don't know if it's a system command or just a common convention.

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

#142
post #104
post #96

Earlier quoted context omitted.

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

Unfortunately most of game developers that decide against use of SDL2 do that based on their experience of Windows development where it's pretty much standard to have own code for everything (except development tools and some middleware). E.g they think that their own code going to take less lines and be cleaner than SDL. As result these people usually don't even consider any alternatives as all of them even worse fr…

... And those developers are generally right.

I would use SDL in Linux ports of things because it is the closest to a reasonable native API on Linux (which says more about Linux than SDL actually). But even having done so I would then use native APIs in Windows, OSX, etc.

If your standard of quality is high enough, it won't really be possible to reach it using a blanket API like SDL everywhere.

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

#143
post #14

Earlier quoted context omitted.

I don't have the links with me, but I've read somewhere that this happens because Windows uses DirectX, whereas OS X uses OpenGL. I assumed this is because Game Engines are built usually targeting Windows/DirectX. Some say that DirectX is more mature and powerful, although this might be subjective. And so the games perform better on Windows. FYI, With the advent of Vulkan, maybe subjective opinion that DirectX is bet…

This particular game uses OpenGL on both Windows and OS X.

If you don't have OpenGL drivers from your graphics card, I believe Windows still does OpenGL as a shim over DirectX.

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

#144
post #111

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.

As a current SDL2 user: it is not fantastic and it does not just work. - On Windows, DPI scaling is broken (ask for a 1280x720 window, get 1600x900) - On Mac, mouse locking is broken - On Linux, my Xbox gamepads don't work at all - Required several hacks before it could be used as a CMake submodule This stuff is under active development, which is shocking for such an established and widespread library. I'm glad it ex…

Have no idea about DPI on Windows, but from my experience mouse locking on OS X worked and my Xbox pad works for sure (checked just month ago or so). I know about some issues with force feedback, but not sure if those are even SDL issue.

PS: What OS X version you had problem with?

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

#145
post #142
post #104

Earlier quoted context omitted.

Unfortunately most of game developers that decide against use of SDL2 do that based on their experience of Windows development where it's pretty much standard to have own code for everything (except development tools and some middleware). E.g they think that their own code going to take less lines and be cleaner than SDL. As result these people usually don't even consider any alternatives as all of them even worse fr…

... And those developers are generally right. I would use SDL in Linux ports of things because it is the closest to a reasonable native API on Linux (which says more about Linux than SDL actually). But even having done so I would then use native APIs in Windows, OSX, etc. If your standard of quality is high enough, it won't really be possible to reach it using a blanket API like SDL everywhere.

So it means you prefer SDL2 on Linux because it is the least awful. Can you elaborate why you would not use it on e.g. Windows? Which parts of it do you consider inappropriate do use it cross-platform?

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

#146
post #142
post #104

Earlier quoted context omitted.

Unfortunately most of game developers that decide against use of SDL2 do that based on their experience of Windows development where it's pretty much standard to have own code for everything (except development tools and some middleware). E.g they think that their own code going to take less lines and be cleaner than SDL. As result these people usually don't even consider any alternatives as all of them even worse fr…

... And those developers are generally right. I would use SDL in Linux ports of things because it is the closest to a reasonable native API on Linux (which says more about Linux than SDL actually). But even having done so I would then use native APIs in Windows, OSX, etc. If your standard of quality is high enough, it won't really be possible to reach it using a blanket API like SDL everywhere.

It's reasonable to keep native code when you already spend months / years working with it. Or if you're huge company with hundreds of programmers that want to have own everything.

Though when it's relatively new game with own engine and small team maintenance cost for own cross platform code going to be high. Even on Windows there is tons of small problems that already solved within SDL. It's really not fun to debug problems of XP, Vista and some not updated systems.

PS: Also as far as I aware SDL2 currently used by all Valve games on all platforms. I pretty sure they wouldn't be using it if it's wasn't working well.

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

#147
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…

To find a word, just highlight it, hit Command-E to select it into search, and then use a search command such as Command-Shift-F or Command-G.

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

#148
post #77

Earlier quoted context omitted.

An alternative is Cocos2d-x, but they manage memory using a single autorelease pool.

I might be wrong, but I think I remember that Cocos2d-x uses SDL under the hood.

No, SDL is not used under the hood.

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

#149
post #133

Earlier quoted context omitted.

From what I can gather, not with V3 and above. I think starting V4 they will go render-agnostic so they can use Vulkan and Metal. Besides, there is more than rendering for a decent engine. Managing controls in an agnostic way is nice to. I am actually working on adding better control-events so it can wrap Windows, Windows phone, Apple TV and External controllers easier.

> "From what I can gather, not with V3 and above. I think starting V4 they will go render-agnostic so they can use Vulkan and Metal." That would make sense, last time I touched it was back in 2012. > "Besides, there is more than rendering for a decent engine." For sure, but Cocos2d-x is a complete software framework and SDL is meant to be a library. Although I would grant that it would make sense if the author would…

>> "From what I can gather, not with V3 and above. I think >> starting V4 they will go render-agnostic so they can use >> Vulkan and Metal."

>That would make sense, last time I touched it was back in >2012.

Cocos2d-x has never used SDL for anything.

for v4 the renderer is vastly different. Going from v2 to v3 there were major changes here as well.

Post reply on HN