JetBrains Rider, an alternative IDE to Visual Studio for Unity C# Development

JetBrains Rider: An Alternative to Visual Studio

For quite a long time, Unity installer came with a custom MonoDevelop distribution to assist Unity developers with starting with game development. At that time, it was the only available option for many, since other solutions were simply too expensive. Visual Studio Community was then introduced, and almost immediately it became the default Unity C# IDE, but only on the Windows operating system family. It seems like quite soon we will have another player on the market and its name is JetBrains Rider.

.NET enslaved by Windows

It’s not surprising that the language created by Microsoft works best on Windows operating system family. It seems that even Microsoft is surprised by how .NET got so popular these days. It’s a bit of a problem, because today we’re entering a new era in which Windows is no longer a dominant operating system in the world and .NET is widely used on variety of platforms thanks to Unity. If Microsoft wants to keep .NET position and profit out of development tools, .NET must become a cross-platform framework for real.

The first step of becoming more open to multiple platforms was introducing .NET Core (wikipedia) – the first open-sourced .NET implementation. Then Microsoft introduced Visual Studio Code – the first editor with “Visual Studio” in name that works on MacOSX and Linux. Still Visual Studio Code is “only” a GitHub Atom fork. It’s a great editor, but it’s nothing when compared with original Visual Studio IDE running on Windows with ReSharper onboard. Speaking of which…

There’s a new player in the game: JetBrains Rider

There’s a market gap for sure – more and more developers tend to use Mac OS X or Linux as their development platform and beside Visual Studio Code and MonoDevelop (which is good, but not so great) there was nothing worth considering until recently.

JetBrains is a Czechia based company known for the creation of a great Visual Studio extension called ReSharper, and IntelliJ IDEA (IDE for Java developers). It seems like they’ve recently decided to merge those two.

JetBrains Rider is a cross-platform .NET IDE based on the IntelliJ platform and ReSharper. If you don’t know either one of those, then consider this as a great opportunity because learning these two tools will change the way you work with your code forever. Do I need to tell that it will increase your productivity? Yes, it’s a buzz-word, but it’s true! What is more important, it will make your work easier and you – happier.

How valuable is your time?

Do you value your time? How much time do you spend on writing easy but bloated code and how much on focusing on problems that matter? ReSharper is a tool that helps you to get through the parts of the code that are not requiring too much of your brainpower. It consist of powerful generator and refactoring methods that will assist you on demand. It also includes code analyser that makes sure you won’t make any simple-to-prevent mistakes. Besides that, it just tries to be smart and friendly to a developer.

Rider comes with native Unity plugin! It does not only make it aware of *.meta files, but also know MonoBehaviour specific methods like Update(). Thanks to it you will see a code-completion of these methods and you won’t be seeing any warnings about unused functions.

It’s even aware of Unity-specific optimizations like tag-comparing:

And maybe it’s not that important, but it also shows how Rider developers are getting into details – colouring of Color struct constructor:

Yeah, your guess is right! It shows you the actual defined color!

I won’t make a complete list of ReSharper features, because there’s just too many of them. Instead, please browse the documentation. There’s a lot of great and simple to understand examples out there.

Still, it’s important to mention that Rider, by contrast to Visual Studio Community and Visual Studio Code, is not free. Actually, it is distributed via Early Access Program which now costs nothing, but it’s justified to believe that Rider will be using a subscription payment model. For many people this information would be a no-go, but consider whether it is worth it – it can increase your productivity (in my opinion quite a lot, if you get to know it well).

But I’m happy with my Visual Studio on Windows!

I’m also a satisfied Visual Studio user on Windows. Why changing it then? The reason may be quite simple, take me for example. I’m working on Windows about 50% of time. Rest of it I spend on my MacBook and Linux Mint. On all three I sometimes need to do something in Unity. The real pain is that I have to use totally different IDE on all three platforms since Visual Studio Code for some reason does not play well with Linux (some strange mono issues) and I had to use MonoDevelop there. I’m really looking into Rider to get out from EAP to use it constantly on all of my 3 development platforms. And even now, while it is still in early stage, it works really, really well! Yet, if this scenario doesn’t fit you at all, I still encourage you to try it!

Conclusion

Rider is a fresh approach to .NET development. It focuses on developer’s productivity, happiness and it is aware of current market trends, which makes it an interesting alternative to Visual Studio.

JetBrains reader can be downloaded for free from its home page. Each version has a expiration period of one month. New versions are released at least once a month so until Rider is still in development, you will be able to work with it without any costs.

I strongly encourage you to learn as much shortcuts as you can – this IDE has been created for those who favor keyboard over mouse. If you don’t know the shortcut that you’re looking for, try hovering over an option to see a tooltip that often will tell you wanted key combination or try pressing shift twice to open Search Everywhere popup. It allows you to search through all of the Rider actions.

