Layout Object

This forum is currently in read-only mode.
From the Asset Store
This is a single chapter from the "Construct Starter Kit Collection". It is the Student Workbook for its Workshop.
  • Hello everyone. I've started using Construct recently and I am amazed at how powerful and easy-to-use it is.

    I've started working on GUI-based project using Construct recently. In this project I rely heavily on RGBA images for window backgrounds which means transparency is really important thing. Since I need to change only specific (and not all) GUI objects (hide one group and display another group) on a single layout I decided to use layout objects (since re-creating complete layout just because few objects are different is painful).

    However, layouts cannot have transparent background, or can they? I couldn't find a way to solve this issue. Any idea?

    Further, I noticed that when making transition to layout which contains layout object transforms the layout origin near at the center of the screen and remains there even after transition is over. Bug?

    Thank you

  • The next build has a transparent layout background feature .

  • If you just want your GUI to be transparent, (to see the game behind it, correct?) have you tried using layers?

    they can go over the top of your game, and be setup so they don't scroll.

  • If you just want your GUI to be transparent, (to see the game behind it, correct?) have you tried using layers?

    they can go over the top of your game, and be setup so they don't scroll.

    Thanks, that works.

    Anyways, just when I thought that Construct is the best development kit I have ever used sudden crash put me down and convinced me that python is really broken. I can't wait to see this feature being fixed in future versions.

    But now I have to figure out way to code all the simulation logic using event sheets (will be tricky). My game requires a lot of dynamic non-visual objects. I guess I can simulate these using invisible sprites and private variables. But how would I write behaviors? How would I map user input with these behaviors?

  • My game requires a lot of dynamic non-visual objects. I guess I can simulate these using invisible sprites and private variables. But how would I write behaviors? How would I map user input with these behaviors?

    What specifically are you trying to do?

  • Oh, I've just noticed that Function Object which lets you write your own parametric functions. And that you can write your own plugins using C++, but not sure if I can use the SDK with MinGW / GCC. Writing plugins can save me a lot of time figuring out how to make required custom widget objects in Construct.

    deadeye:

    I am making GUI-based turn-based life sim which puts you in the control of simulated human (actor) of simulated world (virtual world). Virtual world consists of you (the main actor) and number of other computer-controlled actors with whom you can interact. Each actor is made of number of properties which define them, much like characters are made of stats in RPG games. (Properties examples: health, energy, stress levels, skill levels)

    It divides gameplay in two phases: "planning phase" and "execution phase". Planning phase is a phase in which you plan your agenda for forthcoming day. You do this by placing activities in your agenda and configuring WHEN they should be performed, HOW LONG they should be performed and using WHAT they should be performed. (Activities are chosen from a given list of available activities at the turn. Activities examples: read book, hang out at the bar, play video games, build body, chat with friend) Once you're done planning your forthcoming day you hit the "execute" button and go to execution phase. This moves you to next layout in which your day is executed (simulated). Your activities are performed (or not, all depending on numerous factors) and your side-interaction with the virtual world. Execution is performed in real-time and the flow of execution cannot be modified by user input any more. You can control the execution speed though. The execution feedback is sent to you (the player) via console messages, much like it's done in simGangster game. Once your day is over, you hit the "Back" button and go to previous "planning phase" layout.

    Sorry for this long description, but I just couldn't think of any simpler way to explain the mechanics and what I want to program.

    This is how I planned doing this in Construct:

    Use sprites for actor object with "invisible on start" and "Global" options checked. Assign properties using private variables.

    Create actors at the run-time, probably in "Start of layout" event of main menu layout.

    Use array object for keeping agenda entries. Or maybe list object since I'll need more than one value per agenda entry. (remember - when, howlong, what) Make sure that object is global so that I can access it from "execution phase" layout.

    Use function object for activities. One function per activity. Group activity functions. (Grouping events is really nice feature by the way) Each activity accepts following parameters: <who> <what> <when> <howlong> and is executed only for one time-unit. One hour of the day is 4 time-units.

    Clicking the execute button all simulation logic is processed immediately and feedback messages are stored in appropriate array/list object.

    Execution phase layout loops through the object containing feedback messages and displays them on the screen at particular rate

    So, I am left with some visual work to do: making widget objects for agenda (list widget where agenda entries are placed), then making the item-list widget where I will display available activities and making that console widget where feedback is displayed. And I am sured I have missed something.

    Sorry for this massive off-topic post.

  • you can write your own plugins using C++, but not sure if I can use the SDK with MinGW / GCC

    You can't use the SDK with GCC or MinGW - I don't think they use the same member-function-pointer binary format (which is how the runtime knows what function to call for actions, conditions and expressions), so it just wouldn't work. Sadly C++ makes no specification about the binary format of these things hence we're stuck.

  • Well, it sounds like you have it pretty well planned out, actually.

    And yes, creating your own custom behaviors or objects isn't out of the question, as long as you know how. BROO recently wrote a rather specific object for his game recently... all it does is keep track of Samus Aran's inventory

    By the way, I really liked Uneksians and I voted for it . Are you continuing that project at all?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Well, it sounds like you have it pretty well planned out, actually.

    And yes, creating your own custom behaviors or objects isn't out of the question, as long as you know how. BROO recently wrote a rather specific object for his game recently... all it does is keep track of Samus Aran's inventory

    By the way, I really liked Uneksians and I voted for it . Are you continuing that project at all?

    Thanks.

    [quote:1nvqi87x]You can't use the SDK with GCC or MinGW - I don't think they use the same member-function-pointer binary format (which is how the runtime knows what function to call for actions, conditions and expressions), so it just wouldn't work. Sadly C++ makes no specification about the binary format of these things hence we're stuck.

    Pity. I hope VC++ Express Edition is adequate alternative?

    EDIT: Turns out it isn't. SDK requires ATL. Grrrr.

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