Defold crashing on build

#3

Wow, the whole editor crashes when you build? Editor 2? Can you zip the project and share it somehow?

0 Likes

#4

If it big animation then can crush build, but Editor - strangely. Build can crush when not enough memory for load atlases and if not present dicrete video card

0 Likes

#5

What platform are you running on? Do you get any dialog like this with more information about the crash?

(If so, could you share this information with us?)

0 Likes

#6

Sorry for the late reply. I believe I’m using editor 1 and it’s running on Windows 10. I don’t get any notification, the entire thing just closes out. I’m not sure what counts as a big animation. It’s 30 pictures of stick figures like the other 3 animations (that worked before I added this one). Still iffy on how to use stuff like github so I zipped all the files up.
https://drive.google.com/drive/folders/0B88BeokxFN17OGc5UzV6d2FxMm8?usp=sharing
The branch I’m using is called “enemies”.

0 Likes

#7

Whoa, 736 MB? What did you upload? You just need to share the files from your project. If you right-click any file in the Defold editor there is a “show in explorer” option which will open the folder for you. Whichever folder has the game.project file is the root folder for that project.

0 Likes

#8

Didn’t know how far out I should go in projects so I just uploaded everything. Let’s try again.
enemies.zip (7.4 MB)

0 Likes

#9

On line 225 of CombatManager.lua there’s a ‘-’ character (I’m using editor 2 and it pointed out the issue when I tried to build). Apart from that everything is ok and the project builds and runs in editor 2:

I haven’t tried in editor 1 yet, but could you please fix the error I mentioned and try again?

0 Likes

#10

It still crashes. Since you ran it in Editor 2 I tried that as well (love the look by the way). After opening my enemies branch in editor 2 and trying to build it I got this error

Edit: If it’s relevant, I recently fixed a memory error described here (Editor crash: 'java heap space') using LarsSjodin’s solution.

0 Likes

#11

I tried in Editor 1 and get a JavaHeapSpace error for the player.atlas. It doesn’t crash but it fails to build and I’m unable to open the player atlas. Whoa! I just took a look at the contents. The images are huge, 600x800 pixels and there a many of them! No wonder I run out of heap space. You need to resize them to a reasonable size matching the size you intend to render them in.

0 Likes

#12

It not crush - It not enough memory.

You can open config file in Defold directory, in any text editor and add command -Xmx4g(for 4g allocated heap or more 6g for example) in block vmargs = (separate command by comma) and it resolve problem, but try resize images first. (ohh I dont see you PS)

0 Likes

#13

That makes sense. What would you recommend the size to be? I’m probably going to be adding a lot of animations but since they’re just stick figures I could probably make them extra small and then scale them up without losing much quality.

0 Likes

#14

The best idea is to make pictures as small as possible. And as the best option for starting to remove all the transparent pixels, i.e. leave as a matter of fact a rectangular / square sprite framing the image. I hope you undertsand me :slight_smile:

0 Likes

#15

Yeah, all of the images have the transparency removed. Guess I’ll just mess around with the images and find what size works for me. Thanks.

0 Likes

#16

Ok, so I might have been wrong about the loss of quality thing. The size that i want to render the animation at is about 60% of the size my characters currently are. I can go smaller but extreme amounts show a visible loss of quality. For the sake of future proofing, is there a way to do flipbook animation that is less memory intensive? I was planning to have many more sets of animations (about 12 more for the main character alone). Is it possible to just make everything small and then zoom the camera in?

0 Likes

#17

May be need wait patch for build process. It problem present only for first build after start Editor.(Editor create internal cache and make compiled texures). Read my topic about it - Big memory problem with Editor 2 (SOLVED)

May be it help you :slight_smile: Really after build complete and free memory Editor aquired about 1-3Gb memory only for big collection and good work. Build process fast too and use huge memory amount.

About images - try only drop transparent pixels and not change image size.

0 Likes

#18

Is it possible to remove transparent pixels without messing with the position of the images in the animation? Some of my animations have the character more forwards or upwards during key parts of the animation.

0 Likes

#19

I think no. After remove transparent pixels you need correct coordinates for new sprite size.

0 Likes

#20

If you zoom in you’ll end up with blocky pixels.

Nope. This has been requested in DEF-2858 (Trim (crop) alpha for sprites in atlases (DEF-2858))

1 Like

#21

So other than removing transparent pixels is it just not possible to add many animations? Again, I could scale all the images by 60% but That’s only four animations so far and I want to have at least 9 for the player.

0 Likes

#22

Sure there is, but the question is which size the individual images of the animation are. A 4k atlas can fit 400 individual 200x200 images. What’s your target size?

0 Likes