Dream Big, Start Small

Dream Big, Start Small

What motivates you to go on with your ideas? Would you like to build a game that will be the next big thing in the industry? Who wouldn’t!

A path to success

People ought not to hear and talk about failures. Instead of it we discuss successful stories about how a small indie developer has made a game that brought him thousands dollars of income per day. Some of these ideas seem to be so simple that you may think to yourself “why I did not come with such an idea?!”. I will tell you why – it’s nearly impossible to be successful at very first attempt, you have to fail first, fail often, fail miserably, fail hard. You will never know how to build a successful product until you learn how to not create one.

Not very heartening vision, isn’t it? At first, I didn’t want to believe it. I had a strong faith in each of my projects even if almost all of them were failed attempts to create something bigger. I’m a very stubborn person, so even after a series of big failures, I kept going. But sometimes I was seriously thinking about giving up. I’d like to give you a piece of advise on how to deal with failures and how to reach out for a success much quicker than I did. I hope that your understanding of what a failure is will change, because believe me – it’s not that bad.

Start small

If you’re playing any game for the first time, you need to learn how to play it. There can be a tutorial, or a set of easily understandable stages where you are learning the mechanics. Then, it’s all about exercising to get through more difficult stages. From time to time, there can be a boss fight and the final boss at the end of the game. Final boss should be something that will test everything you’ve learned while playing the game. Beating him gives a great satisfaction that your hard work finally brought you to that very point.

With some exceptions you wouldn’t go for a final boss fight right after starting to play. You know that you do not have enough experience and you will fail. So why would you then go and try to create an epic game with large world and extraordinary story-telling if you don’t know how to create a simple puzzle game? Maybe because you do not realize that this is your personal final boss.

Think of a gaming industry as your newly bought game. Even if you feel that you know how to play it, assume that you don’t – that’s a safe assumption that can be easily verified in a short period of time. Now start small. Put your plans about big and wonderful games aside. Think of something really small, like Tetris or Breakout. Make a list of ideas and choose one that you believe would need the smallest amount of time to achieve. This is where you want to start!

Don’t get discouraged by that! Small and simple games can be interesting and exciting. Just think of it as of an exercise about creating a good game mechanics out of a simple idea. Great AAA games are filled up with a bunch of smaller game mechanics, even if you might not realize that yet. A game theory may be something that you need.

Don’t worry about the game marketing at the beginning. Even if you create a good game and there will be nobody to play it, make more games. Cross-promote it, talk about your creations on Reddit. If it is good, you will surely get some attention. Besides attention, you will also get some feedback. A word about feedback – wait for opinions to repeat itself. If you will hear several opinions about the same thing, this means that it may be really important thing to take care of. Otherwise, don’t waste your time.

Dream big

When you will decide to start small, there will alwaysbe a dream that will have to wait for its time to come. But how could you know when the time is right? Trust me, you will! Until then, you will get a plenty of experience, you will know your enemy well and most probably – you won’t be alone. You may get to know a bunch of experienced people who saw you going forward step by step and will be willing to help you with your dream.

Do you know somebody that is so full of life that it affects all the people around her or him? Being a positive person significantly changes your surroundings. You will attract people who are thinking similar, change minds of those who are uncertain and scare off toxic people. The same applies to you – if you’re working hard with belief that someday you will fulfill your dream – you will attract people who are similar to you.

Be prepared that your dream may evolve to something else. As you will be discovering the market better and you will understand more and more what makes a game successful, you may alter part of your idea. That’s a good thing, because by doing that you’re increases the chances of your big dream becoming successful.

What if your big dream will fail… again? Until now you surely have learned that a failure is not the end of the road and even a failed project can be continued. Sometimes it just needs a little push to a different direction, a fresh idea or even a restart.

Keep believing in your dreams. Be prepared for a failure and learn why it happened. Make sure to fail a little less with each new project. Repeat the process and one day you will fulfill your dreams. This will be your final boss and the reward for everything you’ve learned on the road so far.

Computer Programming Code

You don’t need that comment!

Let’s talk about programming. Since you’re a Unity developer then most probably you had to do some programming, unless you use Playmaker or something similar. As a programmer you most probably want your code to be as readable as possible, because sooner or later you will have to work on it knowing why you’ve done something in a particular way. What is your method of making your code more readable? Do you use in-code comments? If yes, you’re doing it terribly wrong.

Why comments are bad

You may now think of me as of an idealist. Thinking of a world without conflicts, religion, etc. Well, it’s nothing like that. Every source code requires more or less comments, but in most cases, when you may want to write one, most probably there’s a better solution.

Why do I state that using comments is bad?

Comments can get quickly outdated

Consider this piece of code:

And let’s say someone will refactor it:

