I’m tired using javascript and block language. I want to create games with more languages like C++ or C# that are better for creating videogames. Is it possible? If yes I would like to know if I can also import unity projects.
I don’t think you can import Unity projects. Unity is a 3d game engine, while Arcade is 2d. There are projects that make the illusion of a 3d area, but I don’t think you can take the code from Unity and put it in Arcade.
Arcade only supports blocks, JavaScript, and python (I think)
There is a way to use C++, but I wouldn’t recommend it. We mostly just use C++ for interfacing with hardware and you can’t author it in the editor (you need to use the CLI). Plus your C++ code wouldn’t run in the browser, only on hardware.
@GameGod is correct; we officially support blocks, javascript, and python
Out of curiosity, why you are tired of javascript? What about C++ and C# appeals to you?
I am pretty sure that microsoft arcade only supports blocks and javascript.
Well, I’ve heard that C coding languages are very good for making videogames. Almost every game that I like use the C languages and Unity, like rain world. I love the make code arcade hardware because you can bring them everywhere, they are very small and very easy to carry. But the problem is that its games are very simple and light and you can finish them in some minutes. JavaScript is mostly used for web pages, and not for videogames, because it can’t carry and calculate as much logic as C languages. (For example I tried to create an enemy AI, but the game preview would just get stuck or glitchy, and the main character wouldn’t obey my commands for some reason, and I don’t think that it was by a mistake I made while coding because I have used that AI in many other games that I make)
I did try to make an AI tho but i failed.
Actually I don’t know about C language.
Looks like the constraint is the engine (exposed APIs), not the programming language?
@Nobrain you can do pretty much anything in JavaScript that you can do in C++ or C#! The reason that so many video games use C++ is usually one of two reasons:
- The game engine they are using is written in C# (like monogame) or C++
- They need to write something that is very performance intensive (like graphics or shaders)
In my opinion, C++ is one of the most difficult languages to learn and use. It’s a programming language that was created 35 years ago and we’ve learned a lot about how to make programming languages better since then!
If you are just starting out, I would suggest not worrying too much about the language that you are learning. The good news is that once you’ve mastered a programming language it becomes much easier to learn a new one.
Anyways, that’s just my opinion and I’m a little biased as a member of the MakeCode team
@Nobrain, you’re definitely right that the majority of games, especially large commercial games, are made in C# and C++. And game engines like Unity, Unreal and others definitely let you make more advanced games than Arcade does today and I’d highly recommend checking out other engines if you feel motivated! Personally, I think Unity stikes a nice balance between power and learnability. (I can highly recommend the “Brakeys” YouTube channel as a good place to start.)
The reason MakeCode Arcade games today are comparatively “simple and light” as you said are likely due to one of two things:
- Arcade’s hardware orientation. Like you mentioned, you can take Arcade games onto small and relatively cheap hardware devices. Most games made in Unity or Unreal would be unable to be loaded onto hardware any smaller than say a Switch. In order to target these smaller devices, Arcade has a number of limitations like the screen size, 16 colors, and limited buttons. (Note that hardware isn’t the only reason Arcade has these limitations. We also believe that these limits make creating games more approachable and less overwhelming.)
- Arcade’s youngness. Arcade is still in it’s very early stages as a game engine especially compared to popular engines like Unity and Unreal. Many of the limitations you might run into today, we’re very interested in addressing and are totally achievable within the bounds of Arcade. Old GameBoy games could be deep and content rich and there’s no reason Arcade games can’t be too.
This definitely sounds like a bug or limitation with Arcade that should be addressable. Would you be able to share with us the AI code you wrote that didn’t work as expected? There’s a good chance we can fix the bugs in our engine or at least remember them as future work.
But actually it was a very long code, and i deleted it and the character. Then I tried tried to make a different character with lighter coding.( It was actually really long because it was supposed to be an enemy who lived his own life, he could hunt, sleep, and other stuff based on variables, like tired level which increases while moving, or hunger level which increased while not eating, that when it reached a limit, the character would get more aggressive, and later he would die. The code was very hard to make and it took like two weeks. But it started to glitch when I started making the view rays that they were supposed to be released by the enemy, but when the enemy would start to cast those, the character wouldn’t move.)
Wow, that sounds like a pretty awesome AI! It definitely sounds like a bug in MakeCode that we could fix. We’d be happy to do so if you have parts of the code around.
Also for large programs like that I’d recommend considering GitHub with MakeCode: https://arcade.makecode.com/github/getting-started
The good thing about GitHub is it lets you periodically save your code such that even if you decide to delete it you can always go back in time to get it back if you ever want it again.
GitHub might be especially interesting to you if you’re thinking about C++/C# and using bigger game engines. All professional and even most indie game development uses some kind of “version control” like GitHub.
This reply is 4 years too late, but I wanted to jump in with my 2 cents. I agree with Richard on C++. It seems nice and powerful on the surface but it’s really frustrating to use. When I was studying Computer Science at University, we started with C and C++ and it broke my brain. You have to write lots of boilerplate code, the syntax can be difficult to read at times and pointers are the most infuriating coding concept known to mankind. I won’t go into detail on pointers, but they’re essentually used to “point” to where a variable is stored in memory. However, if you don’t set these pointers correctly or don’t delete them when you’re done with them, you get errors. I’ve since gone on to use a whole lot other languages and once you understand the principles and logic behind programming, you can learn any language.
Games were primarily built in C++ in the past because C++ was the most performant language and could handle 3D graphics (and OpenGL and DirectX libraries) better than other languages. However, in the last decade or so, languages like C# have come a lot closer to the performance of C++. Unity uses C# (and some C++ under the hood but as far as I know, you can’t write Unity scripts in C++) and is pretty powerful. Also nowadays, one way to improve a game’s performance is to use multi-threading. This means running code at the same time on multiple threads/CPU cores. To use a simple example, imagine your code was creating a city with 100 buildings. It would take a while to place all 100 buildings at once. Instead, you can use 4 threads to each place 25 buildings. This will be faster. It doesn’t mean that all 100 buildings will be placed at the same time, but it does mean that each process can start at the same time. Multithreading is complex and it took me a while to fully grasp it, so I’m not going to try to explain it all here. It’s just an example of how a language like C#, which is not as powerful as C++ yet, can still be pretty powerful and how you can use certain techniques to improve performance. Unity supports multi threading but I haven’t tried it out yet.
If you want to build games in C#, I would recommend Unity or Godot. If someone wants to build games in C++, then Unreal 5 is your best bet. All three of these are free to start in and Godot is open source so it’s always free. Godot also supports C++.
Regarding Typescript, it is actually a very flexible language. The only real limitation is the web engine and hardware it’s running on. Also, Typescript has a few similarities with C#. Firstly, Typescript and C# were designed by the same guy, Anders Hejlsberg, who is a software engineer at Microsoft (according to Wikipedia. I don’t work at Mictosoft so please correct me if I’m wrong). Secondly, while Typescript and C# have different syntax, they work quite similarly. I’ve been working with both recently and the concepts are similar. Thirdly, they’re both statically typed, which means a variable needs an explicit type at runtime. You can still use dynamic types in Typescript because it is built on Javascript, but I prefer to use explicit types. It just makes it easier to code and debug. Lastly, they’re both owned and maintained by Microsoft.
I was actually really surprised by what you can do with Typescript and Makecode Arcade. Typescript is a versatile language but I assumed the version in Makecode would be limited. As it turns out, there are only a few features in normal Typescript that aren’t supported in Makecode and most of them I have no use for.