C# Emulator (POSTPONED!)

EDIT: This C# Emulator has been postponed until further notice. you can still use it, just it will be bare-bones and empty in commands.

After one month of working, I present to you...

A C# Emulator with only one command :|
(Boooo! You suck!)

But that's okay, right?
Anyways, after one month of working, I present to you a C# Emulator project fully made in Snap!

There is only one command that actually does something. It's the Console.WriteLine(); command. However, there are 2 functions: the // function and the Console.WriteLine(); function.

The reason why I don't have many commands is because I am more of an intermediate coder, and this C# emulator is more of an advanced project for advanced coders, and so it would probably take a long time for me to actually implement commands. So sorry.

Anyways, enough talking. Here's the project: Snap! Build Your Own Blocks

This C# Emulator is inspired by Scratch's emulators (Like that GameBoy Emulator from a long time ago).

It is very unfinished and doesn't have OOP structures. There are no classes, no voids (Functions), and definitely no advanced commands.

It doesn't do anything?

You have to press the "Run" button (Sorry for not explaining that).

Also if you didn't add a ; or anything, it won't work.

Also if you have 2 lines of code, one with some symbols missing (Like a ;) and another with the correct symbols (Like Console.WriteLine("Hello World!");) then it won't work.

Alright, everyone. Let me explain some things.

The "File" button currently does nothing but I plan on adding upon that sooner once I get the help I need.

The "Clear" button clears the code (All of it). I couldn't make it clear one line at a time.

The "Run" button runs your code (Not walks!)

The "Stop" button stops your scripts and also clears the "Run" tab.

I actually did that and nothing happened. That's why I posted that...

Thank you for the advice!

Changelog 1:

  1. For the Console.WriteLine(); command, I deleted the part where you have to add two "" (Double quotes) because sometimes you want to print out variables (Like string variables).

  2. Added a "while" command although it doesn't seem to work at the moment.

  3. My plans for the "File" button is that you can save your code and share it with someone, or you can open a C# project you've been working on. My idea for opening an existing C# project would work like this: You can store projects/code on your browser and then you can access that new code.

    However, Snap! does have a 10MB limit (Which I do understand. Servers are expensive as he-)
    and so some commands might be dropped for taking too much space or not working.


  1. Using the broken commands like the while command can break the other codes, making them not work. So if you add a while command and a Console.WriteLine(); command above it, it won't work even though it looks like it should.

The "while" command STILL doesn't work!

Alright, I'll take a break from development while I try to figure out how to make the void, class, and using commands.

A simple HelloWorld program would look like this: It would contain the "using", "class", and "void" commands before it actually runs the separate commands. My "HelloWorld" program in C# would only consist of the Console.WriteLine(""); command, which would be a syntax error right out the bat.

Alright, it's been one day since my last post, and I still can't get the commands like using, class, and void working at all. So I'll probably quit if no one is willing to help me.

I can't figure out how to do those commands, and I don't have anyone to help me, so I'll just leave it alone for a while.

And so far, like I said, no one will help. No one will help me with the code. Only a few people said anything about my C# Emulator project. So that will be a tricky thing to do for me.

Sadly, my code doesn't even run anything even after adding some stuff. It's just been so hard to actually think about how commands will be structured.

I'll try to declare when this project is finally dead.

Maybe you should try using pumpkinhead's suggestion?

The method you're currently using is hacky and kind of works, but doesn't scale well for things that have more complex syntax.

I'm going to stop the C# Emulator project for a while. I know. It's sad. But I have to do it.

I'll maybe consider coming back to this project sooner in the future, but for now, I'll just make some other stuff in Snap!.