1. #1
    Herald of the Titans Lotus Victoria's Avatar
    7+ Year Old Account
    Join Date
    May 2014
    Location
    Rata Sum
    Posts
    2,643

    Smile What's the best programming language for sidescrolling games?

    Greetings my fellow humans.
    I'm studying computer science and I'm interested in creating games.
    I tried making a game in Java, but Java isn't the best language for this kind of application, I guess.

    I want to create a sidescroller action game, like Mega Man or Castlevania (maybe both mixed?! Who knows? ).

    Any suggestions on which programming language I should use?

    (btw, sorry for my english!)
    Thanks!


  2. #2
    If you just want to make games use some high level tools like Gamemaker, Unity or UDK. There's a very good reason why commercial game engines are popular and even major AAA titles just license an existing engine and make changes to it as needed.

  3. #3
    Deleted
    I would say go for Unity (in which you can select between C#, JavaScript or Boo Script for your programming needs).

    Unity is basically very user friendly game engine, that recently got full 2D support (which I guess is what you're after). Even larger companies have started looking into Unity, for example Blizzard with Hearthstone.

    Unity has some very nice 2D tutorials on their official site (http://unity3d.com/learn/tutorials/modules/beginner/2d) on which you'll learn all what you need to make your game. It'll be a nice starting point for you.

  4. #4
    Moderator chazus's Avatar
    10+ Year Old Account
    Join Date
    Nov 2011
    Location
    Las Vegas
    Posts
    17,222
    We switched from HTML5 to GameMaker to Unity, Unity being the best option we've run into for both side scrollers and platformers. Currently in the middle of rebuilding our current project in Unity.
    Gaming: Dual Intel Pentium III Coppermine @ 1400mhz + Blue Orb | Asus CUV266-D | GeForce 2 Ti + ZF700-Cu | 1024mb Crucial PC-133 | Whistler Build 2267
    Media: Dual Intel Drake Xeon @ 600mhz | Intel Marlinspike MS440GX | Matrox G440 | 1024mb Crucial PC-133 @ 166mhz | Windows 2000 Pro

    IT'S ALWAYS BEEN WANKERSHIM | Did you mean: Fhqwhgads
    "Three days on a tree. Hardly enough time for a prelude. When it came to visiting agony, the Romans were hobbyists." -Mab

  5. #5
    Herald of the Titans Lotus Victoria's Avatar
    7+ Year Old Account
    Join Date
    May 2014
    Location
    Rata Sum
    Posts
    2,643
    Unity seems like a great engine! I heard good things about it, but I never actually tried using it.
    Does it have support for 2D sprites like, let's say, Game Maker, or Unity only works with 2.5D (like Trine)?

    - - - Updated - - -

    Forget it! I found in the link Tingyou posted. Nice!
    Guess I'll have to learn some C#!

    Thank you all people.


  6. #6
    I recently did a GameJam (Make a game from scratch in 5 days) at my University and we used Unreal Engine 4, and it comes with a whole ton of awesome features, but ... It's new, and very buggy and lacks support.

    It's definately worth keeping your eye on, but in terms of short term, definitely Unity. Getting Unity Pro made a huge difference to one of the teams at my Uni for one of their projects, it turned it from a terrible 2D Sidescrolling Game, to an awesome 2.5D H.D. Ninja Game with amazing features and tools.

    In terms of language, just learn C++ for everything. Once you've learnt C++ you can learn any other language, it's just a matter of understanding the differences. If you can build a Pointer, or a 3-D Dynamic Array, you'll easily be able to do it in other languages as well.

    Quote Originally Posted by Momentanius View Post
    Does it have support for 2D sprites like, let's say, Game Maker, or Unity only works with 2.5D (like Trine)?
    Yes, it does support 2D, 2.5D, 3D and the brand new 6D! (3 Dimensions are part of the DLC for $282,827,726 each!)

  7. #7
    Herald of the Titans Lotus Victoria's Avatar
    7+ Year Old Account
    Join Date
    May 2014
    Location
    Rata Sum
    Posts
    2,643
    Quote Originally Posted by Hyve View Post
    Yes, it does support 2D, 2.5D, 3D and the brand new 6D! (3 Dimensions are part of the DLC for $282,827,726 each!)
    You convinced me


  8. #8
    Quote Originally Posted by Hyve View Post
    I recently did a GameJam (Make a game from scratch in 5 days) at my University and we used Unreal Engine 4, and it comes with a whole ton of awesome features, but ... It's new, and very buggy and lacks support.

    It's definately worth keeping your eye on, but in terms of short term, definitely Unity. Getting Unity Pro made a huge difference to one of the teams at my Uni for one of their projects, it turned it from a terrible 2D Sidescrolling Game, to an awesome 2.5D H.D. Ninja Game with amazing features and tools.

    In terms of language, just learn C++ for everything. Once you've learnt C++ you can learn any other language, it's just a matter of understanding the differences. If you can build a Pointer, or a 3-D Dynamic Array, you'll easily be able to do it in other languages as well.



    Yes, it does support 2D, 2.5D, 3D and the brand new 6D! (3 Dimensions are part of the DLC for $282,827,726 each!)
    From what I have read though, C++ is not exactly a good language to start on. Is there a big difference from C# and C++?

  9. #9
    Id say Java using LibGDX or doing something in C++. Java is perfect for this situation, as it can be ported to any device, and using something like LibGDX, sets it up automatically to do so.

    If you use Unity, its like trying to shoot a fly with a rocket. It Is powerful, but it brings way to much for something simple. Also, theres a difference between programming and using Unity. Programming is using libraries and code. Unity has scripting, but most is done through visual game making software.

    http://libgdx.badlogicgames.com/

    The game on the front screen is one of my best friends. It took him only 2 weeks to make.

    - - - Updated - - -

    Quote Originally Posted by Millennía View Post
    From what I have read though, C++ is not exactly a good language to start on. Is there a big difference from C# and C++?
    C# is a microscoft created language for the .NET framework. It compiles down to Microsoft assembly code.

    C++ is a standalone language. Compiles down to C to ASM to Machine code.
    Last edited by Tankendog; 2014-07-25 at 07:22 PM.

  10. #10
    Quote Originally Posted by Millennía View Post
    From what I have read though, C++ is not exactly a good language to start on. Is there a big difference from C# and C++?
    C++ is generally speaking the Industry Standard. No-one is going to mock you for knowing C#, it's valuable. There are differences between C++ & C# but they're essentially the same language except a few libraries and processes.

    I can't quite remember the fine details, but one is more intensive (I think C#), but more importantly C++ grew from C# and is kind of seen as the better version. It's got in-built libraries and systems that just better suit the job, and while you could easily import and load libraries that do the same in C#, it's seen as that little more hassle then is needed.

    Honestly, if you can do C++ you can easily do C#, and the same for any language really. Variables are always variables, arrays are always arrays, so on and so forth. Each handles it slightly differently and each has their pros and cons, but honestly for the sake of ease, just run with C++.

  11. #11
    Quote Originally Posted by Hyve View Post
    C++ is generally speaking the Industry Standard. No-one is going to mock you for knowing C#, it's valuable. There are differences between C++ & C# but they're essentially the same language except a few libraries and processes.

    I can't quite remember the fine details, but one is more intensive (I think C#), but more importantly C++ grew from C# and is kind of seen as the better version. It's got in-built libraries and systems that just better suit the job, and while you could easily import and load libraries that do the same in C#, it's seen as that little more hassle then is needed.

    Honestly, if you can do C++ you can easily do C#, and the same for any language really. Variables are always variables, arrays are always arrays, so on and so forth. Each handles it slightly differently and each has their pros and cons, but honestly for the sake of ease, just run with C++.

    C++ and C# are very different. C++ grew from C. C is a procedural language where C++ and C# are OOP (Object Oriented Programming). C# was based on Java more than it was based on C++.

    Also, as i said earlier, C# is for .NET framework, while C++ is not. C++ was around before C#. C++ is better for games due to its OpenGL and DirectX support, memory and speed efficiency. c# came out in 2000, c++ was 1983.

    C++ is the stranded for AAA game development, but it is not for the programming industry as a whole. It is greatly overshadowed by Java and C.

    Learn Java. It is also leaps and bounds easier to port to mobile. Also, go for Sprite/Tile based implementation, instead of 3d graphics. It simplifies development, and makes it wayyyyyyyy easier to do hit detection.

    If you do not have any programming knowledge, I recommend picking up text books, and possibly starting with python instead of Java. I started with Java however and had no problem. Learn C after Java, and then that will allow you to see how c++ really functions.
    Last edited by Tankendog; 2014-07-25 at 07:42 PM.

  12. #12
    Partying in Valhalla
    Annoying's Avatar
    15+ Year Old Account
    Join Date
    Aug 2008
    Location
    Socorro, NM, USA
    Posts
    10,657
    Java is fine. It's just a matter of the complexity required to build an engine.

    There's also the issue of code re-use. Tons of free examples of game engines in C/C++, barely any in java.

    My advice? Find your target. Windows? Linux? OSX? Mobile? After that, you can determine the merits of the language or engine you want to use.

    Don't harp on game stories or styles or art or anything -- at first. Get your engine working. Play around with it. Fill in the holes that it's missing. You'll thank yourself later when you don't have to go refactor a buttload of code because your engine was flawed and needed fixing. There's nothing wrong testing a game with cubes for characters and blank walls/floors. Get the engine working, the object definitions, object interactions, physics, mechanics, bullets, map generation/tile placement, and whatever else working. Test them numerically (practice some test-driven development, if you haven't yet). After all that, you can worry about animations and art and style and gameplay.

    But, above everything else: Finish it. Seriously, nothing helped me more in college than finishing my home projects. Even if they sucked (most of them did). You learn so much by finishing something.

  13. #13
    Depends on your purpose of writing the game. Are you trying to learn game programming? Any language will do. Is your aim to be a game programmer? Don't waste your time with anything other than C++. Don't bother with high level tools (unity, game maker), they are not for scientist/engineering students and they teach you nothing. Learn the core, learn how to program.

    I am assuming this is your first game. If that's the case, side scrolling is a bad choice. It's complex for beginners. You will be struggling with physical problems. Go for snake or tetris - something grid-based. And seriously, building a game engine? Don't fly before you can't even walk.

    - - - Updated - - -

    Quote Originally Posted by Tankendog View Post
    If you do not have any programming knowledge, I recommend picking up text books, and possibly starting with python instead of Java. I started with Java however and had no problem. Learn C after Java, and then that will allow you to see how c++ really functions.
    What a bad advice. I've seen sub C++ programmers who thought C is required or is a base-line for C++. The next thing you see 500 naked pointers in 1k lines of code.

    OP, if you want to learn C++, just learn C++ from a proper source. Be careful while learning C++ tho, world is full with shitty C programmers who think C++ is just C with classes. Same fools publish books too that you should avoid. Here is a book guide for you.

    http://stackoverflow.com/questions/3...guide-and-list
    Last edited by Kuntantee; 2014-07-26 at 08:54 AM.

  14. #14
    C++ is a language for teams of experienced developers.
    Due to the fact that it compiles directly to machine code, it's basically the only choice for performance heavy applications. It's also prone to errors, so you have to spend a lot of time debugging and fixing errors if you are not an experienced programmer. This slows down the development time significantly.
    Java and C# are basically the easy mode, with a ton of things done for you and less mistakes you can make. This increases the production speed significantly, allowing you to deal with much more complex projects in less time. However, they have a performance penalty because they don't compile to machine code directly, and instead to some specific code that is then translated to machine code upon program execution by the language specific software.
    So to be able to run a Java program on Windows, you need the software that translates the Java bytecode to machine code. The same thing is needed for C#, except that in this case the required software is .NET Framework and it already comes with the newer versions of Windows.
    The other difference is that Java is platform independent, meaning your software can run on pretty much anything (because the java virtual machine can run on anything).
    C# is tied to Windows due to the .NET Framework, however there is a runtime environment called Mono which can execute C# code on Linux.
    C, unlike the examples above, is not an OOP language and a procedural one. It's really fast since it's closer to machine code than anything besides assembler. It is used mostly for drivers, embedded system programming and operating system kernels. Basically for anything that needs to work really, really close with the hardware and not waste any resources.
    Specifically when you work with C and C++ you have to take care of some security problems. If the user enters, let's say 160 bits in a space where you have allocated only 128 and you didn't check for input correctness, it will end up wiring in parts of memory that it's not intended. Imagine that next to these 128 is the address of some function and they overwrite it with the address of code they have just injected in memory. The program will execute their code like it's part of it's own. This is possibly the most dangerous type of software attack because it allows the attacker to basically gain full control over the application.
    Last edited by haxartus; 2014-07-26 at 10:44 AM.

  15. #15
    What a bad advice. I've seen sub C++ programmers who thought C is required or is a base-line for C++. The next thing you see 500 naked pointers in 1k lines of code.

    OP, if you want to learn C++, just learn C++ from a proper source. Be careful while learning C++ tho, world is full with shitty C programmers who think C++ is just C with classes. Same fools publish books too that you should avoid. Here is a book guide for you.

    http://stackoverflow.com/questions/3...guide-and-list
    ? This is why you combine your object oriented knowledge from Java, with your memory management and other C ideologies. I mean if you want to advocate halfing it and skipping over important aspects of how the language functions, thats well.... yea... you want to talk about bad advice....

  16. #16
    I know Unity3D :O.

    Seems like a lot of talking, but I wouldn't pick based on language, I'd pick based on the SDK you're using.

    - - - Updated - - -

    Quote Originally Posted by Tankendog View Post
    C++ and C# are very different. C++ grew from C. C is a procedural language where C++ and C# are OOP (Object Oriented Programming). C# was based on Java more than it was based on C++.
    This guy knows whats up btw. I'll vouch for his credibility in his posts here.

    If you do pick a language I'd also go with Java.

  17. #17
    Quote Originally Posted by Blueobelisk View Post
    If you do pick a language I'd also go with Java.
    Java on desktop is basically dead and 99% of professional Java development happens for enterprise web servers and some embedded platforms which is almost totally opposite from what OP was asking for. For game programming Java was never a thing and it will never be a thing.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •