Silent Cacophony's Recent Forum Activity

  • Some things that I can think of:

    • Multi-platform would be good, even if it's only the products of the application.
    • I do not know much about this part, or if the current one works this way already: A framework where the scripting support is as tight and transparent as possible. If possible, when creating plugins, the developer does not usually need to manually provide scripting access to the functionality provided by the plugin. It's generated automatically, ideally. Perhaps access to behaviors and such from python could be like player.Platform.XSpeed = 200.
    • tulamide has a good point about data types. Construct could use more support for those, in general, but user-defined would be very handy. Something similar to simple classes or structs could be very handy, even if just for the namespace organization. Arrays could use some more methods, like a simple sort, find, and a push and pop able to make easy stacks or queues.
    • The ability to store direct references to instances of objects, and manipulate multiple instances of the same object more easily. For example, let's say that you have one object that needs to keep track of two (or more) of an ever-changing bunch of instances of another object. You need to compare or manipulate both (or all) of those instances in some events.

    The only way that I know of to do this is to store their UIDs in variables, and put the object in question into two (or more) families so that you can pick and reference more than one instance of that object in an event.

    Perhaps variables could store references to instances, or a system function Object(uid) could be used as an indirect reference, or the objects could simply be indexed in a useful way, like "Sprite[index]....." I'm thinking that the index would need to be UID again, though, since objects are often spawned/destroyed a lot, making indexing problematic.

    • Conditional branching and functions need to be more powerful, IMO. ELSE and OR need to work well under all circumstances. I suppose that 'OR' could be replaced with an 'If any of the following are true:' condition if it seems easier to use.

    I like the current function object pretty well, though I dislike the whole 'add parameter' thing. I always call them as expressions. They could use some support for local variables. Not sure how I'd implement that, though.

    • Speaking of local variables, more variable scopes could be useful. Groups are a unique and interesting concept in Construct. They can be used as a sort of conditional branching solution with the ability to enable and disable them. I think that they could also use local variables. Perhaps there are some other improvements to groups that could be made to make them even more useful.

    A common want that I've seen is the ability to be able to reset a layout to it's initial state, completely. This can be problematic with global variables being used quite often and such. Perhaps having local layout variables could help with this, so that a layout can be 'reloaded' to an initial state more easily.

  • I've found two locations where Construct leaves files:

    C:\Documents and Settings\USER\Local Settings\Temp

    C:\Documents and Settings\USER\Application Data\Scirra

    ... where USER is your username in Windows. Both are hidden folders. If you're not familiar with those, they can be viewed by setting the option in Control Panel -> Folder Options -> View.

    The first one had a lot of folders with many files in each. The second has a few that are involved with previews and such.

  • Change the chicks, leave the vrrrm, I say.

    Seriously, every time I see your avatar, I wonder who that is. I seem to remember her in a movie with fast cars or motorcycles. Dunno if I'd recognize her with different hair, though.

    I like the sig style, but I guess you could do something similar...

  • Python is often named as a good first programming language to learn, and it's definitely useful as well. It's my favorite language yet, personally. It's also the one that led me to 'get' the usefulness of object-oriented programming, though it supports multiple programming paradigms as C++ does.

    I like dynamically-typed, interpreted languages with garbage collection, and Python fits the bill quite well. IMO, this allows you to focus more on solving the problem, and helps in learning and debugging.

    Possible downsides are that it's not as fast as a compiled language, and it's not well-suited to closed-source development.

    It is easier to port programs written in it across multiple platforms, though. For the most part, they just work.

    I picked it up after getting Construct a few months ago, and I feel quite proficient in it, having written several programs for my own use, and one for work in that time.

    I can see myself tackling C++ eventually, because of the ability to write plugins. Because Python and C++ can be intermingled in other projects, as well.

  • I don't know much of C++, but I did program in C long ago. C++ kind of scared me off back then, because it wasn't widely used, and it seemed unnecessary to me. The scene has changed a bit, though.

    In my opinion, any programming language, if you have a good reason to use it, is useful to learn. C++ can be used to create pretty much any software project, so it definitely should be considered useful. I'd also venture to say that once one learns C++, pretty much any other language should be easy to learn after that.

    On the other hand, there are some definite drawbacks to using C or C++, if you don't need it's unique abilities. While some prefer such things, I have moved away from statically-typed, compiled languages where you have to manage every aspect of your program's memory usage yourself. I don't need that.

    There are some solutions to make memory management easier, though. If you aren't careful about how you develop in C++, you can get some very hard to find bugs with bad pointers and such.

    It does have a huge amount of libraries that can be used. All of them aim to make certain tasks easier. Just have to be able to find the right ones for you, which can take time.

    Anyway, if you anticipate speed problems with your project, it's definitely a good solution to that problem.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi. I haven't been able to get Python to work at all in Construct lately (not sure why, but may be due to re-installing Windows XP, somehow), so I can't test whether I can get that to work.

    One thing that comes to mind: If you are using the 'System->Run Script' action or the 'System->Evaluate python command' expression, which must have the command enclosed in double-quotes("), then you should use the single-quotes (') around strings within those. No need to worry about that if you are inserting the script into the event sheet, though.

    It may just not work, in which case you can roll your own with Python, if you like. For example, this would be very similar:

    def getToken(string, num, delimiter=','):
    	try:
    		return string.split(delimiter)[num]
    	except IndexError:
    		return ''[/code:lynp8a7d]
    
    It handles out-of-range indexes by returning empty strings, but indexes are zero-based instead of one-based, as Construct uses. It also allows negative indexes, which count backward from the end.
    
    You can include your own functions like that by adding them into a 'Start of Layout' condition, since they need only be defined once.
  • Here's another example, with a way that you can use multiple image points:

    http://dl.dropbox.com/u/5868916/ImagePoints.cap

    Check out the private variables on the individual satellites, and the image points on the orbit object. The strings match, so you can use that with a 'for each' condition to easily set them all to the correct position.

    Also be sure not to include quotes around the strings in variable editors for private and global variables, but do use them in any expressions in your actions. Construct is a bit ambiguous there.

  • What he said, and since you were giving random() a floating-point number ( . = decimal point here, to be clear), it was generating one of those from 0 up to (not including)1.5, therefore making it impossible to match anything but the name for 1, which would still be a long-shot. Feed it an integer, and it acts as Citnarf said.

    Also, you could replace all of those events for the different names with something like this:

    + System: Is global variable 'person1_number' Greater than 0

    -> person1: Set text to {"Breen","Alyx","Barney","Freeman","Lammar"} global('person1_number')

    That expression returns the array value at the index provided, which is the global there.

    You can do a similar thing with the system expression GetToken and a string, as well. There is more info on that here: http://sourceforge.net/apps/mediawiki/c ... xpressions.

    Both of those use 1-based indices instead of 0-based.

    Anyway, I'm not looking for any credit for that.

  • Hi. I don't know of any tutorials on such a game. I made a simple example of how one might do such things, though (v0.99.92): http://dl.dropbox.com/u/5868916/Artillery.cap

    A power bar can be pretty easy to do. Could use a progressbar object, I suppose, but I'd prefer a sprite in most cases. I just used it's width as the measure of power. I surrounded it with a box object for a visual on what the max would be... EDIT: Just remembered that I used a tiled background object for the bar, because it generally scales better than a sprite, in my opinion.

    Though this is the first time I've tried the Physics behavior, it seems to lend itself well to such a game, so I used that. The attributes of that behavior can be tweaked as needed. Just one action containing a few simple calculations sets the projectile in motion at the proper angle and speed.

    It uses the RMB to set angle and the LMB to set power.

  • I have been vexed by that as well. I don't think it can be changed. Because it's a windows API widget, it's not quite as integrated into Construct as most other objects. For instance, it can't be zoomed.

    Anyway, you might be able to make an acceptable alternative. linkman2004 made an example of a custom editbox a while back. It uses a hidden editbox to do the grunt work, while a Text and Box object make up the visible display. Something like that can be adapted to work with multiple fields.

    Check it out here:

    http://www.scirra.com/forum/viewtopic.php?f=16&t=5686&p=45360#p45360

    Another alternative that I just thought of, would be trying lucid's spritefont plugin. There is a recent tutorial that mentions using it as an editbox, here:

    http://www.scirra.com/forum/viewtopic.php?f=8&t=6867

    The plugin is linked to in that thread as well.

  • Hi. It's best to think (anti)clockwise with angles. Construct goes from right-facing at 0 degrees, clockwise as the angle increases.

    The math is a bit of a pain when having to deal with the transition at 360/0, but Construct already has a condition for this in the System object, way at the bottom, under 'Values' - 'Angle is clockwise of...'

    You can test for either clockwise or anticlockwise, but it's best to only test if you've determined that the angle has changed, because it tests true with no change.

    I made a quick example here:

    http://dl.dropbox.com/u/5868916/Angles.cap

  • I like the style quite a bit. Keep up the good work!

Silent Cacophony's avatar

Silent Cacophony

Member since 11 Mar, 2010

None one is following Silent Cacophony yet!

Trophy Case

  • 14-Year Club

Progress

14/44
How to earn trophies