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

Get help using Construct 2

Post » Thu Nov 17, 2011 1:57 am

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.

Don't call me lazy. Call me cute. Can I get another handout, pluz?
B
13
S
5
G
3
Posts: 21
Reputation: 2,025

Post » Thu Nov 17, 2011 7:27 am

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.
Image Image
B
161
S
48
G
90
Posts: 7,347
Reputation: 66,749

Post » Thu Nov 17, 2011 2:05 pm

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?
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,498

Post » Thu Nov 17, 2011 2:37 pm

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.
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 6,998
Reputation: 57,791

Post » Fri Nov 18, 2011 5:59 am

@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.Fohsap2011-11-18 06:06:40
B
13
S
5
G
3
Posts: 21
Reputation: 2,025

Post » Fri Nov 18, 2011 6:39 am

Here are the two plugs that can do that at the moment:
http://www.scirra.com/forum/plugin-load-image-from-url-at-runtime_topic45799.html
http://www.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).newt2011-11-18 06:42:07
Image Image
B
161
S
48
G
90
Posts: 7,347
Reputation: 66,749


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 9 guests