VM stands for virtual machine, which is just an underlying system for a coding language. The general idea is to create a coding language in Gimkit that takes input through the arrow keys and/or overlay buttons and outputs through text boxes (potentially using colored emoji as pixels). Hopefully, this will allow users to recreate the block code once and be able to recreate other peoples otherwise complicated games simply by copying code into a property. Ideally it will evolve over time to be more efficient and user friendly with the input of its users.
How It Works
Input
A video game without a controller is called a movie. As fun as those are, that isn’t the goal. In order to add input we must first put the player between four zones and teleport them back to the center whenever they step into a zone. Then we’ll make a property called “input” and whenever one of the zones get triggered it’ll add its direction to the end of the property (later, when this is read by the processor, it will read the first character and delete it).
Output
A video game without a screen is pointless (unless you just want to use the controller as a fidget toy). Our screen will be made by text boxes with colored emoji as pixels. Any display size is possible (theoretically), but I’ll give an example for 10x10.
It’s pretty simple. You just create a property called “display” that’s 100 characters long (consisting of colored emoji for pixels) that will be changed by the processor. Then you create ten text boxes, stack them on top of each other, and set them to display chunks of ten characters of the “display” property.
Everything in Between
This is where things get complicated fun.
First, we need to create a property called “code” that will eventually contain the program and another property called “line” that points to where you are in the program. The actual block code will look at the line in “code” specified by “line”, execute the instruction, then increment “line”.
I currently intend to only have two instructions (although I’ll probably add more later): “set” and “if”. Ideally, “set” will be used to declare, modify, and read variables (important: this can also be used to change the “line” variable, allowing for jumping and looping). The “if” instruction is equally vital, it compares to variables and if the comparison is false, it’ll skip the next line (especially useful if the next line is a jump), allowing for branching and conditional looping. Both of these will also have some operators (such as “+”, “-”, “*”, and “/” for set and “=”, “<”, and “>” for if) to allow for them to actually be useful.
The last thing I want to go over is variables. We don’t want to put a limit on the number of variables a programmer can use, but we can’t just use typical variables or properties. Instead, we’ll have a single property called “variables” that contains the names and values in some sort of dictionary style format.
How You Can Help
You might have noticed that I didn’t give any examples for code or how variables are stored. That’s because I haven’t created a system for syntax yet. If you think of a potential method for syntax feel free to share it.
If you think you see a mistake, oversight, or inefficiency in my idea, go ahead and tell me. Either you fix the problem or I explain it in more detail and it gives people a better understanding.
Try to create parts of this on your own, then share ideas and problems you come across.
I haven’t started working on timing and frame rates. See if you can find out how to calculate exactly how much time has passed.
Thanks for reading! This is my second post so let me know how you think I could’ve done something better.
seeing how I’m a 2nd year info tech student and I can barely understand this I doubt I can make a virtual machine in gimkit but the idea seems fairly interesting
and has the vibe of “playing gimkit in gimkit” even though I don’t think it can
but I can research some syntax and try to help (even though i’ll probably forget this within the day)
but one question before I go ahead and research this stuf
I have a question. if actually planned how do you plan for this thing to run an os?
because I know most virtual machines do that (then again I wasn’t the brightest info tech student so I might be wrong because I mostly just did hardware and not software stuff)
I’m sorry if it was confusing. As for your question: this isn’t meant to run an OS, just small games (although I’m not yet sure what it’ll be capable of once I’m finished). I also apologize if the term virtual machine was especially confusing (I’ll admit that I’m not sure I used it right).
Theoretically speaking (), this is possible because gimkit is turing-based.
Other coding languages have been imputed into gimkit (Blackhole927 recreated brainfall (not real name, it’s inappropriate)), but it’s really hard and actually using the programming is extremely hard.
I’ll help in any way I can, but to be fair, a whole programming language with movements and all has already been given to us. Just detecting player movements and all can give us the text outputs, so honestly just don’t overthink this and don’t try to make the wonderful world we already have more complex than it’s beauty holds.
Well @Here_to_help isn’t this going down the category of having to mess with Gimkits Main code instead of its built in components we get to mess with? which I feel is possibly what were going for?
Yeh, kinda the joke behind making it in gimkit.
As for how, I have absolutely no idea, you’re asking the wrong fella.
Ehhhhhh not exactly, more like re-representing that code base on the outputs. Basically, real inputs → gkc outputs = our new inputs → our outputs. If I’m understanding correctly.
quick question, would my 4-bit computer project be considered a VM? Im not just making a CPU, but also graphics cards, a minimalist OS, display (size not determined yet), RAM, and SSD
Most likely yes. Any computer built in gimkit creative could be considered a VM because a VM(based on my understanding) is a computer that is being simulated in an environment. This means that a VM has no hardware, just software, but it acts like a computer with hardware.
I think you should just create a new topic. I’ve been following your progress on building a computer in Gimkit and I’m interested to see where it goes.