santiagoestrade's Recent Forum Activity

  • Sorry if this has been dealed with before, but couldn't find.

    My game is a battle board game. Each player may choose among different troops to make its army. Each troop has its own stats.

    So after much reading around here, mainstream opinion is that DB should be online to prevent cheaters modifying their local files. So I now have a JSON hosted online.

    I am learning how to work with JSON object, load it into an array, pull only paths, send back, etc. But now I am stuck.

    I can't learn which steps I am doing wrong for I cannot see whether the data is being correctly parsed or updated.

    I have read that is not possible to sync data to an online DB while on prev. So, can't I monitor data being saved/loaded correctly until game is compiled?

    Debugging is not helping me either.

  • Is it possible that you include your C3 ported Rex MoveTo addon among the game collection?

    I am interested whether you plan to update it to be compatible with the new R125 feature- the one that enables instances to be created at runtime even if there is none added to any layout.

  • Sumyjkl

    Thanks for the response. So, for every array or dictionary that I create in the editor as a project file, there must be an array object related to it.

    I wasn't getting the point of having array/dictionary instances. Forgive if it is a nonsense question. They are supposed to be data storage objects, which don't are visually settled onto the layout. And the way their values are 'called' is by actions or expressions, so I thought instances didn't matter here.

    But if I understand you correctly, I can attach an array/dictionary to a sprite (player, enemy, ...) through a container, so having just one array/dictionary object, esch instance has its unique values stored separatedly in its own array/dictionary, just like instance variables. That sounds way better.

    I was approaching this by making an array where every character (player/enemy) was included. X being each different character and Y storing the diffetent 'stat' values.

    Now I am not pretty sure about my method.

  • I have a basic question that couldn't locate on the forum. Maybe the most obvious of the answers, so apologies in advance. I guess- Arrays, xml, json and dictionaries are allowed to be added more than once to the project. A text box says they are available for the entire project, but other plugins like input controls, web, etc.. don't show up again after been added. And also those files can be created in the editor without having previously added the object to the project. So I am a bit confused.

    Does it mean that for each one of those project files that I have to be requested, I must add one object of the kind? I mean, if I have 3 dictionaries, would be 3 dictionary objects with 3 project files or just 1 dictionary object for the three files would serve?

    So, e.g.- a string key is unique for each dictionary JSON project file or for each dictionary object?

    Given JSON, arrays, dictionaries and XML have different ways of calling their values through actions or expressions and some return values as strings and others as numbers, I am mixing things up at figuring out the best way to manage dB for users, players/enemies stats, leaderboards, ... and need some enlightening.

    But I will not expand any more, just that simple doubt- one object per file or just one object and all the files?

  • You do not have permission to view this post

  • dop2000

    That's great!!! So, as you say, it's a rather simple, elegant and clean method. Even helps organizing sprites and clearing the layout up.

    You are my savior, man! To be honest, several of the ways I am managing my project come from your tips on different posts around the forum. I'll stop bothering you straight forward and reading more your words to others.

  • dop2000

    Thanks very much for the explanation. It totally makes sense now. With no indenting, I was destroying at the very time of creating.

    So, may I ask, according to your experience, which way would be less likely to create incoherences for the future?

    I have tried both ways you told me and after adding all the rest of the events, they behave correctly. So I don't know which road to take.

    I am not using any IID for picking, so destroying the first instance does not make any difference, as the game runs as it should. But I might need to add some more loops to the sheet and still worried about how transitioning from and towards the layout would affect. I think this is due to my little understanding of loops and sub-events. That destroying event in the way you showed should be always the first thing to happen, no matter the rest of the event sheet, ain't it?

    On the other hand, something on my mind keeps telling me that having the 'ghost' sprite on the unused layout could affect the sprite.count at some point, when adding more events that use that trigger (have already a boolean variable instance and a pick by comparison for that). I have lots of conditions like "when every instance is locked", "when there are no available instances left", "when every instance is on their variable position", ... some 'for each' loops,...

    I'm trying to find on the web whether the triggers, loops, picks and counts takes into account every layout or not, with no result so far. Layers are mentioned everywhere, yet not layouts. Now reading about layouts to find out. Anyway, I guess by your words that it only checks active layout. So I would be worrying about nothing.

    If only taken active layout, it seems a rather stable solution, since being static and not rendered, as opposed to having some rendered instances on start, which must be removed through an event storing/deleting data into memory, managing logic and checking triggers. But I could be wrong.

    I am afraid to go on working in some fashion and then after a time realizing that will have to write back the entire event sheet because of the approach I had chosen was not right.

    So, as a practical advise for a newbie- sprite on assets layout or destroying on start ???

  • Here is a pretty basic example. Just a tilemap and a sprite. No addons nor behaviours.

    1drv.ms/u/s!AojCIgmN1VlPiT9oKnbUiHXCBSpG

    The issue comes when creating objects.

    In the event sheet, I just have so far:

    On start of layout >

    Repeat 5 times >

    - create troop

    Now, the problem:

    - If there is at least 1 sprite instance, tilemap shows up and those other 5 sprite instances get created.

    -If there is no other sprite instance, tilemap doesn't show up at all and no object/instance is created.

    -If there is no sprite instance and neither the system object creating event, tilemap shows up (with no other sprites, for I didn't inserted on layout nor created through events).

    Possible workarounds:

    - I have to recalculate every pick and count with a -1 or +1 depending on which evaluations/comparisons are needed for the events to trigger and later on it causes several issues when adding subsequent events. Moreover, in order to make it behave as the rest, some events at first are needed to position that first instance in the way the rest are on being created, set angle,...

    - If I add an event to destroy that very first instance, it seems even not to create the other instances.

    - Disabling that only event (creating objects) makes tilemap shows as it should, even if the troop instance was deleted and no sprite instances are left onto the layout. But I need to have those sprites on screen, so it oblies me to insert in advanced every instance that will appear on game and keep changing visibility/opacity all the time, etc...

    Main concern:

    There is some relation between tilemaps and creating instances on layout I don't get.

    As much as I read, can't find the point I'm missing.

    Why would the existence of an instance onto the layout screen interfere with an event whose condition doesn't involve that object?

    Even worse- Why would the existence of an instance (sprite) on the layout screen interfere with the visibility of another object (tilemap) in a different layer, with no event relating them?

  • dop2000

    Here is a pretty basic example. Just a tilemap and a sprite. No addons nor behaviours.

    1drv.ms/u/s!AojCIgmN1VlPiT9oKnbUiHXCBSpG

    The issue comes when creating objects.

    In the event sheet, I just have so far:

    On start of layout >

    Repeat 5 times >

    - create troop

    Now, the problem:

    - If there is at least 1 sprite instance on layout, tilemap shows up and those other 5 sprite instances get created.

    -If there is no other sprite instance on layout, tilemap doesn't show up at all and no object/instance is created.

    -If there is no sprite instance on layout and neither the system object creating event in the event sheet (or having it disabled), tilemap shows up (with no other sprites, for I didn't inserted on layout nor created through events).

    Possible workarounds:

    - I have to recalculate every pick and count with a -1 or +1 depending on which evaluations/comparisons are needed for the events to trigger and later on it causes several issues when adding subsequent events. Also adding some event at first to reposition that first ibstance in the way the rest are, set its same sngle, etc...

    - If I add an event to destroy that very first instance, it seems even not to create the other instances.

    - Disabling that only event (creating objects) makes tilemap shows as it should, even if the troop instance was deleted and no sprite instances are left onto the layout. But I need to have those sprites on screen, so it oblies me to insert in advanced every instance that will appear on game and keep changing visibility/opacity all the time, etc...

    Main concern:

    There is some relation between tilemaps and creating instances on layout I don't get.

    As much as I read, can't find the point I'm missing.

    Why would the existence of an instance onto the layout screen interfere with an event whose condition doesn't involve that object?

    Even worse- Why would the existence of an instance (sprite) on the layout screen interfere with the visibility of another object (tilemap) in a different layer, with no event relating them?

  • Basically, the statement above. I am testing with several capx (from me and from many examples on tutorials and posts) and it always happens the same.

    When having a Tilemap, it shows up correctly on the layout. But at preview, if no other sprite instance is inserted on the project (not at runtime), tilemap never shows up.

    This is an example of mine, but you can try with any project woth a tilemap and some sprite.

    1drv.ms/u/s!AojCIgmN1VlPiXHgVYT1aGqqT9-6

    If you delete the troop, arrow and line which are outside the viewport and then prev, screen is blank (black, actually :p). Were any of them onto the layout, tilemap shows up as it should.

    Maybe I am missing some point on how tilemap works? Or some parameter I didn't notice had to be set up on the properties bar?

    I know it could be worked around by adding a destroy action into the first event, since I do know they all have IID 0, due to being the first ones created. But it's a bit odd.

  • dop2000

    Sorry, I didn't notice I was posting on the wrong place. I'll ask there.

    The plugin is from chadorireborn. Some other pal told me about it when asking about plugin compatibility and linked.

    It's a public post from him/her, offering some addon ports to the community for free, so I guess- feel free to welcome MoveTo again!

    construct.net/en/forum/construct-3/plugin-sdk-10/construct-3-runtime-a-few-cons-137539

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I have tried to seek for the topic but it seems no one worries about it. Looks like I am the only one struggling to work with C3 on my smartphone.

    It would be useful to be able to drag events by touch on the event sheet, as for the mouse on PC. Or just adding some extra options to the contextual menu, like 'indent event' and 'push above / push below'.

    Working with a smartphone, I can't indent an event or push it above or beneath. So it's all a matter of cutting/pasting once and once again. It slows down the proccess.

santiagoestrade's avatar

santiagoestrade

Member since 25 Mar, 2016

None one is following santiagoestrade yet!

Trophy Case

  • 8-Year Club
  • Email Verified

Progress

9/44
How to earn trophies