GeorgeZaharia's Forum Posts

  • cjbruce Agree there, it's a matter of design acceptance between the implemented 3d script and Construct, if you want to make it technical so you as the developer / porter of the plugin to only understand it and a few others that are programmers, or is it for everyone that never has come near the word "array" or "mesh". (and that is where Q3D shined over Babylon from my opinion also, however i did found that the Babylon js was way way faster than the Q3D mainly cause of the separated way of doing things and not using the C2 array/picking)

    Also i remember some questions Quazi had about the c2runtime but i can't recall what that had to do back when he was developing the plugins and behaviors, was probably figuring out compatibility, but C3 runtime might be a different possible easier match.

    Edit: cjbruce is the game using any 3d assets? or features that C3 doesn't have?

    macube that is nice can't wait to see ur achievement, would love to see your events structure though more than the three.js suzanne model spinning or eating a banana lol

    cause in theory, you can load the three.js file in any Construct project and use the browser object to build up/execute the js functions, but then that wouldn't make it construct dependent anymore, but js dependent ... and using Construct to only port to different devices.

  • that is because u have to save the item first in localsaving plugin, and to do that u have to go to a game layout and trigger the save level item value to localsaving, once that is done, you can then move to the main screen and trigger the event that you show in your screenshot.

    it looks good the way you set it up. is just it doesn't work, cause ur item doesn't exist in localstorage yet, so your item.get returns NaN and sets value of level to NaN. i presume also the buttons don't play anything not even the level 1?

  • there is no built in system like that everything u see in games published by construct function of game wise is made by construct users, what construct offers is visual scripting ...

    which means it does code work for u and u just use simple math logic and puzzling of behaviors and objects to make stuff..

    so for a level system you need to create a Global Variable... that will never reset that means when u change the layout player dies or whatever happens u never use the system expression "reset global variables" that will revert it back to initial state u have when u export the game.

    so in order to make the level system u have to say in your pseudo code something like this

    is Global Variable "level" = 1

    Left clicked on sprite level 1 = go to layout "level 1"

    for level 2 3 4 5 ...20 u do the same for the menu selection.

    then u need to use the same "level" global variable during the layout, and check if player finished the round lets say he found the key to the next level.

    then in ur code u need to do something like

    player collision with key

    add to "level" 1

    go to layout "menu selection"

    (il add some saving information here also for in case stuff closes suddenly involves local saving)

    now on menu selection

    when it starts u always make the items in menu selection check for level = ???

    if the level value matches their supposed id or level to go to ... then we make their frames change to color gold or next frame after gray frame, if its not equal to item menu selection id u don't have to code nothing just keep the gray frame on frame zero

    now for local saving .. when player hits key or on every 2 3 seconds, u just save the global variable using localsaving plugin i forgot how is called, as "level" and the global variable value that is by inputting as value the name of the global variable so your localsaving event needs to look something like this

    every 3 seconds localsaving save item "level" with value GlobalVariableName - u change that

    so in case a device failure happens he won't lose much progress.

    to load that data.

    on the main menu or logo progress whatever comes before the level selection, u go as follows

    on start of layout localsaving plugin Load item with name "level"

    Condition : if global variable not equal or less than localsaving.lastdata Action set global variable to localsaving.lastdata

    and kinda that is it, for more info on this i think tutorial section has a menu with local storage like i just explained somewhere if its not on the construct.net try scirra.com/tutorials is for C2 but it works for C3 also ( as long as there are no custom plugins used in the .capx files that are not officially supported)

    hope it answers your questions have fun :D

  • Hey GeorgeZaharia

    Thank you for your interest. I understand you wish to have a look.

    Please go to this link I have made available: https://www.dropbox.com/s/9upzsaiuaorva6p/Chomp%20%27N%27%20Cheeky%20Unsaved%20Maintenance%20Version.c3p?dl=0

    This is my current version after the fix I made. Please check it out.

    I have not read your entire post yet because I have to go out. I'll be back and have a proper look at what you're saying.

    Cool, thanks il upload my own version on a personal link, u can remove urs from public view, also, i just noticed this says Solved in title yet the last commentary you posted about being "solved", i sort of skipped it(my bad). il try simplify ur movement if u didn't already i guess and get back to you.

    took a quick glimpse at the movement, is a bit overworked but it does what u intended so it should be fine.

    but u could just added pathfinding behavior to the Clamp, and go with a logic somewhere like when he has line of sight on player find path to player and make it move towards player along the path every time%speed where speed = anywhere from 0.1 to n which would make him look like is doing tile movement pattern.

  • i would like to take a look at your isolated movement part of the code if possible.

    what my suggestion is if is not possible to be shared, is that you could try instead of using X or Y as prerequisite for line of sight and instead use movement direction +distance from where it should stop.

    for example if enemy is moving only in a foward type of patern or clockwise lets say in a square or round pattern, u can say that is "front_movement" if he moves any other direction then is not forward... with that logic in mind, adding additionally a distance to stop from objective point reached.

    so enemy is moving_forward

    and

    distance(enemy.x,enemy.y, player.x,player.y) less or equal with 32 pixels lets say don't know ur grid size but lets assume u have a 32 by 32 grid movement block that means he is on a block adjacent to another meaning he needs to stop at a 32 pixels distance from players XY.

    hope it makes sense to you and helps you achieve a new solution.

    if it doesn't i could demonstrate it to you on ur tilebased movement i guess.

    also the movement should be general for all enemys, not just 1 type of mob... with little tweaks for type of mobs of course but the core movement system should be the same for all enemy (ex distance+movement forward has to be basic rules, what is considered additional ruling based on class is up to you to decide being it speed movement, waiting time etc), otherwise you will cause long run development conflicts.

    Try refresh the page using shift+f5 or ctrl+f5 to force clear the website memory cache... i tend to edit a lot of times my posts.

    Edit ~5: the problem i see with using x enemy = player x or y is that the enemy if is a large patch of grid movements, then the enemy can be at 10-20 grid spaces distance but on same X or Y and that would might be true for the logic of the system, but it would look glitchy as hell, as won't be near the player at all.

  • You do not have permission to view this post

  • Ok... now i'm working on a own 3D Plugin for Construct 3 Runtime.

    Nice. Il definitely buy that one also (if you will make it available for sale that is) ... i have a collection of plugins by now that i don't even use anymore.

    Is it gonna be Babylon.js or Three.js based?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • For who is looking for the example files or manual, i took the liberty to upload them to my google drive they should be available as long as google drive doesn't close their services in the future.

    Download Examples + Manual

    Examples

    Manual

    In case you forgot how to download Q3D if you purchased it, here is the link

    That being said, it still remains useful for C2 projects.

    My last test shows compatibility with latest Construct2 Stable Version for desktop and browser - i didn't yet tested on mobile platforms.

    (don't forget if you are using it in your project, don't minimize/scramble your script it will stop working)

  • I think their problem was the pricing, I mean anyone can use cordova for free right?

    That's what i felt also, when i started using them back in 2015 i think... for like 1 test and then when i asked removing the logo how much will cost ... i just said .... "ooooook cmd commands it is".

  • You do not have permission to view this post

  • what i meant by using pathfinding is that you have to code the events to use it properly, once you figure out the size and spacing required for block sizes so pathfinding is working properly you need to code how units move by choosing a target position

    and you can do that if im not mistaken by using the RTS example construct comes with, is very similar to the image you are showing, basically u select unit, then for that unit u can use a boolean, or variable and set it to a value =1 then if value =1 the unit will find a path to move towards the target position u give it.

    the answer i gave previously was actually not broad at all, is the expectation you had that made it broad.

    considering you are a 2014 construct user i was thinking you know how to code the events to achieve something like that, is rather simple, i just pointed towards the simplest solution and that is usage of the pathfinding behavior.

    i think i have a tank example that does this and here it is super tank battle example

    that was made with pathfinding and some tutorials from our good old C2 that explains active minimap interaction.

    sadly i don't think i still have the capx for it... but pathfinding is the solution

    Edited: is your lucky day i found the capx from C2 tank example update v3

    however i just checked the advanced wars movement system, and it looks like grid movement + pathfinding.

    and for that there are 2 Construct2 tutorials i can think might be useful for your case example 1 & pathfinding tutorial explained

  • Gigatron hey, i remember you sent me this a long time ago, wondering if you still have it available? the bubblefx i can't remember if this is the one that could map a 2d image and make it roll or not ... i think is a effect from you that i used to create a fake 3d 8pool test

    but i think i lost the files... once the pm services shutdown on scirra.com, if there is a chance you still have it can i have a link for download please? much appreciated.

    Edited:... nevermind was the glsphere effect

    thanks for doing this all the time :D

  • it means u need to export using c2runtime.js from advanced settings. however if u built on c3runtime and u you downgrade ur system to c2runtime some objects events might be lost(because they might not be available in c2runtime::like bbcode for text objects and other new stuff) so tread carefully make a backup of your file before you do that.

    but i see u fixed it.

  • I have a player sprite and a target sprite. The Target sprite is set to mouse.x/y.

    The player's angle is set towards Target. If I click mouse, it spawns a bullet from Player and shoots towards the Target. WHAT'S HAPPENING IS... If the Target is too close to the player and shoots, then the bullet goes in another direction. I want to stop this from happening.

    On mouse pressed

    A:> create bullet at player.x y

    A:> bullet set angle of motion to angle(self.x,self,y,target.x,target.y)

    make sure the bullet that is created doesn't have the setting "setangle" ticked.

    if you have this already done in your project, i can't see a reason why it would fly a wrong direction, unless there is some event condition/action that is interfering with it.

    try testing the above on a clean project and compare it with your projects code.

    hope it helps.

  • that looks like manual pathfinding per unit, you can do the same type of movement by using the pathfinding behavior, or making your own pathfinding events_behavior.

    but yea pathfinding is the answer as i can see and a few re-usable events with functions.