c13303's Forum Posts

  • I see, thanks Blackhornet. The JSON plugin also do it better in the end.

  • ho well thanks, I managed to use the plugin. Now I'm just afraid I wasted my time with dictionnaries ? We'll see.

  • Hi, using websocket, my client recevie this :

    var data =

    {"c2dictionary":true,

    "data":{

    "contenu":{

    "0":{"id":1,"what":"rock","qt":1,"owner_id":59,"screen_x":202,"screen_y":314},

    "1":{"id":2,"what":"rock","qt":1,"owner_id":59,"screen_x":202,"screen_y":314},

    "2":{"id":3,"what":"rock","qt":1,"owner_id":59,"screen_x":516,"screen_y":373},

    "3":{"id":4,"what":"rock","qt":1,"owner_id":59,"screen_x":639,"screen_y":287}},

    "return":"load_objects_return"

    }}

    It works very good. I can see the whole JSON string in console. I used to load my json message into a dictionnary (called jmessage) so it's very convenient to reach data.

    In that case I do :

    Jmessage : Load JSON from string data

    then :

    jmessage.get("return")

    is correct with "load_object_return" as value. But jmessage.get("contenu") is supposed to contain the object list :

    :{

    "0":{"id":1,"what":"rock","qt":1,"owner_id":59,"screen_x":202,"screen_y":314},

    "1":{"id":2,"what":"rock","qt":1,"owner_id":59,"screen_x":202,"screen_y":314},

    "2":{"id":3,"what":"rock","qt":1,"owner_id":59,"screen_x":516,"screen_y":373},

    "3":{"id":4,"what":"rock","qt":1,"owner_id":59,"screen_x":639,"screen_y":287}}

    but it returns 0. I believe that's because a dictionnary can not contain a object list as a value.

    So how can I do to retrieve the object list from the original string data ?

    UPDATE : I realize the nested data wasn't at the C2 dictionary format. So I changed the string like this :

    {"c2dictionary":true,"data":{"contenu":{"c2dictionary":true,"data":{"0":{"id":1,"what":"rock","qt":1,"owner_id":59,"screen_x":202,"screen_y":314},"1":{"id":2,"what":"rock","qt":1,"owner_id":59,"screen_x":202,"screen_y":314},"2":{"id":3,"what":"rock","qt":1,"owner_id":59,"screen_x":516,"screen_y":373},"3":{"id":4,"what":"rock","qt":1,"owner_id":59,"screen_x":639,"screen_y":287}}},"return":"load_objects_return"}}

    So I can load jmessage.get("contenu") as a dictionnary. But this one remains empty from data. Because it's supposed to load values and not objects ... I don't need to store the objects but I would need to list it in a loop...

    UPDATE 2 :

    I managed to load some json object data into an array.

    But i'm unable to extract it !

    In debug mode I can see there is the data into the array.

    But when I do :

    foreach X,Y,Z from Array

    log Array.CurValue

    and str(Array.CurValue) doesn't help ...

    Can you help, anyone ?

  • <img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt=":D" title="Very Happy"> Thanks a lot for this kind feedback. I've tested it with other friends and yes the tutorial isn't enough for these mechanics. I guess you didn't hurt these mobs because they have an armor (top-right screen you see life and armor of the ennemy you're aiming at) and armor means you need to have a greater firepower to hurt them. So you need to combine enough energy (let's say 3 particles together) before shooting (meaning : the 3 particles must merge BEFORE getting to the "front fire" module) and hurt a monster with 20 armor - doing 10 damage (power - armor = damage). Ho my, it sounds complicated when said like that, I really need to improve the tutorial !

    For the TTS (Text to Speech) is a feature I always liked as a electronic musician, and was amused to see it was available as a ready-made feature in Construct 2 with the user media plugin, I'm also surprised that people are not using this that much. Check the user media features : https://www.scirra.com/manual/144/user-media

    I didn't know the pronunciation was related to your system though - apparently in documentation it's related to the browser so I guess browser language. Didn't see how to force english language yet but I guess with nw.js the english should be set by default (I hope so). (i'm french myself but my system is in english - I believe the TTS sounds also weird in english ).

    Also, I agree with your market audit of modular systems <img src="{SMILIES_PATH}/icon_e_wink.gif" alt=";-)" title="Wink"> I'm also surprised I don't know more games with such systems (if someone has names, i'm interested ..) I'm basically doing a game idea I have in mind about for many years.

  • Hey ! Thanks for trying out, sorry you got stuck at the beginning. I'll try to explain here how it works, if I find the right words, I'll use in-game ..

    At the very beginning of the tutorial you don't need a hotkey, but it's true you need to aim with right click to get your character to shoot every time a "energy particle" gets in collision with the "front fire" module.

    So your first move must be :

    • press tab to open the engine
    • move the front fire module in a way it can receive green dots particles
    • keep right click down on the door until the character shoots and destroys the door

    When there's ennemies, you don't need to right click since there's an auto-aim.

    Saying this, I'm thinking about activating auto-aim for doors in a future build, it would be easier for you !

    (So far, the hotkeys are used to trigger tanks to release the accumulated energy, later in the tutorial)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Instead of resetting the layout, you just update the elements that needs to be updated ! That shoud involve :

    • The item you bought
    • Your inventory if there's one visible
    • Your money

    When you're playing Mario Bros, the level doesn't restart to update each time you get a mushroom or a gold coin

  • Selbst RPG is a prototype I've been working on lately for fun and now I'm looking for testers and feedback ! I don't know how far I will go with this yet but for once, I feel good with the prototype.

    Presentation :

    Selbst RPG is a top down shooter / ARPG where you have to build your weapons with a modular grid system. It has been inspired by modular music softwares I've been using in my musician life.

    Special mechanics are easy to explain : in the "engine" grid, you have generators, spawning "energy particles" that will power your "weapon" modules such as : front fire, side fire, bender (allowing you to bend the trajectory of your fire), rocket launcher (rockets can be bend too), shield, mines, teleportation, speed up bonus, health regeneration and so on ... you can build everything you like, like focus on one specific firepower or make something balanced with lots of defense and various weapon. You also have to manage the controls of it with Hotkeys (modules connected to your mouse/keyboard, releasing a signal to trigger the modules that requires it) and "effects" modules such as tank (accumulating energy to release bigger particles), angles, speed up energy particles etc...

    So as you play, you build an engine that will allow you to defeat ennemies but also resolve puzzles, you can save your builds to "disks" allowing you to reload any build at any time (because you will need to make special builds for special situations) and you will find new modules as loot on your path.

    Dev thoughts:

    As today, mechanics are the most advanced thing of the game. As you will notice, graphic design is quite minimalistic (320x200 resolution pixalated squares style is easier to deal with for me 😉 ) , background story is an abstract joke, and I've made efforts with the level design but I still need to work on it to get the prototype I'm thinking about, it still needs "big" situations and extreme cases where you really need to get the maximum of your engine with various ennemies at the same time, and I would also like to get a more extreme feeling with tons of sprites on the screen like in Bangai-o game, for those who know.

    But still, the prototype already pretend to offer the player a use of all the available weapons with dedicated situations, with a tutorial and a 4 levels dungeons with a ending boss, offering 20 minutes of gameplay for an experimented player such as me (the developper), so I guess a bit more for a new player <img src="{SMILIES_PATH}/icon_e_wink.gif" alt=";-)" title="Wink">

    My personnal questions so far are mostly : will Construct 2 (or should I say : javascript) allow me to make that big "sprite explosion" game ? I already dealt with a lot of performances issues (because I require a rock solid 60fps on an average gamer machine) and I still have plans to improve it. For example I noticed that ennemies pathfinding itself was using 20% CPU, so I know my next move will be to make a mix of custom movement and using pathfinding only when needed (10% of the time tbh). I'm also using a tiny resolution so I don't have to care about sprite animations size. A grid / tilemap system is also helping a lot. Then so far things are not doing bad, maybe I'll be able to do this.

    One other question is about the mashup between arpg and shooter. Is it a shooter or something else ? I've been thinking about making it simpler as a shoot'em'up (one path, automatic scrolling and stuff) in order to get more speed and action and less thinking beside the engine building. But I also like a bit of creative freedom so I'm thinking about levels and small challenges.

    I need you !

    You can try it the actual demo here : http://webmecano.com/c2/SELBSTRPG2/SELBSTOUI/

    Every feedback will be greatly appreciated.

    • Did you understand well the mechanics with the tutorial ? Is there modules you didn't get to work ?
    • Did you beat the game ? Did you find it difficult ?
    • Did you feel comfortable with the controls ?
    • Did you use a lot of various modules or did you stick to one thing in particular ?
    • Did you have performances issues ?
    • How about the game pace ? You want more fight and more explosions ? More shaken screen, don't you ?

    and any commentary ...

    Thanks <img src="{SMILIES_PATH}/icon_mrgreen.gif" alt=":mrgreen:" title="Mr. Green">

    Presentation Video (contains a bit of spoilers so don't watch it too carefully if you're willing to play the demo)

    Subscribe to Construct videos now
  • the stretched pixel is a pretty good idea, actually ! Thanks !

    I still need to learn how to use lerp beside that

  • Thanks for all this information I was wondering too. I'm still trying to be sure of some details :

    If low resolution isn't a problem, I read you can improve memory using very small textures for sprites, let's say 8x8.

    And lets say we use a small window size (fullscale quality low) and they appear big on screen, with low resolution.

    Small textured sprites 8x8 reduce loading at start, for sure, but will it also improve the CPU / FPS, or is it just a matter of number of elements ?

    Also, according on how are working plugin like custom movement, will it be exactly the same if I use a 320x200 window size + 320x200 layout, with 8x8 sprites (and globaly reduced pixel values)

    or a 1600x900 window size / layout with the same 8x8 textures but sprites resized to appear big ?

  • He's right saying the "restart" is the problem. Everytime you restart the layout, you basically start the layout, and you asked to set money = 10 at start of layout.

    You can make what you want by setting the global number Money = 10 and remove the condition "at start of layout set money = 10"

    But restart the whole layout to update your wallet feels a bit inadequate for Construct 2 I believe, it will ask to reload all the assets and things. You better update dynamically without restarting maybe ?

  • I guess you need to use tilemap instead of tiledbackground.

    With tilemap you can detect and modify what is on any square,

    I don't believe you can do it with tilebackground. It is just made for visual pattern in the background.

  • That looks pretty good, and interesting !

    Thanks for the Capx of mini-map that helped me for the camera thing ! Will reproduce

    You're using a small window size (320,224) and it makes some low resolution display, I didn't think about this (maybe because I don't have a smartphone) but it looks great.

    SO i'm wondering : do you know if it has an impact on performance ?

  • Those plugins are doing exactly what we asked for, especially Canvas.

    But I'm using big layouts (3000~5000px) and it create a massive stuttering when drawing on such big canvas. (and I have a good computer ...)

    Paster has no problem, though, but I can't draw a clean line with quads ... (maybe i'm wrong ?)

    It has another problem : impossibility to delete the lines except if you clear the canvas.

    In the end I switched back to particles ... It doesnt make lines but it can draw a path with dots ...

  • sounds like an idea, thanks !

    I guess this is it :

  • Hi, how would you draw on screen, with a line, a trajectory from a moving sprite in Construct 2?

    I would think to draw a 1px sprite every tick at sprite position, but using that much sprites sounds like not optimized at all ...

    Do you think of any other way ? Even if it requires to write a plugin ?

    Thanks for helping