Giter Club home page Giter Club logo

gmedit's Introduction

image

Hello! I'm Vadym. I wrote code for some videogames that you might have heard of!

I do netcode and systems programming for games (in Haxe, GameMaker, C++, and C#), web applications (in Haxe and JS), and tool programming (usually in Haxe).

My repositories are split up into categories organizations:

Also see:

  • My profile
    Repositories that do not fit any of above categories or have not been organized yet.
  • itch.io page
    Various game assets and game jam entries, open-source or not.
  • My blog
    Countless posts and tutorials. Code looks cleaner when it's written for people to learn from it.

Contact information

gmedit's People

Contributors

9morello avatar antonbergaker avatar babaganosch avatar brockuniera avatar christopherwk210 avatar hazzard993 avatar jmperez127 avatar keeveegames avatar keksdieb avatar liamnobel avatar nommiin avatar oracizan avatar sidorakh avatar squircledev avatar yellowafterlife avatar

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

gmedit's Issues

Hang on Loading Removed Projects

When attempting to load recent projects that have been removed, the loading text appears and remains into eternity. When opened, the editor should account for each project saved in resents, and remove those rendered inaccessible, or at least provide an error message when attempting to load an inaccessible project.

"GML dialects directory" Link Fails

When clicking the "GML dialects directory" link in Preferences it does not open the directory, but instead dumps the "xdg-open" help to console.

Output:

xdg-open -- opens a file or URL in the user's preferred
   application

Synopsis

   xdg-open { file | URL }

   xdg-open { --help | --manual | --version }

Use 'man xdg-open' or 'xdg-open --manual' for additional info.

Cannot create or delete new file

I cannot create, delete, move or copy, cut, paste new files.
does this require that the files already exist in the gml project from gamemaker studio 2?

Compile failed - Multiple issues

Just pulled the latest upstream, tried to compile with

$ haxe -cp src -js ./bin/resources/app/app.js -D nodejs -main Main -dce full

I received this error

src/tools/Dictionary.hx:11: characters 9-11 : Type not found : js.Object
src/tools/NativeObject.hx:13: characters 10-21 : Type not found : js.Function
/usr/local/lib/haxe/std/neko/_std/sys/io/File.hx:54: characters 32-84 : ../bin/buildnumber.txt: No such file or directory
/usr/local/lib/haxe/std/neko/_std/sys/io/File.hx:38: characters 10-21 : Called from
src/ace/AceMacro.hx:13: characters 2-56 : Called from
src/ui/WelcomePage.hx:13: characters 60-84 : Called from
Aborted

Maybe a missing import?

Bug: statusbar argument helper

When writing array with index as argument to any function or script, the argument highlight in statusbar doesn't update to cursor position.

bez tytulu

Coroutines and multi-line comments

When you have #gmcr + multi-line comment with single star /* */ editor gives this error upon saving:

gmedit1

When I add second star /** */ editor let me save the file without error. However as you can see below, it doesn't work properly (at least for GMS1). When not using coroutines multi line comments works fine, if that matters.

image

Suggestion: GNU/Linux build

Title says it all, I think. Later releases could include a pre-built GNU/Linux binary.
By the way, thanks for this software. To say it improves workflow with GMS1.4 would be an understatement.

#lambda functions not returning expected value and/or crashing the game

I have a problem in a project. I've done a couple of tests so far and here's the situation :

No matter how many lambda functions I put in the project, no matter where they are declared, the functions declared in gmedit_lambda.gml file will always return the same (erroneous) thing OR crash the game. The content of the functions themselves do not matter. Changing the content or return type does not affect the behavior at all. Neither does changing the number of arguments.

The n-th function in the gmedit_lambda.gml file will always return the same thing, or crash in the same way, regarless of call order in the code or what they're named.

-The first 3 functions defined in the file will each return these values :

3returns

-The 4th function will crash with this error message :

==========================================
illegal access of argument, argument is not provided to script
 at gml_Script_luabridge_write (line 6) - var b = argument[0], v = argument[1], d;
############################################################################################
--------------------------------------------------------------------------------------------
stack frame is
gml_Script_luabridge_write (line 6)
called from - gml_Object_obj_debug_test_effet_Create_0 (line 111) - script_execute(test4);
===========================================

-The 5th function will crash with this error message :

==========================================
illegal access of argument, argument is not provided to script
 at gml_Script_lua_call (line 8) - var q = argument[0];
############################################################################################
--------------------------------------------------------------------------------------------
stack frame is
gml_Script_lua_call (line 8)
called from - gml_Object_obj_debug_test_effet_Create_0 (line 104) - var theReturn5 = script_execute(test5);
===========================================

-The 6th function will simply crash the game with no error message.

The most puzzling thing is that if I create a brand new project with the exact same functions (or any lambda functions...) everything works fine. So the problem is hardly reproducible.

Providing the entire project where the problem occurs is a concern for proprietary reasons, but I'm not sure it would help anyway, seeing how big the project is and how many things are in it...

Add auto-formatting support

Summary

Several people voiced an opinion that it would have been nice to have an option to auto-format code, such as that in Visual Studio (Ctrl+K, Ctrl+D) or other commonly used code editors.

Considerations

Ace comes with a beautify plugin for this purpose, but PHP rules do not work well for GML at all, and would likely have to be rewritten more or less completely to account for GML-specific keywords and structures.

In a general case a JS-specific beautifier could be used (which generally work based on parentheses rather than tokens), but these will generally butcher GML preprocessor-like structures (#define, #macro, etc.) so would require additional logic.

There seems to be an existing GML-specific beatufier but it is written in C++. It hard to estimate whether compiling an Emscripten module for a auto-formatter would be an overkill.

Ace extension route seems to be by far the most logical choice, as relying on Ace token data would be more forward-compatible than writing a custom parser just for this purpose.

Implementation

This can be implemented either in Haxe or JavaScript (or anything else that compiles to JS) - ultimately the job of the extension/module is to take code as a string and return updated code as a string.

Can't find

I go to the menu, click preferences, go to the bottom but can't find the "Other useful things" tab.
If you can put a picture it would help a lot.

script coloring feature

it is possible to customize color for scripts in GMS2. It is good feature because you can see a difference between gml functions and scripts. Is it possible to add this feature in gmedit?

Suggestion: snippets

It would be nice to be able to use snippets in GMEdit. I found dirty way to enable Ace's built in snippet engine but I didn't manage to have them pop out in autocomplete (probably because you made your own autocomplete module). Anyway, it would be appreciate if you could implement them sometime.
Thanks :)

Add "infinity" constant

Infinity constant doesn't highlight like other constants. (I'm on Mac OSX how can I keep up to the last version of the program?)

with import magic code correctly transformed only after 3 saves

I copy some code with import to script then press ctrl+s. It saves as is.
Then i press ctrl+s one more time then and #import lines correclty transformed into comments
Then i press ctrl+s one more time and shortened functions also correctly transformed to full versions

Magic doesn't work in combined views

I love the idea of the combined views. However it looks like magic features aren't transformed when saving code from a combined view.

Using 4.0.0 (according to exe product version)

Script within a combined view

#define timeline_state_create
/// @func timeline_state_create(timeline, callback)
/// @param timeline
/// @param callback
#args timeline, callback

Output

/// @func timeline_state_create(timeline, callback)
/// @param timeline
/// @param callback
#args timeline, callback

Expected (can be obtained when opening and saving timeline_state_create by itself

/// @func timeline_state_create(timeline, callback)
/// @param timeline
/// @param callback
var timeline = argument0, callback = argument1;

clipboard_set_text not working

Simply the title.

I've tested:

if keyboard_check_pressed(ord("Q"))
{
trace(string(finalproduct))
clipboard_set_text(finalproduct)
}

The trace function works, while clipboard_set_text doesn't.

Sometimes, GMEdit saves scripts with "scripts/" before their names

Unfortunately, I haven't found a way to consistently replicate this yet.
Sometimes, after saving a script in GMEdit, it appears in GM:Studio 1.4 as "scripts/script_actual_name.gml". You can just edit the script name in the GM:Studio back to script_actual_name.gml and it works again.

variable_global_set not recognized as a function

In the GMS 1.4 manual, variable_global_set is listed as an obsolete function but its also listed in the normal function list. So I'm a bit confused on whether it should be used or not.
It clearly still works though. I know it exists in GMS2 also.
Should GMEdit recognize it and highlight accordingly?

Block scoped variables inside of case "blocks"

The "block scoped var" linting rule doesn't seem to work inside of switch/case blocks unless you explicitly add braces around the contents of each case. I can see why this would be working this way, but it would be very nice if GMEdit would detect case blocks as actual blocks.

Example

Make GMEdit able to edit every property of an object

Feature Request: Objects have a lot of properties like Persistent, Visible, Solid, Parent, etc. Most of these can be set in the creation code but it would be nice to be able to view and set these directly from GMEdit instead of switching back to GMS or writing full on code. There's been more than a few times I've had to tab out of beautiful GMEdit to find the parent of an object I'm editing with the super slow searching in GMS. Thanks!

Bug: import enums

I've found another issue (feature?) with #import some_enum with and without as other_enum although replacing name in the code works perfectly it doesn't update autocomplete list.

Preferences don't show the dialect directory :(

Hello,

I followed the Rivals guide to get started for the steam workshop, so one step is to extract the rivals dialect to the folder, however when I open my preferences there is no such part at the bottom as you describe it in your wiki

please respond ASAP

Sincerely,

Puuuul

Suggestion: Autocomplete by chars instead of whole string

Hello, first of all thank you for this project, your IDE is solving almost every frustrations I had with GMS2.

That said, I opened this issue to suggest to make an autocompletion based on every characters of a search string instead of the whole string. For example, keyboard_check_pressed() could be found directly by typing kcp.

What do you think ? Do you accept PRs ?

Cheers.

Automatic JSDoc types for #args magic

Given the #args magic:

#args _my_var:MyType

it would be neat for the generated JSDoc to look like this

/// @param {MyType} _my_var

The changelog for the newest beta from 2019-10-02 does read JSDoc now supports {type} syntax, however when I add the type manually, it gets reset every time.

#type magic does not recognize camelCase functions

Scenario 1:
Your script is named test_create.
The snippet #import test.* in Test in global.gml results in the following transformation:

var t:Test = new Test(2, 3); // -> test_create(2, 3)

Scenario 2:
Your script is named testCreate.
The snippet #import test* in Test in global.gml as per import magic explanation does not result in the correct transformation, neither does Test get color-coded correctly.
Trying it with #import test.* in Test regardless does color-code it correctly, but the transformation is still not applied.
Using #import test* as Test doesn't work either.

Regarding JSDoc generation

Sometimes people name local variables as _a or _x to avoid naming collisions specially with builtin properties... it would be nice if it were possible to ignore _ characters when generating JSDoc.

So that:

#args _id, _name, _instance

would generate:

/// @param id
/// @param name
/// @param instance

Another thing I'm experiencing is that JSDocumentation is not totally parsed so if I open a already existing file with code:

/// @param {real} id This is the id 
/// @param {string} name This is the name
/// @param {instance} inst This is the instance
/// @return {bool} Returns 'true' if operation was successful, 'false' otherwise.

var _id = argument[0], _name = argument[1], _inst = argument[2];

and change this to argument initialization to #args _id, _name, _inst and save I loose type and description information.

Inline lambda with arguments throws parsing error

Given the following code in GMEdit

// Script _tby_dim_create()
_y = #lambda (_placement, _height) {
	switch (_placement) {
        // ...
	}
}(_placement, _height);

where _placement and _height are local variables, the correct output in GMS2 is generated

__lf__tby_dim_create_(_placement, _height);

but GMEdit shows the error: Expression KLambda isStat not callable from _tby_dim_create[Ln 36, col 10] on the line with the closing lambda closing bracket.
I'm using the "Scripts" lambda mode and GMEdit compiled on Oct 15, 2019.

CLI Interface

When I try to open a project (whether open in gms2 or not)
from the cli like,

./temp/Editor.exe proj/proj.yyp

it seems like it tries to open the project, but doesn't successfully do it.
I'd like to automate the editor opening, to reduce keystroke fatigue... Any chance this is an easy fixerino?

Issues when adding macro

When new macro is created, you need to close and reopen application in order to changes take effect. Even reloading the app window (Ctr+Shift+F5) doesn't solve it, only physically closing and opening it again works.

Error building on mac

After installing the latest version of Haxe, cloning the project, and including the latest Electron binary & included files, I run the following:

$ haxe -cp src -js ./bin/resources/app/app.js -D nodejs -main Main -dce full

And this outputs:

src/ui/GlobalLookup.hx:2: characters 7-18 : Type not found : haxe.ds.Map
src/ui/KeyboardShortcuts.hx:22: lines 22-281 : Defined in this class
src/Main.hx:92: characters 2-19 : Class<ui.GlobalLookup> has no field init

This is on macOS Sierra 10.12.6 (16G1036)

Global aliases get duplicated.

All of the global import aliases gets duplicated on autocomplete popout.

Edit: After some tests, they get duplicated only on the script which has #import "global" in it. It seems to be fine on the other scopes.

incorrect order of autocomplete items

(smart match completion) If "sdm" typed results in show_debug_message then for instance_create_layer (this is used often) I would type "icl", autocomplete results are not helpful,
see snapshot.
gmeditbug

#gmcr magic will not work if using break to finish while

Don't know, may be it's better to add break to limitations section

script below will not end because break stops switch block in translated code instead of while
#gmcr
#args map
var key = ds_map_find_first(map);
while true
{
if is_undefined(key) then break;
yield [key,map[? key]];
key = ds_map_find_next(map,key);
}

script below will work good without break
#gmcr
#args map
var key = ds_map_find_first(map);
while not is_undefined(key)
{
yield [key,map[? key]];
key = ds_map_find_next(map,key);
}

Ability to have control over root layout.

Please allow the ability to have complete control over root project folders and folder names.
this would work similarly to how custom views work in gamemaker studio 2 but it would be for the default view.

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.