C# works fine with Unity in a cross-platform sense, so don't worry about that. C# on its own, however, doesn't have much support on the Mac other than Mono (and Unity of course). Mono is nice, but for some reason it just isn't as popular as I would expect. Mono even works on mobile like iOS, but last I checked, it was like $1000 per developer.

Quote:C is procedural too, isn't that kind of a negative now-a-days?

C, in general, is either a terrible language or a great language, depending on how you see it. I love it for what it is, but it is old and has many short-comings. The sad reality is that we just don't have anything better than C for what C does.

Quote:How does C work? Do you need some kind of SDL-like thing to make it cross compatible?

C doesn't technically need anything to work on multiple platforms, other than a compiler. All code from all programming languages on all computers is ultimately executed by the CPU(s) as binary. One step above binary is assembly language, which is just the binary translated directly into human readable mnemonics. So in practice, all code is ultimately assembly language. To make a language become assembly language it is "compiled" by a compiler. C, C++ and Objective-C are compiled directly to assembly language and executed like that. We sometimes call that "executing on the bare metal" as opposed to running through an interpreter or virtual machine. Different processors require different assembly language instructions, so it has to be compiled for each type of platform.

C# and Java:

An alternative way of execution is through a "virtual machine" where a language is compiled to "byte code", which is like assembly language, but designed to execute in the virtual machine that the language was designed for. The virtual machine is a program, probably written in C/C++, that is compiled for each platform. It interprets the bytecode and executes it on the processor. This way, since your code is compiled to byte code, it runs on any machine that has a virtual machine that can run it, without having to compile for each platform -- hence the "compile once, run everywhere" slogan.

There are obvious advantages to this, but the main disadvantage is that there is that thin layer of virtual machine between your code and the processor, which costs in terms of performance. This isn't much of an issue nowadays with JIT technology, but it still exists.

If you use SDL or GLFW, you will do something like this:
Do one Mac build with your game (probably in xcode) and the precompiled Mac version of SDL (or GLFW).
Get a windows computer, build your game with visual studio and the windows version of SDL (or GLFW). Figure out how to make a windows installer, since most users really really seem to want one.

(Jun 24, 2013 10:38 AM)AndyKorth Wrote: If you use SDL or GLFW, you will do something like this:
Do one Mac build with your game (probably in xcode) and the precompiled Mac version of SDL (or GLFW).
Get a windows computer, build your game with visual studio and the windows version of SDL (or GLFW). Figure out how to make a windows installer, since most users really really seem to want one.

Ok. So I would basically just copy the code files from my Mac to Windows IDE and build them there, just how they are?

Thanks!!

Basically, for now, since I'm not going to be making a real game for a while, learning C++ using SDL on my Mac and not worrying about Windows will not be wasted time.

Quote:So, you still suggest SDL and C++ I suppose, whether I learn C or C++ first, that is the goal?

Yeah, basically that's what I'd recommend (I'd still recommend starting with C of course). I haven't tried GLFW, but I've read good things about it. Heck there might be other alternatives to SDL and GLFW nowadays, I don't know.

Quote:Basically, for now, since I'm not going to be making a real game for a while, learning C++ using SDL on my Mac and not worrying about Windows will not be wasted time.

Right.

Quote:How are windows created when using SDL and C++ on Mac?

Read the docs and find tutorials! There is a lot to learn just to get going with SDL at first.

Ok. Thanks to both of you! Great information. I will download SDL (wish it worked with other IDE's besides Xcode) and play around with that and Unity for now.

(Jun 24, 2013 10:38 AM)AndyKorth Wrote: If you use SDL or GLFW, you will do something like this:
Do one Mac build with your game (probably in xcode) and the precompiled Mac version of SDL (or GLFW).
Get a windows computer, build your game with visual studio and the windows version of SDL (or GLFW). Figure out how to make a windows installer, since most users really really seem to want one.

Wait. After reading a bit more online, I have a question. Well, not really a question, but an "am I right?" kinda thing:

You still need SDL/GLFW to do this because if you were to make your game on Mac using Cocoa, and try to build it on PC, it would not work, which is the whole purpose of SDL/GLFW, correct? - having the ability to build your apps with the same code on different systems, and thus allowing for cross-compatibility?

I want to know because I am very curious if it'd work: Would building a Windows version using Visual Studio and SDL work on Mac under something like Wineskin Winery (Wine)? It doesn't matter to me right now obviously but I am just wondering for the future.

(Jun 29, 2013 12:26 PM)OneSadCookie Wrote: in theory, every windows app works in wine. but why would you write cross-platform code and then not utilize the crossplatformness?

I am asking if I could run Visual Studio in Wine on my Mac and use SDL to make the Windows version of a hypothetical game, following what AndyKorth said. Using Wine has nothing to do with the code I write or the games I plan to make, just using it to run Visual Studio to build a Windows version with SDL.