Giter Site home page Giter Site logo

pmgl / microstudio Goto Github PK

View Code? Open in Web Editor NEW
866.0 31.0 96.0 6.08 MB

Free, open source game engine online

License: MIT License

CoffeeScript 38.03% JavaScript 52.41% CSS 6.10% Pug 3.45%
game-2d game-3d game-engine gamedev javascript lua microscript nodejs python

microstudio's Introduction

microStudio

microStudio is a free, open source game engine online. It is also a platform to learn and practise programming.

microStudio can be used for free at https://microstudio.dev

You can also install your own copy, to work locally or on your own server for your team or classroom. You will find instructions below.

3 ways to use microStudio

Online service

microStudio is available online at https://microstudio.dev ; this is the simpler and the preferred way, you will have access to all the online collaboration features, online publishing and more export features. You don't even need to create an account, you can start working as a guest.

Standalone application (offline)

Using the standalone, offline app ; download it in the Releases section of this repository, or on itch.io: https://microstudio.itch.io/microstudio ; helpful if you plan to use it in an environment without connection to internet.

Set up your own microStudio server

You can clone this repository and start your own microStudio server, for a team or a classroom for example. See instructions below:

  • Install Node JS (downloads and instructions: https://nodejs.org/en/download/)
  • git clone https://github.com/pmgl/microstudio.git
  • cd microstudio
  • git clone https://github.com/pmgl/microstudio.wiki.git
  • cd server
  • npm install
  • npm start
  • Open browser on http://localhost:8080

For active development use:

  • npm run dev instead of npm start

Configuration

To use specific configuration options, create a JSON file config.json in the root folder (same folder as this README.md). You can find partial examples in this folder as config_local.json and config_prod.json.

Configuration options

option description
realm "local" or "production"
run_domain The run domain if you are running this in production ; must include protocol (e.g. "https://microstudio.io")
dev_domain The dev domain if you are running this in production ; must include protocol (e.g. "https://microstudio.dev")
delegate_relay_service set to true if you are running a separate relay server for the microStudio Networking features
relay-key a secret key to use with the delegated relay service
default_project_language The default language selected when a user creates a project. Can be set to "microscript_v2" (default), "microscript", "javascript", "lua" or "python"
tutorials_root_url Sets a different URL for loading your own set of tutorials (note: if you use this option, in the toc.md, you must specify a complete URL with domain name for each tutorial)
brython_path Sets a path to a custom folder for the Brython lib

microstudio's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

microstudio's Issues

Time machine bug

If the Loop button is pressed and the timeline is full, the slider goes outside
image

new mouse input

mouse.wheel

returns when
1 scrolling up
0 default
-1 scrolling down

bug: console input history

In the console, you can view the input history by pressing the up arrow.
If you press the down arrow in an empty console it will be this:
image

Sprite Editor: Add some basic drawing tools

I think it would be nice allow user to:

  • Draw lines (modifier key could snap to orthogonal)
  • Draw rectangles (modifier key could force square size)
  • Draw ovals (circle with modifier key)

Doc editor : markdown horizontal rules not displayed

Hello !

Tiny detail, but the markdown's horizontal rules are not displayed into the right panel of the Doc editor. (Maybe just a missing CSS ?)

Tested with both online and standalone versions.

Minus horizontal rule : ------


Stars horizontal rule : ******


Underscores horizontal rule : ____


mouse.press & mouse.release Innacurate

mouse.press and mouse.release only return the proper value if only a single mouse button is being pressed. For example, if you are holding down the right mouse button and click the left mouse button, mouse.press and mouse.release will never properly return true for the click of the left mouse button.

Folders

Folders for code, sprites, maps, sounds, music, assets, everything. Folders and subfolders.

  • Create a folder
  • Rename folder
  • Create subfolders
  • Create a new asset into a folder
  • Move an asset into another folder
  • Move a subfolder into another folder (or to the root)

This also impacts:

  • browsing the sprites from the map editor
  • browsing a public project's files in the Explore section

Code Editor: Improvements

There's a couple of missing features in the actual code editor that would be nice to integrate:

  • Search/Replace among multiple text files
  • Goto to definition
  • Cross reference
  • Autoformat/Beautify

Has also been proposed to replace Ace editor with Monaco, I have no idea which one would be better

API: Extends to support mobile sensor

It might be interesting to allow microStudio to support a variety of mobile sensors such as inclinometer and gps data.

Actually I consider this a very low in priority, nevertheless it can open a wide range of possibilities.

Editor: Intellisense pop-up

Working at the end of a long line, or at the bottom of your source code the Intellisense pop-up sometimes covers the edit area.

image

Strange multi-line comments

I accidentally discovered the multi-line commentary
image

BUT

These comments do not actually comment the code, but only give the appearance of doing so:
image
And they're doing some crazy stuff ๐Ÿ™‚

Doc editor : multiple pages ? multiple files ?

Hello !

I was using the markdown Doc editor to develop and document my ideas before jumping into code, and I found it would be useful to be able to edit different pages or files instead of just one.

Sprite Editor, change background colour

It is hard to edit sprites with a dark colour scheme, they blend into the dark background.
Could we have the same option that is available in the map editor to change the background grid colour?

Debugger and watch window

It's a big one, but I believe it would be great to have option to debug your code with breakpoints, steping and watch window with current values of all/selected variables.

Notify users about comments on their projects

Currently you have to check public details page for each of your projects to check if there are any new comments on them. It would be useful if I can be notified about new comments.

Corresponding message on Discord - https://discord.com/channels/593735633130749972/667401412405362688/867399225846399039

It might be worth to also consider notifications for comments on projects of other people, where you commented. But I think it might be done separately.

Download images from the sprite editor

Yes, images can be downloaded by going to the related web link /sprites/xxx.png but it is quite cumbersome.
Or as it has been mentioned to download the html zip and extract them from there.

I think it would be great if we had a download option in the sprite editor itself.

Console Error messages

For some errors the console output tells you where the error occurred (file/line).

This does not happen for the 3 error messages that you can configure (undefined value, etc.)
There it will list multiple times what is wrong, but if the same variable is used in multiple places of the code I wouldn't have a clue which one caused the problem.
Would it be possible, or make sense, to also add the error reference for those warnings?

Access to sprite colors from code.

I've been thinking about this thing for a very long time: accessing the sprite palette from code.
This technology was used on the NES console. Of course, then it was used to circumvent the memory limit.
This is my version of how it might look in microScript:

  screen.drawSprite("cub",x,y,width,height)
  
  //sprites.cub.colors = [color1,color2]
  //sprites.cub.colors[color1] = "rgb(255,255,0)"
  //sprites.cub.colors[color2] = "rgb(255,0,0)"
  
  sprites.cub.colors[color1] = "rgb(0,0,255)"
  sprites.cub.colors[color2] = "rgb(0,255,85)"

"sprites.cube.colors" is a list of all colors for a "cub" sprite.
Thus, you can use different coloring options of the same tile in different levels of the game.
This opens up some interesting possibilities:

  1. Use less memory in your projects. I came across the fact that I could use the same tiles in different parts of the program by simply changing their palette. This would allow you to store fewer images in the project.

  2. The ability to make some parts of the sprite transparent. Maybe like this: "sprites.cube.colors[color1] = false"

  3. The ability to create an array containing a palette of 64 colors. Color all tiles using this palette. At the same time, tiles can be stored even in black and white. In some way, it will be possible to feel like a developer on the NES :-)

  4. You can create a flickering effect. I ran into such a problem when I wanted to make the boss in the game flicker. Or when I wanted to make a character in the game flicker when he raises a powerup (as in Super Mario Bros). Currently I am implementing flicker only like this:

     if invulnerability_time == true then
       if Player.display % 2 == 0 then Player.display = 1 else Player.display = 0 end
     end
     if invulnerability_time == false then Player.display = 1 end
    

