Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 19 Jul 2011
Offline Last Active Today, 08:33 AM

Posts I've Made

In Topic: programming language for android.....

12 April 2016 - 05:55 AM


Just because C++ has been around for a long time doesn't guarantee that it will be around forever.   Just about every survey I can find shows that C++ usage has been declining for years.

Other languages are almost always written in C or C++. So whilst C++ popularity may be declining (which it honestly isn't), it doesn't mean the technology is going away... ever.


Yes, it may not be cool. I remember the day when people told me that C and C++ was already obsoleted by Java 1.5... Haha did I have the last laugh ;)


The fact that C and C++ both have hundreds of compilers available to them whereas languages such as Java and C# have only a few does speak very highly for how critical C and C++ is for software development and how much they are "the" standard technology that all others are based upon.


For a beginner, it may not be relevant but for any technology have a look at its dependencies, such as what the runtime requires, what the compiler requires etc... This will almost always be C or C++ but also gives you a good idea of the lifespan of the language.

In Topic: What Language to Use

07 April 2016 - 09:29 AM

I also just want to double check on this, is c++ cross platform? I know it runs native on windows but do other os' support it? Or would c# be more appropriate for that?

C and C++ are really the only fully cross platform languages that games are written in today.


However to actually make them work across different platforms takes some work. This is where languages that run inside a virtual machine come in handy (such as Java and the JVM or VB.NET/C# and the .NET VM). The VMs in effect provide a "virtual" platform ontop so you just need to target that.

However, porting these virtual machines to get them running on different platforms takes work and when it comes to consoles or smaller devices, they are often less supported. I.e getting Java VM to run on a PS4 is not likely, whereas getting a .NET VM to run on a Blackberry is equally unlikely.


For most platforms people use today, Mono (the open-source .NET implementation) does work fine. But for future platforms (?), older or server platforms (Windows <2000, Solaris <10, AIX) or exotic platforms (Plan 9), C and C++ are probably the best choice.


As an aside, C++ can be compiled to ASM.js to run in a web browser (Unity and Unreal use this behind the scenes).

Also, C++ can run inside a .NET virtual machine by using Microsoft's C++/clr compiler.

C++ can also run inside an Adobe Flash VM using Adobe cross bridge compiler.

If you intend to write code to support that absolute locked-down mess that is Windows RT, then Microsoft C++/cx is available.


I personally find that on Linux, Steam games requiring Java or Mono are a little bit flakey due to the provided VMs. Native code is still the only first class citizen.

In Topic: What Language to Use

07 April 2016 - 04:56 AM

If you are going to be using an intermediate service for your game to connect to MySQL (i.e REST api) then any language will be fine. If you did Visual Basic .NET (rather than VB6) then you will be quite familiar with C# since it is actually the same technology (standard library etc...) apart from the syntax. But I agree with 0r0d and highly recommend C++ in the long run for portability and overall knowledge (in your CV etc...).


If you are going to have your game connect to MySQL directly, a slight warning regarding Unity (if you were planning to use it). The C# .NET connector for the MySQL database is not likely to work with the .NET mono implementation provided by Unity since Unity uses an extremely old version of .NET (from a time before C# actually was considered better than Java). Think of C# only really as a scripting language when used with Unity. By all means though you can write a C++ plugin and do the database connectivity through that.


I am currently working on a project involving the Unreal Engine (so C++) connecting to a HTTP REST API for user accounts (so PHP) connecting to a PostgreSQL database (so SQL).

This setup seems to be working well.


Edit: We use a simple C library called libcurl to allow Unreal Engine to connect to the REST API via HTTP. It is a lot more powerful than the inbuilt stuff in both Unreal and Unity.

In Topic: Tackle my first big project

01 April 2016 - 04:11 PM

I heard people in the industry like using Unity


Some Unity shops will like this (typically indie developers etc) but I find only knowing Unity makes it *very* hard to stand out nowadays.


For learning MonoGame, just learn the very basics from their website and then grab a decent XNA book. You should then know enough to work between the slight differences between them. MonoGame is just an open-source clone of the XNA API after all. A book like "Beginning XNA Game Programming" from Apress should be pretty good for this if you can get hold of it.


Just realized that It seems strange but I imagine one day we will be talking about an open-source MonoUnity when Unity disappears ;).

In Topic: Tackle my first big project

31 March 2016 - 02:54 PM

IMO, you should use Unity since you already have working knowledge with it, your goal is to get up and running asap


Unity isn't always the best choice when trying to get up and running asap. Especially in a 2D project where there are much simpler (and more flexible) solutions. I would probably suggest MonoGame over Unity.


Using a framework or developing your own is likely going to help learn more about game play programming than just hacking around with Unity (which will only really teach about very Unity specific coding practices).