Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 07 Mar 2008
Offline Last Active Private

#5195538 Unity or C++?

Posted by stupid_programmer on 30 November 2014 - 02:22 PM

Option 1



(1) choose a tool for making a simple game

(2) make the game

(3) finish the game

(4) oh, wait, I learned a whole lot of stuff required to make a game and my friends stop talking when they play it

(5) rinse and repeat, solving increasingly more complex problems in increasing more complex games that you finish

(6) be an expert game developer (which includes programming, designing, maintaining, promoting, etc)


Option 2


(1) play with some tool

(b) switch to a different tool

(d) monkey around with tools

(5) dabble at starting to make several games

(6) browse the internet (heh heh, dem kittehz, oh look if I were a haircut I'd be a mullet!! lulz)

(4) go make coffee and message your friends about how lame they are for using some arbitrary tool for finishing their games

(6) play the games your friends have finished


Choose one of the above options.  I, personally, would recommend the first one but the second is very popular.


Nevermind, I totally did not read the post before I commented.


Go with option 1.

#5192380 Starting mobile development - cross-platform or target each OS specifically?

Posted by stupid_programmer on 12 November 2014 - 01:01 AM

I've used AIR (Starling and non Starling) and Unity for some professional and Cocos-2dx for personal iOS/Android games.  All three of them have worked and all three of them are quirky in their own annoying ways.  All them can wrap native code into your final project.  I've written everything from our in-app payments, implemented analytic SDKs, and custom logic in Java and Objective-C.  The nice thing is the native code is pretty much the same for all three.  It's just the glue to get them in to the upper layer that is different.  The native code for our AIR games basically transferred over to our Unity games with no changes.


On the surface AIR seems like a great choice.  AS3 is really easy to pick up, the language is very forgiving, and there are tons of open source Flash games out there to see how people have approached problems.  But you are totally at the mercy of Adobe's (usually in adept) tools to create your final packages.  Right now there is an issue with Starling and the newest version of AIR on Android 5.  And there is almost always major issues every time a new iOS version comes out.  Adobe has created some black magic and somehow uses (or simulates the use) of Xcode to create iOS packages.  Which always seems to be a problem when Apple forces developers to a SDK version.


Unity also seems like a great choice.  It's C#, it's all managed for you, it's got a cool editor.  Except that most of the cool things from C# you can't use.  The Mono run time they use has some serious problems with AOT compiling so you can get some bizarre crashes on iOS.  But if you stick with .NET 2.0 type stuff and follow some of the coding practices you see online (don't use 'foreach', etc) then it is pretty nice.  It generates an Xcode project for you so you have a lot more control over the final package.


Cocos2d-x seems like the best choice.  It almost is, do everything in C++ and get crazy with lambdas, it is open source so you can fix something (or add) without waiting for the developers.  You basically have full control of everything (if that is important to you).  The syntax used to be horrible because it was a C++ port of Sparrow which the API was based on AS3(!?!).  Luckily they have changed all that with the 3.0 version and the syntax is a lot closer to what you would see in other C++ projects.  An Xcode project is generated for you when you create a new project and that is your focal point for creating iOS builds.  I generally do all the gameplay stuff on a Windows machine so I can use Visual Studio and then switch over to Mac if I need to mess with Objective-C.  The nice thing about this route is since you can mix and match Obj-C and C++ there is the least amount of glue code to get any kind of native iOS stuff working.


Basically, of the three platforms I listed you could expose all native controls to your game through code and nobody would be able to tell it wasn't a pure Obj-C project.  If people open up your .ipa they will see there is some extra stuff in AIR and Unity builds but outwardly nobody is going to be able to tell the difference.


Unless you need some cutting edge tech to port a FPS to mobile there isn't any real reason why you would want to create your game completely in native code.  Unless you are wanting to create a dual game engine project for learning how that stuff works the performance you lose (even with AIR if you are smart) isn't worth all the time it would take to create two games.

#5191134 Xmas 2014: Special protocols for release?

Posted by stupid_programmer on 04 November 2014 - 10:15 AM

Thanks for the info guys, we do not have a full working build yet though. Looks like we will try to get a working build approved asap then patch in more content later.


Honestly, that's the way to not do it in the mobile world.  You basically get one shot to get people hooked.  There is so much information overload in mobile app stores (along with short attention spans of most players) that they generally won't play a demo and then wait two months for the full game.  Unless you are a AAA studio that doesn't seem to work too well in the PC/console world either.

#5189708 General Programmer Salary

Posted by stupid_programmer on 28 October 2014 - 09:15 AM



They may have given you your first job but you don't owe your employer anything.  You need to look out for yourself first.  If the place does close you can bet the CEO is going to be worrying more about his paycheck then yours.


If there are any other places in your area that you could work at and still go to school I'd start looking in to those.  If there isn't, suck it up for the six months and then make plans to move and start sending out resumes a couple of months before you graduate.  With several years of real world experience and a degree it shouldn't be too hard to find a job elsewhere.  Your previous salary is only a portion of what goes into the equation a new employer is going to offer you.  But there is no reason why you can't negotiate yourself up into your "average" range.  If an employer really wants you then $10k over their offer is a drop in the bucket compared to all the other operating expenses.


You also have to figure in cost of living when looking at salaries.  If you get a job at Google and make $120k/year but have to pay $4k/month in rent you aren't coming that far out a head then if you get a job in a smaller city and only get $90k/year but have $1.5k/month for a much bigger place. 

#5189423 Mac or PC - Really, this is a programming question.

Posted by stupid_programmer on 27 October 2014 - 09:28 AM

At work it is mostly Mac with Netbeans for general Java, Eclipse for Android specific stuff/Xcode for iOS specific, FlashBuilder for Flash.  People that work on the older Flash web games are generally just on Windows with Netbeans/FlashDevelop.  Newer games are moving towards Unity which is still done with a Mac for me and then I have Parallels installed to use Visual Studio.  Couple people use Windows for Unity but they just do gameplay/UI integration.


At home it is a Windows machine and generally Unity to prototype random ideas since I generally have little time for anything serious.  But do have an old copy of VS 2008 kicking around if I want to brush up on C++ or do some real programming.  I also have a Mac mini from my mobile contracting days that is straight up XCode.

#5175867 Possible to prevent device to go to sleep?

Posted by stupid_programmer on 24 August 2014 - 03:21 PM

Don't prevent the app from going to sleep.  Horrible thing to do.  iOS/Android will let you know when the app is going to be deactivated and then brought back to the front.  Save your state when the game is going away and then calculate the difference when it comes back. 


For iOS the UIApplicationDelegate has 'applicationDidEnterBackground' and 'applicationWillEnterForeground' (also applicationWillResignActive/applicationDidBecomeActive).  And for Android the Activity has 'onStop' and 'onResume'.  Any decent third party engine will bubble those events up to the client code in some form.

#5171147 Stuck in a rut, need some advice!

Posted by stupid_programmer on 02 August 2014 - 11:57 AM

I agree with Lithander. Drop the current job and look for something in programming. If you don't want to travel far look for remote work. There are plenty of companies that will take on a programmer remotely with the occasional office visit for a few days.


What companies?  I would have much rather not moved to California to work.  There is a difference between hiring a 20 year veteran as a consultant to hand hold you over Skype and college graduates first job.




This is especially true.  Its impossible to judge how much somebody has actually contributed to a comercial project.  They could have a AAA game under their belt but that doesn't mean they put any effort in.  Every team has developers who just coast by.



Isn't this the truth.  I'm going to get a "special thanks" credit for one of our companies upcoming games because I suggested a better way of handling game updates.


I agree with everybody else here.  The bullet points are just what they would like to have, not who they will hire.  If you can meet most of them, have a track record of completing projects and most importantly, not come off as an anti social nerd you have as fair shot as anybody else for the job.  And don't worry that companies aren't looking for Android Java programmers.  If you do mobile games knowing Java and Objective-C (and C++) comes with the territory.  When my work was still using Adobe AIR for mobile games there was a fair amount of Java/Objective-C for integrating third party native code into our games.  They are more looking for people with experience executing completed mobile games and dealing with with the bottlenecks of mobile devices.  Finish your game, the language doesn't matter.


Get your resume out there and keep working on games to pad your portfolio.  You miss 100% of the shots you don't take (or some such feel good nonsense).

#5170076 Make file unreadable by an external program

Posted by stupid_programmer on 29 July 2014 - 09:30 AM

You can obfuscate, bitshift, encrypt, hide the keys, decrypt in a custom VM and download secondary keys from a remote server all you want.

As soon, as the game has loaded, literally all I need to do is Alt-Tab out to Pix/gDebugger/ApiTrace/... select the texture and click "Save As...".

It simply doesn't matter what you do to your content, as long as you pass it into an API call somewhere down the line, that will always be the weak spot.


Quote this one again for truth.  If people want to steal your assets they will steal your assets.  There is nothing you can do to prevent that.  If multi billion dollar companies are using plain old zip (which is probably more for file size on disk and not encryption) then why are you worrying about this so much?  Spend your time on something more important.

#5159520 Adobe products for mobile development

Posted by stupid_programmer on 10 June 2014 - 09:31 AM

Get FlashDevelop instead.  Free and it is an actual IDE.  Flash CS is horrible for code editing or maintaining a large code base.


You can make an .ipa on a Windows machine but if you were going to do any kind of native code then you are going to need XCode.  And you still need ApplicationLoader to get your .ipa to iTunes.  Mac minis are $600.  Buy one of those instead of the Flash CS license.


AIR on mobiles is horribly slow.  You could get away with a few vector images but the advantage of AIR is that you can use the GPU for drawing so vectors will need to be converted to bitmaps.  You can use the CPU to draw but then you are adding extra overhead to the CPU to calculate the vectors.


Box2DFlash works great in ActionScript.  You won't get the performance of the C++ version but it works well enough for throwing some boxes and ragdolls around.

#5154480 Advice for a Lead Artist wanting to go it alone?

Posted by stupid_programmer on 18 May 2014 - 01:44 PM

I'm sure that Tom will be around shortly, but I'd say at the very least you need to be up front with your employer now for what you are doing.  Here in the US most employment contracts state they own anything you do (including off time).  Most employers are pretty nice and will let you work on outside things as long as they know about it and it doesn't compete with any of their projects.

#5149910 Using same graphics framework across different projects?

Posted by stupid_programmer on 27 April 2014 - 12:31 PM

With SVN you can set an external property to point to another repo.  Whenever you update the first repo it will also check any externals and pull those down as well.  You can do something similar with Git but I'm not sure if that is something that can be done with Mercurial.


If you don't want to copy an entire source code folder all the time you could just have your engine code in its own repo and just build the .lib and/or .dll when you do an update and just include that with your games.

#5148372 Why is the first spritesheet laid out like this? Seems harder to read the spr...

Posted by stupid_programmer on 20 April 2014 - 11:04 AM

I must work with a bunch of monkeys as I've heard sprite sheet and texture atlas used interchangeably for my entire career.


The Samus sheet might be an TexturePacker output image.  As I recall it can trim transparency from source images and give you an offset to place the trimmed image inside the full sized frame.

#5144777 How to time bomb a beta?

Posted by stupid_programmer on 06 April 2014 - 12:44 PM

So if you were the programmer of Ocarina of Time you would have fixed all these bugs before the game shipped?


I will echo the comment that if the only feedback you get from the game is "it's awesome", you need to find better testers then friends, family, and former players.  There are things wrong with you game and there are design decisions you made that people won't like.  If people are already biased towards your game then they won't mention the little things they think are wrong.  You need some assholes that have never heard of your game to try and rip it apart.  Hopefully this is what you are trying to do with the beta.


It may not be a fair comparison, but you game does sound a lot like "Rust" that is in beta on Steam.  Visually, Rust is light years beyond your game (maybe your screenshots are super old so my comparison is off) and is cheaper.

#5114485 How much it cost to develop a game similar like Clash of Clan, Friendly fire?

Posted by stupid_programmer on 05 December 2013 - 12:02 AM

Ah... sound like i got to be a multimillionaire in order to publish my desire game. 


Or you just need a good business plan to get investors to foot the bill.


I might say that it could be done for quite a bit less then $1m.  I was the tech lead on a top 10 iOS game for my company and there is no way it cost $1m to make.  Probably in the range of $300-$350k.  Granted the art in Clash of Clans is better then ours which is going to help drive up the price a fair amount.

#5106486 C++ (SFML) and Flash player/Unity

Posted by stupid_programmer on 02 November 2013 - 11:49 AM

There is FlasCC which will allow you to write native code for use in Flash.  The Quake port basically just using the Flash framework for input and the entire game loop is in native code.  Whether or not it is worth the effort is up to you.  ActionScript 3 is a curly brace language, so unless you are using templates or advanced C++ extensively then porting "C with classes" type code would be pretty easy.