The person who did the refactoring replaced 60 seconds with PlayTime field and then made it 120. It’s a common “mistake” to leave the comment. Even if the comment would be updated, anyone who will change the PlayTime value won’t be aware of a comment in Update() function that is now lying to us.

Comments need to be read along with the code

Isn’t this a purpose of comments existence? Well it actually it is, but if there’s a comment then it means that reader needs more time to get through the code because he or she needs to analyze code and all the comments. It’s not only the matter of how much there’s to read – code that needs a comment can be understood only when reader can get understanding of a comment – so there’s as twice as much things to analyze.

Now I’d like to show you some real scenarios in which comments were used, as well as how it can be improved and why.

Use meaningful variable names

Something so obvious, yet frequently ignored. How often did you stumble upon variable names like abx2, etc.? Let’s take this code example:

First of all you should know that using short variable names won’t make your application faster. It only will make your code less readable. Always remember to use meaningful variable names. “Meaningful” does not mean long, so if you want to use a short version of variable name, you are allowed to do so, provided that it can be easily decoded (pointer -> ptr, texture -> tex). Using too long variable names can easily backfire with code that is too bloated, so you have to make compromises.

Note that we not longer need the comment because playerToEnemyDist variable name tells us enough about what we’re doing in that line.

One more note about variable names: for loops are frequently using a counter variable. It’s perfectly legal to use “i” or “j” as a counter name since it is widely used style of naming. The same applies for “x”, “y” and “z” while we’re making operations on coordinates.

Do not use magic numbers

“Magic” numbers are numerical values that exists inside methods and it may be difficult to know why these numbers are set in a particular way. Magic numbers should be extracted into variables, fields or even class constants with meaningful names.

Do not explain ifs

If you have an if statement and it may be not clear what it does and why, you may be temped to make a comment to that statement. Before you do, think of extracting your if () condition (what’s inside) into a meaningfully-named method.

Please note two things:

  1. By extracting if condition we could move distance calculations into a separate method so Update() function has much less code to read now.
  2. EnemyIsNearPlayer() function name is self-descriptive. We do not need a comment here.

Watch out for function parameters

See this code?

How you can tell if the poison is a secondary attack without a comment? Well, you cannot. This scenario is a good example where a comment is really needed. Still, if enemy’s class is something that you can refactor, consider using a struct instead of raw parameters:

So our code may finally look like this:

Summary

At first glance it may look like  producing more code instead of using comments for much simpler code, but trust me – this will greatly make you and your colleagues’ life much better in the long run.

Still, if you feel that a comment is really needed and there’s nothing else to do – go ahead! There are situations where you cannot do much about it. Yet remember that the information in your comments may someday become outdated, so keep it simple and safe.

Game Production Pipeline Infographic: Game Design, Development, QA Testing, and Marketing

Game Production Pipeline Infographic

When you first start thinking of making a game, it’s quite important to consider the amount of time and energy that it will take to complete it. Some games can take years to complete – for both Indie game developers and their AAA counterparts. When working with game publishers, for example, game studios will need to be able to accurately estimate the project’s timeline and respective milestones so that the game is shipped on time. We decided to make an illustration of the game production pipeline in order to visualize the process of making a video game.

Game Production Pipeline Infographic - Game Design, Game Development, QA Testing, and Launching the game marketing plan.

 

  1. Pre-Production Stage

Everything starts from the ideas. Ideas can be unique or inspired by other games. It includes superficial description of game mechanics, story, genre, platform,  etc.

IDEA REFINEMENT – usually termed as building storyline, it involves defining main character, plot setting and overall game theme. During this phase, devs identify the game goals, controls and start sketching game art.

Game Design Document is the output of this stage which describes various game elements as well as project plans for the development.


  1.    Production Stage

After the pre-production phase is complete, the development of the game enters the production phase and now larger group of producers, designers, artists and programmers are brought into the mix.

DESIGN – designer designs game art based on desired theme. Depending upon the iteration, the art can involve designing main game play, levels, bosses, menus or promotional art.

DEVELOP – programmers build game logic based on art designed for the iteration. Based on the iteration, this can be developing core game play, writing AI or implementing UI/UX.

TEST – testers validate various scenario of gameplay to ensure higher quality of game. They validate each build on target platforms to provide feedback for next iteration.


  1.    Post-Production

When the game is considered “feature complete” and all of the code has been written and art has been completed, it’s moved to the post-production stage.

TESTING – this stage is usually referred to as beta-testing and begins when all of the code and art has been completed. After the testing the game is being approved for the launch.

DEPLOYMENT – the game builds are deployed to the stores & platforms and are then officially released to the public.

MARKETING – post-production marketing is a process of promoting and selling the game, optimizing game discovery including market research and advertising.

Myths and Facts of the Unity Game Engine

Unity is only for games

