Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

So if one were to write a small indie game targetted at say Windows 8 and didn't want to mess around with writing unmanaged C++ what is the MS recommended way for doing this?

There are third party things like Unity3D but that looks like overkill for just making a pixel art game.



Microsoft's Windows 8 game programming tutorials actually suggest using MonoGame, which is essentially an open-sourced clone of XNA that is nearly feature-complete.


As near as I can tell, the answer is to use C++. Which I would have been pretty annoyed at not too long ago, but I've recently re-acquainted myself with it and am enjoying it a lot more than I ever did XNA (and my Github has a bunch of XNA stuff all over the place). I'm using it specifically for a pixel-art 2D game and while that first step is a big one, I've found myself getting remarkably comfortable with it in a very short period of time and I can actually say that I know what is going on in my code.


I wonder how many younger programmers (the sort of people who would have the most motivation to develop indie games) even know C++. It's not like it's a quick and easy language to learn either.

Since we are now seeing 2d (and even 3d) games with good enough performance written in languages like JS & Java, forcing programmers to do low level memory wrangling to build a mario clone seems a little backwards.

Without XNA I don't see a big reason to build a Windows only game.


I don't see a reason to build a Windows-only game. That's why I don't. =) I have an OpenGL/OpenGL ES stack that deploys comfortably to Windows, OS X; eventually I'll expand it to iOS (easy), Android (somewhat tricky), and probably Linux (easy).

I said the exact same thing as you are before getting back into native development. "Why should I manage memory myself? Ew!" It was one of the biggest reasons I avoided C++, and I say that knowing C (albeit having left it unused for about six or seven years). Eventually I bit the bullet and jumped back in, and to my utter surprise found it completely easy. C++ is boilerplatey on its best day, but most of the hard problems are solved problems. Like, if you want to treat it like Java or C# (which I've spent much, much more time with), fling boost::shared_ptrs around. If you don't, spend a couple seconds thinking about what you're doing. It really is a non-factor once you get into the swing of things, and while I'm a pretty competent programmer I only started writing real C++ about three months ago and I no longer spend any significant time thinking about it.

C++ gives you sufficient advantages in terms of portability and performance that, if you're writing a game from scratch, you probably want to be using it. If you don't want to be writing C++, you probably want to be using Unity or another engine that bakes in the hard parts (with a corresponding loss of flexibility).


This is very interesting and encouraging - thanks for posting this.

I've come to the same conclusion and as primarily a C# guy for the past 10 years, I've been hesitant to go the C++ route. If you haven't blogged about your experience, you might want to consider it, I know a few people that are looking for a better way to go building simple games (2d mostly) and Unity seems like overkill. Using C++ with something like Cocos2d seems like a much better way to go. I know LUA also supports Cocos2d but I guess I'd rather go with C++ since the syntax seems more my style (versus Lua's more Basic kind of syntax).

Anyway, thanks, if you've blogged about your experience please link to it, I know I and a few other would be really interested in hearing more about your experience.


Cocos2D is Objective-C. Cocos2DX is C++, but I'm a little skeptical of it. I would not be worried about C++, honestly - I'm finding it really much less heinous than I was expecting. I mentioned memory management fears before--to my surprise, I am really comforted knowing when my dtors are going to fire.

I have a blog (http://edcanhack.com) but I am very bad about it. This seems like it'd be a good post, though - I'll come up with something tonight.


I'm thinking about this from MSs point of view, I think it's broadly a good thing if cross platform games become the norm.

I always assumed that XNA was a play to keep indie developers invested in Windows/Xbox.


I don't think you can talk about Microsoft so monolithically. I would agree that XNA was to keep people Microsoft-focused, but the XNA team has been disbanded since around the release of Windows Phone 7 or maybe a little after--I wouldn't be surprised if its demise is political.


Just use Java. Worked great for Minecraft, which is probably the most successful indie game to date.


I wouldn't. Java can't deploy to iOS (without some bogus hack like IKVM, and you'll pay for it with your customers' battery life and your software's responsiveness) and has a shrinking viability--though, for now, still viable--on Windows and Macs.


If iOS is your platform. First you have to decide if you want to do a desktop game or a mobile game. Pursuing both at the same time is a bad idea for an indie developer.


Can you sell Java games on the Windows store?


You can't, but you can on Steam. I would not worry about the Windows Store until it starts showing a market base.


1. You can use Lua with MOAI. 2. You can use HTML5 and JavaScript ... 3. Monogame.

...


I've been working on an iOS app using Gideros (also uses Lua). Windows support is on their roadmap, and I hope they do it because I really like their product.

http://www.giderosmobile.com/


Also Marmalade probably will support it (since it supports desktop windows already... and Windows Phone 7)


p\invoking DX? Use one of the many DX for C# wrappers like sharpDX? I don't know, it really is weird they would kill it without a replacement like the way XNA killed Managed DX.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: