Plugin-Dev Request And Bug Found

Discussion and feedback on Construct 2

Post » Mon Feb 14, 2011 11:30 am

Hi, i have been testing the new version, i noticed there is a new version today which i am going to download so the bug might be fixed already maybe but i will post anyway as i have a request also. :)

Request -

I am finding making plugins annoying because when i make a quick example to preview it doesn't update saved changes to my code.

So for example if i did a simple random with 0-100 in a alert the preview returns 0-100 still even if i change it to 0-10 etc and save then preview again.

It would be nice if it was re-built with the updates for the next preview because currently i have to start a new project and re-make the whole event setup again for it to update correctly. This makes it quite slow to debug/test plugins when making them.

Bug -

If you go to add a object like text and then go to the event list it adds it but without it showing.

Javascript is great btw, i haven't really used this code before but it seems really easy to use so and now i can make plugins which is great because with the C++ plugins i never got the extra library's ATL etc work. With JS my test plugin is already working great though. :D
B
2
S
2
G
1
Posts: 121
Reputation: 1,092

Post » Mon Feb 14, 2011 12:47 pm

Sounds like a browser caching problem. I think Construct saves all the plugins as external JS files to stop common resources being re-downloaded all the time.

I think during development, when the run button is pressed, a query string parameter should be added to ALL external JS, to stop caching.

IE:

<script type="text/javascript" src="c2runtime.js?nocache=14/feb/2011/12:47pm"></script>

This forces the browser to reload the resource and not rely on caches.

When the project is exported formally, the query string params can be removed.
Image Image
Scirra Founder
B
124
S
37
G
25
Posts: 3,945
Reputation: 44,897

Post » Mon Feb 14, 2011 2:05 pm

Um, aren't all plugins loaded into memory whenever Construct 2 editor is run?
B
62
S
21
G
12
Posts: 1,910
Reputation: 13,155

Post » Mon Feb 14, 2011 2:08 pm

Oh you're talking about the editor. Then yeah every time you make a change you will need to reload the editor.

I'm not sure of any other good solution to this. Maybe a dev panel that has a button on it which reloads all resources and other stuff? Or a button that closes and reopens construct would be really handy.
Image Image
Scirra Founder
B
124
S
37
G
25
Posts: 3,945
Reputation: 44,897

Post » Mon Feb 14, 2011 3:11 pm

Please post bugs to the tracker. They can get forgotten about on the forums.
Moderator
B
88
S
32
G
33
Posts: 3,005
Reputation: 27,432

Post » Mon Feb 14, 2011 5:44 pm

[quote="zeno":267p3901]I am finding making plugins annoying because when i make a quick example to preview it doesn't update saved changes to my code.[/quote:267p3901]
To speed up previews (slow previews was a problem in 0.x), the javascript files are cached each time a project is opened. You don't need to re-make your project from scratch - just close and reopen the project, and the cache will be cleared. Just to clarify, it's not the browser caching javascripts - it's Construct 2 itself.

Even closing and reopening the project was a bit annoying when doing my own development, so I switched off caching for myself in debug builds. However, you're right that would be useful for other plugin devs, so I'll add a 'developer mode' switch somewhere which will switch off caching, then the scripts are re-loaded every time you preview.

[quote:267p3901]If you go to add a object like text and then go to the event list it adds it but without it showing.[/quote:267p3901]
I don't understand - "it adds it but without it showing"? Does it add it or not? Where are you looking? Also, Arima is right - reports should go on the tracker - thanks.
Scirra Founder
B
359
S
214
G
72
Posts: 22,951
Reputation: 178,578

Post » Mon Feb 14, 2011 10:46 pm

[quote="Ashley":15q4yb3l]However, you're right that would be useful for other plugin devs, so I'll add a 'developer mode' switch somewhere which will switch off caching, then the scripts are re-loaded every time you preview.[/quote:15q4yb3l]

Thanks that seems like it would make things much simpler for development.

[quote="Ashley":15q4yb3l]I don't understand - "it adds it but without it showing"? Does it add it or not? Where are you looking? Also, Arima is right - reports should go on the tracker - thanks.[/quote:15q4yb3l]

Basically If you add it as normal by selecting the object and clicking you see the text appear in the layer. If you go to add it without clicking in the layer and go to the event list it is still added in the main object list but no visible text object is seen in the level.

Also just wondering when will the expressions be done, is that something that might happen soon? By that i mean like in V1 where you select a object and can see a visible list of expressions to choose from rather than system expressions you type.
B
2
S
2
G
1
Posts: 121
Reputation: 1,092


Return to Construct 2 General

Who is online

Users browsing this forum: Eisenhans, Televangelist and 4 guests