fisholith's Forum Posts

  • It's possible that I'm doing something wrong here, but this looks like it might be a bug. I figured I'd ask first.

    ====== Symptoms:

    Example file:

    Given the following:

    Event: For "loop" from 1 to 10.

    Action: EditBox: Set text to: EditBox.Text + "x" + NewLine

    I get the following output, (though I have replaced the unidentified-character squares with sharp signs "#" so that they would be visible in this post).

    x########

    x#######

    x######

    x#####

    x####

    x###

    x##

    x#

    x

    x

    From the event and action, it seems that we should see exactly one new line after each "x". Obviously something else is happening.

    ====== Possible Cause:

    It looks like the NewLine expression inserts a new-line-generator-marker into a string of text, and then at the end of the event, all the existing markers are triggered once to generate a new line character at their respective current positions. This works fine for most situations, but when placed inside a loop, a new-line-generator marker can be placed into a string on the first loop step, and then triggered multiple times by all the remaining steps as each loop step reaches its end. This could explain why NewLine expressions evaluated in earlier loops seem to be transformed into more new lines than those in latter loops.

    ====== Possible Workaround:

    As a work around, I might be able to use a special character (or character sequence) in place of the NewLine expression when inside loops, and then convert the special character(s) to new lines afterwards.

    If anyone has any information pleas let me know.

    Thanks.

  • This file is an attachment for the following post:

  • Hi again everyone. A few months back I inquired about building an XML plugin. After a few recommendations TinyXML came up, and it looked like the ideal solution. Then summer ended and 11 weeks of academia consumed all my free time. I'm back now, and I was wondering if anyone else has looked into building an XML plugin in the interim. I'm still interested in working on it, but I have no prior plugin building experience, save for the wiki-tutorial, and it is still possible that I won't have time to start it before the next wave of classes comes. If anyone has any recommendations or information regarding any other potential XML projects, please let me know. Thanks

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • (solved)

    Yeah, that was it. I had been looking in the wrong place. Thanks Lucid .

    I amended the first post to include the solution.

    === === ===

    Solution: (for VC2008 based on Lucid's suggestion)

    1: In the IDE, (VC2008 in my case) Check to see where the linker will put the completed files after a build, by choosing Project > Properties. Then expand Configuration Properties > Linker > General.

    2: In the "Template SDK Property Pages" window, find the "Output File" property, which will most likely be set to "..\..\IDE\Plugins\Runtime\Template.csx".

    3: You can change the "IDE" part of "..\..\IDE\Plugins\Runtime\Template.csx" to "Construct", so that after a build, the plugin files will automatically be placed in construct for you. (e.g. "..\..\Construct\Plugins\Runtime\Template.csx")

    4: At the top left of the "Template SDK Property Pages" window, you should see a "Configuration" dropbox. Here you can select and view each of the 5 configurations, "active(Runtime)", "Debug", "Debug Runtime", "Release", and "Runtime". Each of these has it's own "Output File" field, which can be changed in the manner described in step 3.

    Done

    === === ===

    Thanks again.

  • I began working through the "How To: Create a plugin" tutorial on the Construct Wiki, and I have encountered a problem. When I choose Build > Batch Build from the menu bar, and click the "Build" or "Rebuild" button on the Batch Build window, everything appears to work just fine. I get no errors or warnings. Yet, on the next step of the tutorial, you are supposed to be able to open Construct to view the "Template" object you just made. When I open Construct, the "Template" object is nowhere to be found in the insert object browser, nor can I find any matching plugin files in the "Plugins" or "Plugins\Runtime" folders.

    It's as if everything is building correctly, and simply being put in the wrong place. The tutorial doesn't make any mention of moving files after building, and I can't find any .csx in the folder hierarchy of the project either. I do see the files "Template.csx.embed.manifest" and "Template.csx.intermediate.manifest", but I don't know if they are meaningful under the circumstances.

    I'm using MS VC 2008 Professional Edition, and upon opening the .sln file I'm prompted to "convert" the project to a 2008 compatible version, which I do, (as I apparently have to, to open it in VC 2008). Construct is installed to "C:\Program Files\Scirra\Construct", which I believe is the default path.

    Does anyone have an idea as to what might be going wrong here, or any advice?

    === Solution (edit)

    Solution: (for VC2008 based on Lucid's suggestion below)

    1: In the IDE, (VC2008 in my case) Check to see where the linker will put the completed files after a build, by choosing Project > Properties. Then expand Configuration Properties > Linker > General.

    2: In the "Template SDK Property Pages" window, find the "Output File" property, which will most likely be set to "..\..\IDE\Plugins\Runtime\Template.csx".

    3: You can change the "IDE" part of "..\..\IDE\Plugins\Runtime\Template.csx" to "Construct", so that after a build, the plugin files will automatically be placed in construct for you. (e.g. "..\..\Construct\Plugins\Runtime\Template.csx")

    4: At the top left of the "Template SDK Property Pages" window, you should see a "Configuration" dropbox. Here you can select and view each of the 5 configurations, "active(Runtime)", "Debug", "Debug Runtime", "Release", and "Runtime". Each of these has it's own "Output File" field, which can be changed in the manner described in step 3.

    Done

  • Thanks for the information. It looks like your method Linkman2004 is the best way to handle simple XML using events. With a little more code, it might even be able to handle more complicated XML, and so I may end up using a solution like that.

    That said, I'm curios as to whether I could use a third party python library for XML manipulation in Construct. I'm not overly familiar with the capabilities of Construct's python scripting system.

    As an alternative I'm still considering building an XML plugin, as it might be the easiest way to get standards compliant XML manipulation, and I would just like to start building plugins in general. My current thinking is that if there is an open source XML library that is suitably simple to work with, I might be able to drop that into a plugin, and then add some simple action/condition/expression code to make its features accessible from Construct.

    Granted, I've never built a plugin for Construct before, so if anyone has a recommendation for an XML library that might work, or an estimation as to how difficult the process of making it a plugin will be, I would appreciate the advice. Thanks again for the feedback.

  • Is there a way to write and read XML files from a Construct application, and if so, what is the best way to go about this?

    To my knowledge there is no XML plugin, but it seems like python script might provide a roundabout means of handling XML files.

    I'm also considering building an XML add-on, as I believe I have all the necessary tools, although I'm not sure as of yet how much work would be involved.

    Any advice is welcome.

  • Firstly, thanks Davioware and Newt, I appreciate the info and suggestions. I may end up using comments to store partial lines of code with shortcuts as per your suggestion Newt. That is, if that's what you meant by shortcuts. I think that would certainly help, though some of the modular projects I've built would still require considerable work to copy over.

    The reason I am interested in copying code blocks from various projects is because I would like to build and test several game engine components in their own project files, so that when I start building a game, I can incorporate only the components that I need. For example, if I have a level editor, a camera system, a path finding system, a function driven effects system, and a custom function driven particle system, all as separate projects, I may only need the particle system and the effects system for a breakout-style game.

    At present, I have built a level editor with which I can build levels at runtime, and write and read formatted level files. I also have a project that contains a camera system that has several tracking modes, and quite a bit of code to make complex camera behaviors easy to manage at runtime via the function object. It seems like there must be some way to copy such modules into a new game project, without having to rebuild all that code, and without alternatively having to build all the modules in one single bloated project file that precludes the saving of successive module versions as their own independent files.

    I may be wrong, but I thought at some point I had read something about reusable code in Construct that was similar to the mechanism that MMF uses to support reusable code. Wherein if you copy code from a source project to a target project, any object referenced in the code that is not found in the target project will appear as a "placeholder" object, until you right click on it and specify an object from the target project that is to take its place. Construct is a pretty amazing tool, so I figure, it either already has something like this, or that it is coming soon.

    In any case, I appreciate the feedback thus far, That said, if anyone has any ideas that would allow the modules to remain as separate files, that would be preferable. I'm looking into and experimenting with this as well, and so I'll post what I find out.

  • Is there any way to reuse code from multiple separate prior projects without recreating all that code from scratch for each new project?

  • I think I may be doing something wrong here, but sometimes when I copy events from one project into another, all the events and conditions are pasted, but all the actions are missing. As near as I can tell, this occurs even when both the source and target layouts contain matching objects. Is there a particular way I should set things up to get the actions to copy along with events?

  • I'm not sure if this is a bug, so I figured I would mention it here first. It seems that if I apply a family to any object in the layout editor, the event editor's object browser will permanently switch from displaying normal icons (32x32) to displaying small icons (16x16). Further more, it appears that opening any .cap file that makes use of families will also elicit this behavior. If multiple projects are open in Construct, the shrunken icons effect is isolated to only the projects in which families were used. Within an affected project, all layouts will exhibit the shrunken icons effect, even if only one layout includes a family assigned object. I don't know of an option to set the size of the icons in the event editor's object browser, so to my knowledge there is no way to get large icons back after using families. That said, I'm still relatively new to Construct, so I may just be overlooking something.

    At any rate, does anyone have any recommendations for how to get large icons and families to work together, and or what I should do with the above information, if anything?

  • I am considering building a level editor, and I was wondering if anyone has any suggestions as to what objects or methods might be worth looking into. To be a bit more precise, I am looking to build a level editor that has the following characteristics.

    1: Supposing that I built a game that included this hypothetical level editor, an end user should be able to build a level from within the game application, rather than Construct. (This may be obvious, but I just wanted to clarify what I meant by "Custom Level Editor".)

    2: From the game application, I would like to be able to save and load level files.

    3: A level file should be able to store object instance xyz positions, as well as private variable values.

    As far as I can tell, the main options I have for storing level data are the Text object, the Array object, the Hash Table object, the INI object, and possibly some strange usage of the save /load game actions. Of those, I'm leaning towards the Hash Table object at the moment, being that it's far faster to read from and write to than an INI, and will likely be significantly more flexible than an Array or the save/load actions, in terms of what I can store and how I can store it. Obviously there are drawbacks as well, and so before spending a lot of time on it, I figured I'd see if anyone has any advice or suggestions.

  • Thanks for the info Manontherun and Newt. Private variables and families sound like good workarounds for the time being. I just wanted to make sure I wasn't simply making some obvious mistake while copying. Thanks again.

  • Is there a way to copy and paste a set of overlapping objects such that they retain their original relative z-order? That is, if you have objects "A", "B", and "C" with the z-order sequence of A:1 B:2 and C:3, then is there a way to perform a copy-paste such that the newly pasted objects are ordered A:4, B:5, C:6 ?

    It seems that whenever I copy and paste a set of overlapping objects, the z-order of the pasted set of objects is scrambled. The nature of the scramble seems partly dependant on the number of objects copied, and possibly the order in which the objects were first created. I may just be doing something wrong, as I'm still a bit new to Construct.

    Any advice would be appreciated. Thanks.

  • Thanks Lucid, that's exactly what I was looking for. I can't believe I missed the completed add-ons section the first time I looked through that area. Sorry about that.

    At any rate thanks for the replies Rich and Lucid, and keep up the good work on your respective projects.

    Take care.