How Could I Learn Coding?

I wanted to learn how to code for the workshop arcade games, but I’m not sure where to start. Which coding language that the arcade API supports is easiest to learn, and where should I start?

5 Likes

I’d start by playing around with Lua in gmod in particular since you probably have experience with that game. I’ve heard it’s easy to get into if you have the patience. Another game called “Rolled Out” I backed is going to be using Lua scripting in their level editor as well

1 Like

I’m not really familiar with how Lua works, but I guess I could try that.

Best place to start learning any programming language would be to learn the basics with some simple tutorial websites and programming manuals.
https://www.lua.org/start.html
https://www.tutorialspoint.com/lua/
https://www.lua.org/manual/5.3/
http://lua-users.org/wiki/LuaDirectory

Then when you have learned the basics and feel confident in your abilities then you can easily move over to making your own projects.

There’s also a gmod community where the admins are partly selected based on their coding skills in LUA and other stuff, you could probably also ask them for some pointers.

They also got a github with almost everything they have made for the server.

2 Likes

Lua and Javascript are to be supported by the Arcade API, both are decent starting places to learn.

Even though Python isn’t supported by the API I’d recommend it to learn coding, it’s designed to be easy to read and it’s pretty much the go-to language to begin learning. It’s cross platform, runs everywhere and has powerful libraries that can do anything you want.
And it will make understanding and learning LUA easier because a lot of what you learn in one language makes it easier to understand others, it’s just that Python is very good at general purpose things so whenever you have a cool idea to code, Python will make it very easy to do.

I don’t think anything language-specific I would say hasn’t been said yet but have two big wisdoms:

  • Collect experience. There’s barely any tutorial I’ve read about a language I’ve had some experience in that didn’t make me think “Okay that part is dumb, you should do it this way instead.”
  • Comment the shit out of your code. If there’s any thought behind why you wrote that particular line that’s not explicitly obvious written in the line itself, there’s a person that will love you for writing that thought down and will hate and want to kill you if you don’t: Your future self. Code readability is almost more important than working code. Or is it? Ask future self.
1 Like

skillshare is a great website too!

2 Likes

which languages do you have experience in?

Honestly Lua seems to be the easiest to pickup for the arcade API in my eyes. It isn’t too hard to grasp the basics for and is simple to write. Imo you should just learn the basics like variables, functions, and loops and just then just hop into the arcade API with those few things under your belt.

I don’t know about you, but it’s much easier for me to learn by doing than by reading. Just come up with a super basic idea and try to make it with the API. Make a box, then make it move, have it change colors when you click, just come up with something and go from there. Get out of your comfort zone and try new things, every project you attempt will help you grow and understand more.

The arcade API we have right now supports both Lua and Javascript. Part of the reason I’m recommending Lua over Javascript is that it’s a little concrete than Javascript by which I mean it won’t do weird unexpected stuff that JS is known for doing. They’re both are pretty simple and which one you decide to use is ultimately on you. Remember that every language is basically the same thing once you get the basics down, they just have different formatting for the most part.

It’ll be hard and annoying at first, but you’ll get there. Best of luck on your quest! :heart:


Also here’s a cool program that uses Lua to make games/programs similar to the API we have now:

It’s much more fleshed out than the current API is and might help you do some things that you can’t do at the moment without some major headaches/using other people’s code like drawing text. Lots of helpful guides/tutorials and syntax reference can be found on the wiki as well. I know Mac himself used it before to make his portable piano app.

And here’s some commonly used IDEs (fancy programming notepad) that you can look into:

4 Likes

Might I add the following IDE while we’re at it:

https://www.geany.org/

1 Like

what is this?