lennaert's Recent Forum Activity

  • You do not have permission to view this post

  • Perhaps just check the objects x position to the center of your other object? Kinda depends on your game setup and movements, and you can use the poly from just 1 object.

    You could even add a custom image point acting as 'center' reference.

    On collision

    If ObjectA.x < ObjectB.Imagepoint('center')

    Object A is on the left, otherwise, its on the right.

  • I really hope C3 gets a way to make global huds someday. Maybe an "additive layout" (like unity) where the layout contains the HUD, and this layout van be overlayed on any other layout.

    Hmm, did you grasp the concept of a global layer ?

    On one of the game layouts, add a layer at the top, call it HUD (or whatever fancies your hud layer name) in the layer settings on the left, click the "global" option.

    Now, on another layout, simply add a new layer called "HUD" (or the selected name) and wham, all the details, objects and positioning from the previous layout hud layer is there too in the new layout.

    So, you can build 1, or even multiple HUD layers, set them global, and include them in every layout you desire by means of adding a new layer and giving it the same name as the one you set globally.

    I have a game with different game mechanics on layouts (platformer side view and top down) and use 2 different HUD layers (HUDplatform, HUDtopdown) These layers get added to the required levels (layouts).

    I created the layers for the HUD on my Objects layout (to hold all my initial objects), so all my tinkering is done there, and reflected on the layouts where ever I include the layers.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Definitely

    - responsive

    Scale outer and some fancy positioning and resizing, CSS with web elements.

    - sending/receiving data from servers

    Easy: PHP/MySql over ajax

    Hard(er): Websocket/nodejs

    - could support some sort of payment system? even if it's redirecting to a browser link or something like that

    Lots of methods to implement paypal, mollie, stripe etc all these has some form of web interface.

    - has text chat features

    The multiplayer object has decent chat features

    - safe? (i'm not a web developer, idk i'm not sure if Construct has the tools to ensure privacy and safety for transactions, text messages etc)

    It is all web based, so, any form of payment system that has web based interaction will suffice. It is just a matter of how well you implement it that could lend itself for problems.

    - that could show you content based on your gps location?

    I used a separate PHP page for a solution like this once, a simple post to to PHP page helps determine location etc and based off that perform actions.

    I won't go in too much detail here, but I'm looking at ways to share mutual aid requests/offers

    Will require some sort of database backend to store related information. Again, PHP/MySql lends itself for this.

    Also, with the web3 and ether contracts, you could make a really fancy payment system, but will require some hefty insights on the whole crypto based contracts (not to mention the currency would be crypto). The former mentioned should be a lot easier if your able to communicate with databases over php.

    I know a few people that could help me with the technical needs of an app like that, as I definitely don't have the expertise for this, but I was wondering if you did a non-game app with C3 or something similar? if yes how did it go?

    Most of the apps I made were generally customized to meet specific needs. Those I made work well.

  • I often stuff several hidden global object on layer 0 somewhere ( 0, -1000), which holds all my game values. Several actually, depending on game structure, an object for player related info, an object for game stats or game element stats. (Also easy for saving: asjason)

    Using a hud group in the game's main event sheet, or dedicated hud event sheet which gets included, I sometimes use on start of layout in there to fill the preliminary hud information, or do a hud setup (positioning).

    If it gets loaded each time a layout is started, meh, that's supposed to happen me thinks ^_^ visually it wont make a difference.

    In the hud section I often use every x second and set it to 1 second, for HUD updates, life bars, feedbacks popups etc etc. The 1 second things make the entire process lightweight processing wise.

    As a suggestion, avoid using global variables to hold game status or player earned in game goodies etc .... global variables ... the name should give it away really. Is relatively easy accessible from outside the game.

    Using object variables eliminates a lot of potential unwanted intrusion to values or variables used by your game. (the fact on a object can be global and hold variables, is not the same as a global variable)

    By no means will this make your game 100% secure, but will most definitely make it harder to cheat.

  • Another option would be to have an entire event sheet dedicated to your debug events and include it in your main event sheet - then remove it before export. I like doing it this way as all debugging systems are located in one place.

    *Edit* Although re-reading your OP, I see that you're specifically concerned about forgetting to turn it off. If that's the case, stick to Wacky's suggestion.

    He could add all the events related to debugging below a specific group.

    And use "is in preview", to enable or disable that specific group.

    On the other hand, best practice would be to not forget it :P

  • Sounds solid

    I often use a Server group, to handle most, if not all connection related events.

  • I often do combinations of both, where eventually most events semi common will be under 1 event system.

    Mainly because:

    Even with a small multiplayer system, editing existing events, become tedious and bug prone due to 'forgotten' edits, or incorrect edits, because you you have to do a lot of things twice.

    Having a singular system, with is host (or is not host), is, in my opinion, the slightly safer bet, because most events only occur once.

    So for me is is more about the slew of aftermath work when tweaking existing mechanics.... I prefer to just edit once, vs, 'oh, forgot that, needs another edit' .... which lends itself for misleading the developer into tweaking other elements, because the first edit didn't pan out as expected. (Forgot something)

    One tip, when combining events, make sure to update/add comments to indicate what the code does for who, but that goed for most of the events in any game really.

  • if you add an event or action, the first object in the top left, is "System".

    And for creating new food, that kinda depends on your game, at this level, I would suggest using another every X seconds event, and have it create a food object somewhere on the map, perhaps random.

    event: every 3 seconds

    action: system-> create object Food at position x: random(LayoutWidth), y: random(LayoutHeight);

  • Give the object for the animal an instance variable health, make it 10 for this example.

    In the event sheet add system expression: every x seconds, make it 5.

    For action behind this every 5 seconds event add: animal object, subtract 1 health.

    Now it removes 1 health every 5 seconds.

    Give that every 5 seconds event a blank subevent, and add event: animal object, compare value: health = 0

    After the compare add actions that goes with your animal object being without health.

    As for gaining health, lets add some food when the animal bumps into it, add a food object/sprite.

    Add a new event: Animal object is colliding with food object, action: animal object add 1 to health, and another action: destroy food object.

    Voila, your animal object looses health every 5 seconds, and can gain health by getting some food.

  • Can you post an example project and server file with the problem ?

    I'll upload to my server and test it.

  • The caching doesn't seem the (only or main) reason. I discovered where to find the cached json-file (https://developer.chrome.com/docs/devtools/storage/cache/) and deleted the json-file (and even all the other cached files). But I still get the data from the old json file. Even after closing the tab and restarting the application. I still get the old data. This old data doesn't exist anymore at this point, so where is he getting this data??

    Wim

    Are you sure your referencing the right dictionary? It appears you have 2.

    The one getting loaded at the start is not the same as the one you load manually.

lennaert's avatar

lennaert

Early Adopter

Member since 8 Oct, 2013

Twitter
lennaert has 13 followers

Connect with lennaert

Trophy Case

  • 11-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • x5
    Popular Game One of your games has over 1,000 players
  • Famous Game One of your games has over 10,000 players
  • x2
    Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • Enduring Visitor Visited Construct.net 90 days in a row
  • RTFM Read the fabulous manual
  • x2
    Great Comment One of your comments gets 3 upvotes
  • Delicious Comment One of your comments gets 10 upvotes
  • Email Verified

Progress

25/44
How to earn trophies