It’s a myth. Of course Unity has been created as a game engine, but it’s so flexible that it is successfully being used in other industries, such as architecture, medicine, and engineering. For an example, see 3RD Planet.

It is the largest online consumer event platform, showcasing the top tourist destinations in each country with Unity 3D.

The Coherentrx SuiteAnother example is The Coherentrx Suite.

CoherentRx is a suite of point-of-care patient education applications that combine realtime 3D anatomy models with HIPAA-compliant doctor-patient messaging. CoherentRx apps currently address ten medical specialties, from orthopedics to opthalmology.

In the Unity Showcase there’s a separate category for non-game applications. Check it out yourself!

Unity is free

It’s a myth, but not entirely. You can download Unity for free. The free (personal) version of Unity has all the features that Unity Professional has (with some small exceptions). When your game is ready, you can publish it and make money out of it! It’s just like that! But if at one point your company exceeds a turnover of $100,000, then you are obligated to purchase the Unity Professional license. It’s not too expensive at that point, because the cost is $1500 US dollars. Sounds really cheap when compared to $100,000, doesn’t it?

The difference between free license and pro license is that in the former one mobile games and web games display a Unity logo for few seconds on startup. It’s not a big deal, but as a professional game developer you may want to get rid of it sometime in the future. Also, you aren’t allowed to use Unity editor pro skin and Cache Server.

You can only do small games with Unity

It’s a myth. The reason why there are so many small games created in Unity is that it is very indie-friendly. Unity does not constrain your game size in any way. You can create a clone of World of Warcraft if you really want to! All scenes can be loaded and merged in the run-time, so player won’t see any loading screens while playing. It’s also not true that Unity performance degrades when you have too much objects on your scene. Of course you have to optimize it in a special way. So it’s all about the experience.

One of the greatest examples of a large-scene and well-optimized Unity game is City Skylines.

Unity is worse than Unreal Engine

It’s a myth, but it really depends on what are your needs (it’s not worse in general). Unity has been always compared to Unreal Engine because the latter always had the upper hand in game development industry. Today the situation is a little different. While Unreal Engine was targeting PC and stationary consoles, Unity took its chances with mobile devices. Unreal was always about big games with stunning visuals, but this approach made it more difficult to learn and use. Unity on the other hand is based on the Mono platform. Thanks to that you can program your games using C# instead of C++ which is quite difficult to learn.

maxresdefault

Unity GDC demo – Adam – Part 1

Today Unity is trying to take over the Unreal Engine market. The first steps were made by Unity 5 graphics enhancements and by the optimization of scripting backend. On GDC 2016 Unity Technologies has published a stunning real-time demo of what Unity 5.3.4 is capable of. From today it will be more and more difficult to tell the difference between Unity and Unreal Engine graphics capabilities.

You don’t need programming knowledge to use Unity

It’s a fact. It’s easier when you have at least some programming knowledge, but you can easily build a complete game without it. One of the most popular editor extensions on the Asset Store is Playmaker. Playmaker allows you to build finite-state machines that will drive your entire game logic, and it does it well! If you need a good reference, then Dreamfall Chapters is a damn good one!

playmaker screen

Because of this fact many people may consider Unity as a toy rather than a serious tool for creating games. The truth is that Unity can be used by everyone, regardless of your skills!

You cannot spawn threads in Unity

Again, it’s a myth. Many people are confusing Unity coroutines with threads. Let’s get this straight: Coroutines have nothing to do with threads. Coroutine is only a way to delay code execution without too much effort. It’s really a great method of writing game code when some routines are needed to be executed in sequence over a time (like animations), but everything is still done in a single thread.

Yet you can create threads in Unity. You will not find too much about it in the official documentation, because there’s not much to be said. All you need to know is that Unity API is not thread safe, but it is a good thing! To learn more about how to use threads in Unity please read our article about threads.

All Unity games looks the same

It’s a myth, of course. Every developer who decides to use one game engine or another is asking himself a question how this game engine will help him and how it will constrain his ideas.  Unity is quite interesting because it’s easy to learn and hard to master. Yet if you will master it you will realize that you can do almost anything with it! You can even create your own game engine within! If you’re still wondering if Unity constrains your creativity, stop right now. It doesn’t!

You need to know that many of Unity components (like physics) can be replaced by anything you want. There’s no requirement of Unity game using components provided by Unity. This is a great deal if you have very specific needs.

Unity has a lot of bugs

It’s a fact. Since Unity 5 the developers were rushing forward with new features, but with a cost of stability. On GCD 2016 current Unity CEO John Riccitiello announced that Unity will take a road of increasing Unity releases’ quality. At the time Unity 5.3.4 has been released and Unity 5.4 entered a beta stage. Let’s hope for the best, because we all need a tool that is as stable as possible, and lately there was a serious fear of upgrading to a new release that could be heard in Unity community.