GeorgeZaharia's Forum Posts

  • can u upload the html5 version on itch.io so we dont have to download the file? i can't play windows apps... linux ... laptop.. and slow connection.

  • it should be automatic as long as u have orientation to "Any" and not locked to "landscape" or "portrait" ... as far as i know... some admin probably would have a better answer than "automatic" sorry if looks stupid my reply... but im curious about this also, did something changed?

  • you could try even if is "dangerous" this format

    isBoolean

    ===> blank subevent ==> always triggering action

    ===> subevent trigger once ==> some 1 time action everytime when boolean is true(whenever bolead is true... spawns 1 item for example... the item can be spawned multiple times if the isboolean toggles on off)

    as doop said... might cause confusion and code breakage... if u don't keep proper track of it... just keep it at the end of ur code.

    personally i didn't had any issues with this format, unless i added random conditions on top with isBoolean

  • My game lags when its in full screen.

    what type of device are u running it on? does it have enough GPU/RAM/CPU memory?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks. In that case, what is every tick for?

    for actions that don't need a condition, like updating text everytick... or making something move on a loop without having a condition to change its movement (like a solar eclipse or moon/day moving in ur game, or a score update something of that sort.).

    now u can run everytick or just have a condition... and basically if the condition is always true... = everytick... that action will always fire.

  • since we dont wanna put the spawning invisible sprite to an endless road(its tiring),we can try to find a way to put this spawner in specific distances using maths or some features in the game(i havent tried it).their gotta be a feature to do this. or we can use timer, i.e. after x seconds it spawns. but the latter is kinda inconvenient cause if player misses to kill the zombies in time, their would be too much zombies after x seconds.

    i didnt see george zaharia post while i was writing this.

    his post is the right answer.

    you could do it with a timer also, just make sure u limit the zombies count max... to like 5 or so...

    like every 2 seconds

    zombies.count<4

    action>>>create a zombie at X random...

    this way u always have only 4 zombies on screen at all time. or newly spawned.

    anyway here is my example, i made 2 options inside, line 7 block works with the every1 second block on line 2 i think, and line 13 is just a variable controled by how long u keep pressing keys left and right aka moving character... i think line 13 is way better than my other version... is simpler... basically what line 13 does, is everytime u press left or right adds 1 to a variable when that variable hits 200 means u moved 200 "units" and spawns a zombie in ur face at 200 px ... then resets itself and u can move again spawning more zombies, u can alter it as u want... add a random position like random(200, 1500) depending on ur screen layout size etc... 200 being the minimum distance from player zombies will spawn... ud want them to be at somewhere 200px away so u have time to react.

    everything else is adjustable play around with it ... have fun, and hope it helped in any way.

  • yes you have to unpin/change position>then pin it back on the object .... i don't think construct changed the way u pin objects ... but as i remember back in C2 u couldn't change the position of an object if was already pined. i mean u could setup the event, but would be overridden by the pin behavior so u wouldn't see any difference.

    btw that everytick condition is not needed, you can run the if inverted condition alone, and will act as a everytick condition. and same applies to every other condition that doesn't have that green arrow on it which means trigger one time.

  • u could do a variable and add px's or distance traveled to it, based on player movement, for example u would need 2 variables

    oldX and curentX

    the condition format must be like this to be able to check distance and rewrite

    everytick setoldx >player.x

    onleftpress orRightpress > setcurentX to player.x

    compare two variables > distance(oldx, 0 , curentx,0 ) is greater or equal 200 >action> create zombie at player.x +100px (or -100px depending where the player is facing.)

    not sure if u want it like this, but what this would do is check if the distance between last position of player and curent position is greater or equal to 200px then will spawn a enemy around player at 100 px, to check where the player is facing, you could make use of the left and right button when u move by adding a 3rd variable and call it "moveLR" value of 0 being left and 1 being right

    and when u press left u setup moveLR to 0 and when u move right u setup moveLR to 1

    then u just check if moveLR is 0 or 1 and spawn the zombie to player.x-100px if moveLR = 0 and player.x + 100px if moveLR=1

    i can do a quick example if u want.

  • > You need to move the condition from sub-event to event #60. "While" and the condition should be in the same event.

    > I also suggest always adding this "emergency" exit condition to While loops, to prevent infinite loops: loopindex<1000

    Hi,

    I realise now that I was expecting one of the sub events conditions evaluating to False to cause the WHILE loop to exit, so thanks - it has to be in the same event. Still an issue though, the overlap test is not working. So I can get out of the WHILE loop but it is still leaving overlapped sprites. Can you not check for overlap in the same frame you spawned then?

    Regards

    S

    you should be able to check for overlaps once the item is created, but i think since the overlap checking is under a function you could easily drag the subevent from under while and place it under the function as now u have

    Function

    ---while subevent

    ------subevent with while as parent

    what im suggesting is

    function

    ---while subevent

    ---check for overlap (with function as parent) -- this way gives it a bit of time to create the items, then check the overlap.

    not sure if will work, but logically it should... unless we understand wrong the while loop.

    Edit2: if u can use the overlap check on a everytick id separate the "overlap condition" outside the function, and run it always basically... if that is a posibility that will definetly work, just not sure how will affect ur gameplay/system u built, and if u need that!

  • quick question, why are you inverting a = value comparison ? u could easily say not equal instead of equal + inverted... might be that the inverted trows a error? did u check the console of the browser? not the debug console.

  • Hi, not sure if this was solved or not, but an old trick we used in C2 was to move the new card created if is overlapping another a few pixels to left or right until exits the overlap... so u can move it 5-10-20-50 px's around the overlapped card randomly, it would be much faster, and less hanging out.

    Another way of doing it would be to create a dictionary or array, and save the positions that the cards are spawning at... and just spawn anywhere else but in those locations.

    array thing might be to advanced and to complicated... but the 1st solution should work just fine, unless u want it to be pixel perfect, then 2nd mention would work better.

    for the 1st solution, i given above, to work, you have to have the cards inside a familly lets say "familly cards" and then (C3 doesn't really need families to pick objects of the same kind, pretty neat, you can just directly pick same card item name top... forgot about that feature)use the overlap condition like so:

    if object.card is overlapping object.card > subcondition > object.car.pick.top.instance> Action >setx.object.card to self.x +20

    the above line would push the newly created card to the right of the old card that is below it.

    consequently u could also, move the "famillyCards" when they are overlapped to a random +- Y position.

    il do a C3 example in a bit, for the 1st suggestion, just i can't use famillies cause freeEdition limitations... but il use 2 different sprites.

    random items, no grid placeholders example 1

    Edit2: now if your game doesn't use the spawn like in my example, but u have like a limited grid layout to spawn in ... for example, a chess table like format... u can generate a grid pattern using a sprite give it a bolean lets say "isoverlap" and toggle it false or true when u generate cards in their position. and then u can check those grid items, if "isoverlap" then pick another one. this way u don't have cards moving around ... they spawn directly in a empty space. the array solution is similar to the grid pattern with items, as grid... but more in logic ... events etc... so u see why i think array is a bit harder to implement, however it might be the best solution, but lots of work on it, since ul have to add the position spawned at+ the offset distance to keep top left right and bottom when u create the new cards.

  • Attention might have some adult content in it... like fictive gambling ... not sure if brakes the rules or not....

    Playing around with C2 making some slots mechanics :) it will probably never get used inside any game or shared as code... who knows...

    3 reel slots

  • Thank you so much for the advice!

    I'll be taking a look at iframe and the 4 languages :)

    No problem, is hard to start on it, but i find it easier learning by doing, that is why i always recomend the freecodecamp.org tutorials, u do examples and u get the gists of it by doing them. is so simple and well made. plus they started doing complex tutorials for fullstacks nowadays, but if u follow their camp tutorials ul get the skill u already have polished and transferred in no time to websites and even "native app coding".

    the beauty of Construct is that helps develop the technical mind needed for coding, u have to have that puzzling solving brain trained a bit, and Construct does just that, in other words, Construct is a precursor to native coding, especially now with the scripting features which is Javascript.

  • Construct as a website not a good idea, since most of texts and images are rendered inside a canvas, therefore the content inside it, can't be indexed by engines, and also the content generated by your construct app/website it doesn't stay there, it's only generated when u turn on or load the app/visit the website so the crawling of robots doesn't happen when search engines wants to index your pages.

    And for a website and SEO purpose/visibility on certain keywords, and content that is a must to have, always visible content, pages, images, etc.

    If you want to build websites,i recommend learning this 4 languages, HTML5, CSS or CSS3, Javascript & Php.

    Php nowadays is not really needed unless u want to do your own backend stuff to server etc... but if u just want to be able to install a wordpress environment and code stuff in it ... those 4 programming languages, or scripting languages should get u started. (if you get to understand javascript you don't really need php, you can work around php features with JS, but is good to have php skills)

    And the beauty of this 4 languages? all u need is notepad, (but i do recommend visual studio code, it will help you tidy up things faster plus u can do complex stuff with it later on when ul need it).

    There are other complimentary stuff that might help you for more complex features in your websites, like XML, Json file structuring etc... but those u will learn them by learning the 1st 4.

  • a good starting point, u begin understanding by doing... but if you mean coding in Construct just look up tutorials on the forum here or on youtube i guess ... if you mean coding in general... to use with construct you will need some sense of javascript and html5 so u understand how things work.