C# and Unity for 2D Side Scroller

Started by
15 comments, last by Eck 7 years, 10 months ago

UnityScript was intended to be similar to JS though, and you're not locked into it, which is significant. Unity's own usage analytics demonstrate why:

graph3.png

void hurrrrrrrr() {__asm sub [ebp+4],5;}

There are ten kinds of people in this world: those who understand binary and those who don't.
Advertisement

Not having to learn a made up ecmascript variant is a start. The d-n-d editor is a joke if you plan to make anything more complicated than a dead-simple platformer. GM is terribad for working in teams as well, whereas Unity has settings that make it play nice with version control. Unity has nice tools for automating animation via state machines, good physics and collision that can be fine-tuned as you desire, and works with external editors so you can code in your own environment. The component-styled UI is powerful, and the way it exposes public script members so they can be edited from the UI - even during debugging - is great. The canvas system is more powerful for making and tweaking in-game menus and HUD elements. Unity supports custom shaders without tomfoolery. Both support a kind of object hierarchy, but Unity's is similar to a scene graph, which ends up being much more convenient.

Unity also has never decided to simply disable previous PAID versions of their software, leaving people stranded and unable to continue their work unless they upgrade to the new version and deal with the massive slew of breaking changes involved in that process.

GM can be used as a tool for people that are code-phobic so that they can overcome that phobia, and it's decent for prototyping, but for serious projects I'm just picturing hours upon hours of opportunity cost.

You make some valid points, but I wouldn't say the word "overwhelming" applies, although if you are doing bigger projects than it does indeed apply more.

About the script variant, it is just another language. But due to it being "simple" it is actually much quicker to program things in than something like C#, where you have to remember rules like to add "new" keywords at times, among other things. I've used plenty of both, so I feel I can actually judge here(not saying you haven't). I totally agree with you about the d&d thing as well, and I've never taken the time to learn how to use it(since I already understood programming and was able to just learn GML right from the start).

About the team thing...if you have used GMStudio, you will know things have changed in this issue. Before GMStudio, projects were saved in one lump file, which is of course a big no-no for backups, versioning, etc... but now things are stored separately, and can freely be used with versioning software, etc... I've even used Dropbox with it successfully, which I can't say about Unity, as I have to turn off Dropbox to not get errors in Unity.

I have no counter about tools that Unity offers for animation(Unity wins in this, the same as UE4 beats Unity on the built in tools side of things). And I will say Unity's UI system(now that it finally came with 4.6 after much deliberation) is better than GM's though with GM you can get things up running quicker and easier, and Unity's whole d&d script/inspector/component system has some advantages too. But sometimes those things just get in the way, forcing you to do things the Unity way instead of however you feel like.

About custom shaders...GMStudio has a nice shader system, without tomfoolery. People have actually used it for 3d, including different shadow systems, deferred rendering, GPU skinning, and other things. One of my favorites is a thing that let's you apply normal maps to sprites(you can create with something like SpriteLamp, draw manually, or render from 3d). It makes 2d games look very nice.

About prices and version....Unity can't really say much about this. I'm sure you know how Unity is suddenly doing a huge price increase and forcing subscription for the long run, which wouldn't be a problem if the pricing made sense like Adobe's does. Also, I was using GM at the time the whole debacle with 8.0 and 8.1 happened, and I don't remember running into anything that kept me from wanting to upgrade to 8.1. Yoyogames did not charge people for that upgrade either, and in general were up front and honest about it, and frankly had a good reason for the issue, getting rid of the DRM they had issues with. Unity on the other hand, at this point announces a price increase at Unite like it is a good thing for the customers. I'm currently subscribed to the $75 Pro subscription, and I will eventually have to pay $125 for a bunch of crap, like mobile exports, that I don't want. So please....as far as the companys' actions, frankly they have both messed up in the past, but Unity is messing up right now pretty badly.

Last point...one strength that GMStudio has over Unity for the purpose of 2d games, is outright speed of development. Despite the GML language that some people don't like, and despite the lack of the whole D&D/component/object inspector system that Unity has going that GMStudio does not have, GMStudio still manages to be able to get games developed much quicker than Unity, at least for me and many devs. Those features that Unity has that make bigger/3d games easier to make just get in the way and slow people down for smaller/2d games.



About prices and version....Unity can't really say much about this. I'm sure you know how Unity is suddenly doing a huge price increase and forcing subscription for the long run, which wouldn't be a problem if the pricing made sense like Adobe's does. Also, I was using GM at the time the whole debacle with 8.0 and 8.1 happened, and I don't remember running into anything that kept me from wanting to upgrade to 8.1. Yoyogames did not charge people for that upgrade either, and in general were up front and honest about it, and frankly had a good reason for the issue, getting rid of the DRM they had issues with. Unity on the other hand, at this point announces a price increase at Unite like it is a good thing for the customers. I'm currently subscribed to the $75 Pro subscription, and I will eventually have to pay $125 for a bunch of crap, like mobile exports, that I don't want. So please....as far as the companys' actions, frankly they have both messed up in the past, but Unity is messing up right now pretty badly.

Unity isn't competing with GM here, they're competing with UE4, and even with the price increase (which is actually a decrease for mobile devs), they're still way cheaper than using UE4 :lol:

Having dealt with a number of programmers that boarded the game development scene after undertaking 'other programming work' in a different industry, I feel obliged to mention this:

Whatever you do, remember that games are a shifting requirement product. Unlike other industries, requirements shift A LOT. You might think your industry has shifting requirements, but get ready for a whole different magnitude of iterative development.

My core advice is this:

- Build things knowing they're likely to change. It's ok to write clean code, but don't overdo it, it will just be frustrating for you.

- Don't build things if they're contingent on 'nothing else changing', that's simply not valuable in the long run.

Visual studio integrates well with Unity (and now ships along with it, although it can't be used commercially de facto unless blablabla).

Your actual code will be in Visual Studio, but a lot of the mundane stuff you'd be working with can be extracted to the engine (managing public, etc.)

You also gain a few cool tools such as the Animator (see tutorials).

Unity is not the only, or necessarily the best of all engines out there, but I find it a particularly easy one to start with, namely because of the plethora of tutorials they've put together: https://unity3d.com/learn/tutorials?gclid=CJy6j5abl80CFdgegQodtzoI5A

In your case, the 2D game creation series will be most interesting: https://unity3d.com/learn/tutorials/topics/2d-game-creation

You can skip the stuff regarding code for the most part, except where it leverages the API.

Unless they've updated it recently, this series actually covers the making of a side-view arena game. Not exactly a side-scroller, but the basics are there, and so long as you set a good camera, it would be easy to extend the scene horizontally and work from there (input management is particularly well covered, and it's hard not to take advantage of its inherent logic and add controller support while you're at it because, well, it literally takes minutes to do so).

Have fun ;)

Unity isn't competing with GM here, they're competing with UE4, and even with the price increase (which is actually a decrease for mobile devs), they're still way cheaper than using UE4 :lol:

It may be that GM and Unity aren't direct competitors like Unity and UE4, but since we are talking 2d, Unity and GM compete in that market, though not as directly. And though the subscription is actually cheaper for mobile devs that are doing multiple platforms, the subscription is apparently more expensive than the upgraded perpetual license. I say "apparently" because I only do desktop stuff recently so for me it is an increase in price, but a few people have done some math and with the paying for discounted upgrade for perpetual licenses it was cheaper than the amount for the new subscriptions. And UE4 is cheaper unless you actually make money, and up to a certain amount, and then of course the more money you make the more UE4 gets more expensive, and quite quickly too. Anyway, this is another argument for another forum(and another topic :)) I brought it up just to show that companies make mistakes, neither Yoyogames nor Unity excluded. I should have mentioned when Yoyo had the overaggressive DRM going. They had license servers have some issues somehow, and everybody's sprites had skull and crossbones painted on them. They quickly got the server back working, and the next update removed that DRM. And they were up front about it. They could have just said that the build server was somehow hacked or something, but they didn't. Unity on the other hand, they announce this price increase(or decrease in a few cases) like it was a big good thing for users, and they do it during Unite, and have lots of missing information, and nobody knows the details as all they can say so far is that more information is coming. This is a fail on their part as far as I can see.



Unity can do this, but if you are truly only interested in 2d, you may be better suited to GameMaker: Studio. It is more geared to 2d and has more features suited for 2d that Unity does not have, including a multi-layer tile system, 2d pathfinding, and others. But the caveat that exists is if you are ever going to be interested in anything beyond straight up 2d, you may as well have spent the time working with Unity. GMStudio is basically crap for 3d. If your 2d games want any 3d elements, you are going to suffer in GMStudio.

He could also look into godot engine, opensource, free and has dedicated 2d & 3d so if he did want to focus on 3d at some point its open for him without limiting him in 2d games.

You are quite right there. I don't think GODOT's 2d is advanced as GMStudio's, but it is still a valid point. It is hard to suggest it though simply because it doesn't have the maturity of either GMStudio or Unity, but the really big advantage is the open source, total freedom part, which neither of the other two can claim.

Godot Engine 2D features is on par with GMStudio, maybe GMStudio is more "accessible", but you could achieve the same results on both engines.

Another vote here for Godot in 2D, as you had some programming background, you should feel in home with Godot Engine Open Source community.

A warning, don't use Godot Engine if you objective is 3D, Unity and Unreal are better suited for that job.

Source: I'm developing a game using Godot Engine.

Want to know more about me?

Check out my Devlog or Twitter

Here's another vote for starting with Unity instead of GameMaker. I too am an experienced business developer of C#/SQL turned game developer. After messing around with XNA for a couple of years I decided to look for a cool engine and since I was interested in 2d games, I tried out GameMaker. It was so mind-numbingly frustrating to write clean code in their API. Just knowing where to put code in game maker scripts is a weird problem. I felt like I was just bolting shit together. And even after I got something working, refactoring code was such a pain in the ass.

With Unity though, there are indepth professional tutorials where they explain what to do, how to do it, and even why you might want to do it this way. The language is C# which is a major plus for me and you. And the Unity Asset store is pretty darn amazing. It also integrates directly with Visual Studio and even plays nice with the debugger these days.

But don't just take our word for it. Spend a weekend with each and see which one you like better.

Good luck, and welcome to GameDev!

- Eck

EckTech Games - Games and Unity Assets I'm working on
Still Flying - My GameDev journal
The Shilwulf Dynasty - Campaign notes for my Rogue Trader RPG

This topic is closed to new replies.

Advertisement