How to Export assets in separate folder??

Gdevelop by default export every thing in one folder for web platform export.
I want images, sound files in assets folder and index and js files in outer folder like


It’s not possible now. :frowning:

It’s possible but it takes lot of mine time. by editing the data.js file by changing image.png url to assets/image.png…

During making game I face LOTS of difficulty in making game in Gdevelop. my 70%+ game code is in pure javascript. in the form of either JS events or external js files.

If I made this game in pure coding that would be much much easier for me than Gdevelop… any ways gdevelop help me to take initiative for this game

What difficulties are you facing ? Why using 70% of JS code ?

Let’s take an example If I want to target object number five from the clones of that objects then that can’t happen in gdevelop thus have to use JS event

Also If one work happens in 10 events then that work can also easily done in just 2-3 lines of JS simple lines…
I used many JS data Structures to increase the speed of my game like HASH Table i.e but that not possible in Gdevelop.

Also there are bugs which I fixed on my own…

The game I made can be build-ed in just 25 days but Gdevelop takes about 60 days of mine …

I’m not depressing the Gdevelop… It’s a very good code-less editor and I also contribute in it but for the time being it’s not ready to make height quality games i.e

Instead of complaining, can you describe each bugs ?

Why do you want to do that ? Why don’t you take a random instance of this object ? Why don’t you use conditions to select a particular instances to use actions on it ?

That’s my game requirement to increase the speed…

I’ll tell you detailed report about bugs but please let me first finish me game… and also help me please to complete the game

You can use object variables with different values to identify each instances and simply check the value inside a For each object event to target specified instances in your scene.

You can use the object properties to add variables to each instance in your scene you want, let say to the fifth clone you can add number = 5 in the properties.
This way even easier as probably you don’t memories each clone in the scene which one was the 1st and which one the 110th do you? :wink:
And then, for example to delete only the fifth clone, you can check the value of this object’s variables for each instance, if it 5 (so it is the fifth clone) then delete the instance.

It sounds to me you just picked the wrong tool for your project to be honest :stuck_out_tongue:
Since 70% of your game logic is in JS, and you could find it easier to use pure code, would make more sense to use GDevelop.js:

I could be wrong actually, but I believe you could use GDevelop.js to access GDevelop core features (scenes, events, properties, extensions) in pure code and be able to load a GDevelop scene and all the object properties in Javascript.
So in theory, instead of using Javascript events in GDevelop, you could create only the scenes in GDevelop, and then just load the scene in JS using GDevelop.js and do everything, all the game logic in pure code.

I would like to know how GDevelop made it so difficult the development for you, the development time is increased from 25 to 60 days :laughing:
I believe, you made it difficult for your self by forcing to make things in JS.
Most game logic can be done using the event system I would never use JS in GDevelop for game logic.
JS event is mainly there to be able to add new features and work around possible limitations but 70% code sounds unreasonable to me.

It depends on what “quality” means to you. Look and Feel of a game is totally depends on you.
Gameplay wise, GDevelop can do pretty much anything one way or an other (see my example above).
Yes there are some limitations just like with any other tools and engines, but unlike others GDevelop offer you the possibility to go beyond the limits through using JS code or even make your own extensions or even make changes in the source code at core level, it might not an out of the box experience and not easy but it can offer unlimited possibilities.

Anyhow, using 70% code in GDevelop makes no sense to me, what kind of game are you making actually that need so many things that GDevelop don’t have to offer?

Also, you’re telling that you did 70% in JS but you forgot a big part of the game : the part that manage scenes, objects, objects initial instances and the objects themselves. So, GDevelop is already making a lot of things for you.

If he did 70% of the game in java scripts what was the point of using a codeless game engine? :confused:
I’m not trying to sound offensive in anyway, I’m just curious what was it that Gdevelop couldn’t do that required so many scripts :astonished:

I not say that a thing can’t happen in G-develop, G-develop is a good code-less editor any thing can be done in G-develop but the point is that how much effectively you can do that thing. It’s not only the issue of Gdevelop but also the other codeless editor like gameMaker and constrcut2.

Javascript is a single threaded language It means that for html5 games to run on pool of devices (Desktop, Mobiles, Tablets, Xbox, PlayStation etc…) we should consider the performance of games.

In Gdevelop we not have full control to add performance factor…

Let me take an example:

To delete a clone with variable 5 we have to iterate over all objects until we find that object with variable number 5
delete_fifth.png. and it’s a linear search means greater the clones greater time may be it take to find that clone.

on the other hand if we make a hash table in which we just put the variable 5 and that hash table directly point to object clone with variable 5 and we can delete that object in constant time…Huge time saves.

And also if one thing can happen in 10 events then that thing can also be done in Just 2 lines of JS (used Gdevelop API).

Above all gdevelop is opensource and FREE that’s why I love it and surly contribute to it

You don’t need the “for each”. Just put an event with this condition and the condition will “select” / restrict the actions on the only instance that has the variable id=5.

That’s what I was thinking. If we had to make it for each it’d take awhile :neutral_face:

The condition still need to go through each and every instance doesn’t it? Or it is using a different way to find the ones that fulfill the condition?

Yes, GDevelop use a for loop.

GD has to iterate through each instance to restrict the object list, there is no other way to do it I think.
For example, I take this code from GDevApp, is the result of the event:

Variable 'n' of Character is = 5: Hide the object Character

The code:



gdjs.First_32layoutCode.condition0IsTrue_0.val = false;
for(var i = 0, k = 0, l = gdjs.First_32layoutCode.GDCharacterObjects1.length;i<l;++i) {
if ( gdjs.First_32layoutCode.GDCharacterObjects1[i].getVariableNumber(gdjs.First_32layoutCode.GDCharacterObjects1[i].getVariables().get(“n”)) == 5 ) {
gdjs.First_32layoutCode.condition0IsTrue_0.val = true;
gdjs.First_32layoutCode.GDCharacterObjects1[k] = gdjs.First_32layoutCode.GDCharacterObjects1[i];
gdjs.First_32layoutCode.GDCharacterObjects1.length = k;}if (gdjs.First_32layoutCode.condition0IsTrue_0.val) {
{for(var i = 0, len = gdjs.First_32layoutCode.GDCharacterObjects1.length ;i < len;++i) {

As far I can understand, this generated code does:

  • Reset the condition flag to “false” this frame

  • Create a new list from Characters in scene

  • Iterate through every Character checking for the conditions (“n” == 5)
    [*]If the condition is true for any Character, set the condition flag to “true”

  • Append it Character back at generated list (actually, replaces another instance in the list) and add 1 to a new counter “k” = number of Characters meeting the contidion (for better performance, instead creating a new list of Characters that fulfill the condition, put them at the beginning of the list, always moving them at the same position or a previous one, otherwise maybe it could break the loop)

]Iterate again in the Characters list, but this time only the first “k” objects that met the condition, and only if the condition flag is “true”.

* Launch the action over the Character


So, GD iterates two times, for conditions and actions :slight_smile:
I should take a look at generated code for more complex events…