It is difficult to achieve flickering of the character (changing the color alternately) using animation. Let's say we have a character with a bunch of animations for each action. Then for such a flicker, we will need to make separate animations, with the addition of frames with a different palette, through one. So it is very labor-intensive.

Perhaps this will open up some other opportunities that I do not know about. But I think it's worth paying attention.
In addition to this, I would like to have a tool "replace a certain palette color with another" (in the sprite editor). When the image is large and has a complex pattern, the fill tool does not help (too difficult). In my opinion, this is the only reason why I might need to use a different editor. You can even reflect this with a code, but not change the color. In my opinion, implementing a list containing a palette of sprites will also solve this problem (although I technically don't know how it can be implemented). I think the palette is stored for the sprite anyway, but how do I get access through the code? :-)

Doc editor bug : Ctrl-Z erases it all

Hello !

This happens both online and with the standalone versions.

If you open a project which contains documentation, and if you go to the Doc editor/tab, and if you press CTRL+Z, then the doc will be erased. (you can get it back with CTRL-Y though)

Notifications

Show notifications (same kind as notifications for new level / achievement) when:

  • New comment on my project
  • Project received likes
  • Received an invite to a project
  • Someone I follow posted a new project / or on the forum

Notifications could be gathered into summary emails once a while.

Paste text into console

9:21 PM JimB007
:
Pasting copied text into the console input area removes any text that may have been typed in preparation. For me the pasted text should append to the end of any existing text

Discord Link

Code editor bugs

  1. When selecting text with the cursor flashing, this bug can occur - the text selection is updated with the cursor flashing

(Video capture has changed the position of the cursor slightly)
microStudion bug 2

Animate animated-tiles in maps ?

Hello again !

My map contains animated tiles.
But when the map is displayed, these tiles are not animated.

I tried to add a maps["myMap"].update(), but no success.

Bug or missing-feature ?

Importing and exporting of single code files

Feature request from TinkerSmith:

Regarding what I just posted on the edu channel, what are the chances that code snippets can be dragged into the code editor?
Kinda the same way sprites are added (drag&drop).
I imagine to keep a library of snippets, extension *.ms for sure, that can be used as needed. 'helpers.ms', 'verctorstuff.ms', you get the idea.

Yes, I can do that manually with the export/import now, but drag/drop style (or load button) would probably be easier for starters.
https://discord.com/channels/593735633130749972/667401412405362688/870822111755763712

This should be quite easy to add. I think it's worth to make it possible to import file by both drag & drop and from a button to make it also accessible for mobile users.

Auto-Complete

One thing I really miss in that is in other IDE's is auto-complete.
Ace supports auto-completion via a 'live-autocompletion' option:

https://ace.c9.io/build/kitchen-sink.html

Please consider adding auto-complete for microScript
Lua and Javascript is already supported by the Ace IDE so that should be straight-forward enough.

Support for Non-Ascii variable names

Currently, a non-ascii variable name makes a syntax error on the end of the line before it. I think it would be good to be able to use non-ascii varibiable names, especially for non native English speakers.
microstudiobug08-09

Scroll and zoom large maps in map-editor ?

Salut ! Super projet !

I'm using microStudio standalone 21.12.22 on Linux.

I'm wondering how to scroll and zoom in/out large maps in the map-editor ?

Bug or missing-feature ?

[RUN] button on the My Projects page

On the My Projects page the project previews show [Export], [Clone] and [Delete] buttons.
Would be great to have the [Run] button too if ones wants to check different versions to preview them without having to open them all up first.

Live Long and Tinker

Bug "I invited myself"

image
(Click for better quality)

This has already happened twice. I don't know what to attribute this bug to.
(I didn't invite anyone, I just refreshed the page)
When I updated again, it disappeared.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.