C++ and C# for Game Development

Discussion in 'iOS Programming' started by patent10021, Jun 15, 2016.

  1. patent10021, Jun 15, 2016
    Last edited: Jun 24, 2016

    patent10021 macrumors 68020

    patent10021

    Joined:
    Apr 23, 2004
    #1
    Nintendo will be releasing Pokemon for iOS and I was curious as to how you think Nintendo approaches iOS development? Could they use their already existing C++ in a new Xcode project? Would it all be done in SceneKit/Metal?
     
  2. mildocjr macrumors 65816

    #2
    Well since they will be writing it for iOS my assumption is that they are going to go with re-writing the game in Swift. As far as SceneKit vs Metal, the graphics are simple enough to go with SpriteKit, if it's anything like the 2d version they wrote for Gameboy. If they decide to go 3d they will probably go with Metal unless the battery life is better in SceneKit. Assuming they are concerned with battery life.
     
  3. patent10021 thread starter macrumors 68020

    patent10021

    Joined:
    Apr 23, 2004
    #3
    Well iOS is just as much Obj-C as it is Swift. In fact even more so. Even Apple still writes all of its core apps in Obj-C. I'd love to think Nintendo is going pure Swift but I think they are probably doing it all in Obj-C. Especially since their code base is in C.

    Would be great to interview them.

    Btw, the new Swift Playground app is written in Swift. Great app!
     
  4. mildocjr macrumors 65816

    #4
    Yeah I've been messing around on it, although I'm pretty excited for message extensions. I could see a lot of good stuff come out for that and have some ideas myself that I will not mention here :D
     
  5. patent10021 thread starter macrumors 68020

    patent10021

    Joined:
    Apr 23, 2004
    #5
    I'm creating a Siri Intent right now. Amazing.
     
  6. ArtOfWarfare macrumors 604

    ArtOfWarfare

    Joined:
    Nov 26, 2007
    #6
    I would guess Nintendo is using Unity. If you go to their developer page for the Wii U or 3DS, they tell you to just use Unity to make your games. A Unity Pro license is included with the Wii U dev kit.

    Unless I'm mistaken, Nintendo uses Unity internally to make their own games for their own consoles. Given that they're releasing the same games simultaneously for both iOS and Android, I would guess that they're using Unity to make them.

    If you're making games and you're not using Unity, you are making a mistake.
     
  7. mildocjr macrumors 65816

    #7
    A lot of hardcore devs might say otherwise, Unreal Engine does extremely well for developers who are willing to work with it. Unity may be easy to integrate and develop for, but there are other engines available that may be better suited for what a developer is going for.

    Unity is good for a base game engine, it provides an easy learning curve for new game developers without sacrificing it's power. Unreal is best at all things lighting and particles, it's not as easy to learn as Unity but it's not hard if you want to put the time into it. CryEngine is another, although it is not easy by any means, it packs a huge punch in graphics and can really make some great detailed environments.

    Saying that one is better than another is case by case. If you are just making a Castle Crashers clone, sure Unity is the one to go with. If you plan on doing something where the main focus is dynamic lighting in a simulated environment (Infinity Blade 3) Unreal might be the way to go. If you want to include a lot of vegetation in an outdoor game without sacrificing FPS then CryEngine might be the way to go.

    Each engine has their strengths and weaknesses, it's up to the developer on what they plan to make to choose the best one for their needs.

    Unity is preferred by Nintendo because they aren't exactly releasing Sniper: Ghost Warrior (CryEngine) level of foliage, or Gears of War (Unreal) level of lighting in their games.
     
  8. ArtOfWarfare macrumors 604

    ArtOfWarfare

    Joined:
    Nov 26, 2007
    #8
    I meant as opposed to rolling your own engine. Teams of people with decades (or centuries) of collective experience made Unity, UE, CE, ID Tech, Source 2, etc. You should know specific shortcomings of existing engines and how to avoid them if you're going to build your own engine. Otherwise just use an existing one.
     
  9. patent10021 thread starter macrumors 68020

    patent10021

    Joined:
    Apr 23, 2004
    #9
    To digress a little. I found some great info about the differences in languages used in game development and wanted to post here. I'll probably change the thread title to Languages for Game Development.

    AAA console and PC game developers tend to use C++ for all engine code.
    (Gameplay code might be done in scripting languages.)

    Unity - Engine is written mostly in C++ (devs use C# scripting)
    Unreal - All C++
    Cry - Engine is written with C++ (devs use LUA scripting)

    If you want to learn indie / mobile game development the tools you might want to start with C# and Unity.

    If you're in the console game industry, C/C++ is the only language supported by the low-level systems.

    The languages for native mobile development are Obj-C/Swift and Java.


    There is a debate about the performance difference between C++ and C# but it seems that's becoming less relevant as is seen in these Quora posts.

     
  10. mildocjr macrumors 65816

    #10
    Good post. Nice digging.
     
  11. VPrime macrumors 68000

    VPrime

    Joined:
    Dec 19, 2008
    Location:
    London Ontario
    #11

    It's VERY unlikely that nintendo is using unity for any in-house AAA games. They suggest unity for indie developers for various reasons, but it is not because they use it them self.
    For mobile games, with small staff sure, it's entirely possible. But not for flagship Wii U games.

    Unity is great for indie developers who don't have the resources to roll out their own engine, and instead want to focus on gameplay, or quickly prototyping. But for AAA games with larger budgets and more extreme visions it just won't do. They need lower level access and more control over the hardware.

    Rolling out your engine is also not as insane as it sounds. Sometimes navigating an existing engine and making it do something it wasn't designed for is a lot more work.
    With Half life 1, valve used the Quake 1 engine. But by the end of it, they did sooooooo much custom work that it wasn't even the same any more.. In fact, even the original source engine has some of that Quake 1 source code in there still.

    Typically, game engines are written in C++. This allows for optimal performance and makes it easier to go cross platform. The game logic, if handled by a different team is done in c#, Lua, Python, java, or even some in house scripting languages.

    Now for Pokemon Go, it's definitely possible they used an off shelf platform like Unity, since it's not that complex of a game. But even doing from scratch in C++ wouldn't be that hard. Pokemon go isn't doing anything really ground breaking when it comes to graphics. It's pretty basic AR stuff, and simple graphics.
     

Share This Page