| Blockland Forums > General Discussion |
| OH MY GOSH IM LEARNING TO CODE |
| << < (11/12) > >> |
| otto-san:
--- Quote from: Electrk on September 08, 2012, 03:54:18 PM ---setro's definition of "learning to code" is copying someone else's and just replacing a few things. --- End quote --- Which is how a lot of people may start out. Granted, it's not nearly close to making some kind of functional thing, he has actually made scripts from scratch already. Granted, they had problems, but that's to be expected. |
| .:FancyPants:.:
i already know python, some lua, and a bit of HTML. all of it from youtube. |
| Kaphonaits²:
--- Quote from: M on September 08, 2012, 08:41:16 AM ---<3 It is actually good to do that (though you wouldn't want something like that in the Pref namespace) - makes your code easier to read. No need to write comments if your code's behaviour is obvious from reading the code itself. I personally would have used something like $BlockyTraitors::Role::Dead. --- End quote --- This is true, however I planned for moments like this! --- Code: ---//Blocky Traitors :: blockytraitors.cs //by Kaphonaits //Contains most of the code as this is the "main module" of the script. //The code sucks a little bit. :( --- End code --- tl;dr Kaph got lazy and did things not-the-best-way and wrote a comment at the top to somehow justify it. I'm good at these things though, I promise. Just not when I don't feel like it. |
| Lugnut:
--- Quote from: M on September 08, 2012, 12:58:28 PM ---It's Javascript with the browser APIs (DOM manipulation, browser interaction and such) cut out and replaced with APIs for stuff like HTTP serving, raw TCP/UDP sockets, file operations, etc. running under V8. (plus obviously support for accessing your own libraries written in C++ or JS) I worked for a while on a wrapper that spawns a Blockland dedicated server as a child process and uses Node.js to provide access to its console output, and I also write utilities to make my college work easier using it since you can use the REPL library to make an interactive JS environment with your own code pre-loaded into it. The API documentation has everything you'd need to get started, assuming you know JS syntax and the base objects and such. Notably the Net library for TCP sockets. Running it on its own just provides an interactive Javascript session too, which is handy for stuff like testing code concepts/snippets. Running a file is just node aaa.js much like with any other script environment. --- End quote --- so it's coding in javascript, not coding a webserver in javascript that the client hosts? |
| Swat 3:
--- Quote from: Lugnut on September 08, 2012, 11:53:22 PM ---so it's coding in javascript, not coding a webserver in javascript that the client hosts? --- End quote --- Scripter 2012 not knowing how to script? Disqualified. Im kidding, love you. |
| Navigation |
| Message Index |
| Next page |
| Previous page |