Bulk import / generate 'on-the-fly'?

0 favourites
  • 6 posts
From the Asset Store
Flying Easter
$2.80 USD
60% off
Full game Construct 2 and Construct 3 to post on Google Play
  • Is there anything built into Construct 2 that would allow me to import a library of monsters, with an XML or DB-driven key of their properties or something to that effect? I've got over 700 monster sprites that I would like to have available (kind of a library). As code jocks, or 'code meat heads', probably know, it's MUCH faster to do bulk ops by keyboard or script, as opposed to by mouse; however, I wasn't able to uncover an answer to this question in my rigorous tri-keyword searching expedition. <img src="smileys/smiley3.gif" border="0" align="middle" />

    <img src="smileys/smiley9.gif" border="0" align="middle" /> Don't call me lazy. Call me cute. Can I get another handout, pluz?

  • At the moment the best way would be to render the sprites to a strip, and import that as frames, but as code jocks, or 'code meat heads', probably know, 700 frames is just too much to load at one time.

    Otherwise there's a plug to load images from a url, but that wont work for collision boxes.

  • You can mass-import animations by dragging and dropping multiple images to the layout, or right-clicking the frames pane in the animation editor and importing either batches of files or sprite sheets in grids. Does that do what you need?

  • For the XML import, with a conversion you could cheat your way through with the help of the CSV Plugin.

    It requires some interfacing though I guess. I hope you are ready.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • newt, I'd like to know what plug-in that is.

    Ashley, Yes, that's a great start. I'm trying to make a dynamic sprite. Like 4 different behaviors for monsters, but 10 different faces for each monster. So, 40 unique monster faces and 4 different kinds of behavior. For example, Space Invaders has many kinds of monsters that just move left, right, and down, which can die by spaceship bullet. Shared behavior across object or sprite libraries?

    Kyatric, This looks like a great tool, but I'm going to need to fiddle around with it a little, right now, to see if it's what I'm looking for. I was thinking something along the lines of an API/guideline for CSV input, to set properties, actions, etc., and to associate them with objects and objects with sprites.   For example: _obj = object name, _img = img_location, _prop = property, etc. '_obj:Monster, _prop:solid, _img:c:\games\images, _act:set_angle_toward_position, _arg1:Player.X, _arg2:Player.Y'

    Alternatively, something along these lines: "condition[0]:player_outside_layer, action[0]:spawn_monster[random(5-10)]".

    It sounds complicated in psuedoish-code. :) Anyway, I just thought it would be nice to be able to pull random monsters from a huge monster database. I'm basically trying to find a good way to integrate a library of monsters into a game. I actually have over 700 monsters, as I was saying. In fact, the number is much higher (several thousand). And as newt was saying, it's unreasonable to load all these monsters at once. So, I thought I would try to load multiple monsters per scene, map, zone, or level.

  • Here are the two plugs that can do that at the moment:

    scirra.com/forum/plugin-load-image-from-url-at-runtime_topic45799.html

    scirra.com/forum/plugin-canvas_topic46006.html

    No idea if multiple instances are doable.

    Again no collision detection, and no webgl integration yet.

    With the frames method you would simply set the frame to random(n).

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)