saiyadjin's Recent Forum Activity

  • i was using containers as an explanation for how simultaneous objects should be created in general, not for your example. trust me, containers are GREAT, and they lower the amount of coding. also, when it comes to your example, i don't see the problem. random 1-3, have a var which defines what is 1,2,3, spawn depending on the number. also i was talking about design in general.

    that's not true. during my time of development with c# / c++ i've noticed a lot of things that don't work as expected and need workaround because computers calculate them differently. the same is with this wait thing. you either accept it, or leave it. you will see much more trouble with unity / ue4 / any engine. but it all depends how masochistic you are

    to work your ass off on something. and in the end it all comes down to learning how computers work, how interpreters work, how compilers work, to just fix that ONE bug.

    of course it's not impossible that something relies on something else. but you used "on created" that was connected to another "on created" that was calling a function that does something. you can't do that in 1 tick since you've got a chaining of events. that's why wait (0) stops the chain before calling function for 1 sec so that the objects are completed and then continues from there to get the right values and print them out.

    i'm pretty sure you don't know what happens, and how c2 engine works.

  • funny... people go into ambitious projects expecting miracles to happen, and when they get dissapointed they give up.

    a normal story in game dev. unity, unreal, or anything else.

    you guys gotta think smaller and focus more on quality - > road to victory (or at least some money

  • i see what you're tryin' to do.

    you want to use the object you created at the same moment as it was created (in the same tick).

    so basically what you do is use wait ( 0 ) to go to next tick and continue where the it left off (at that function).

    by default that is the expected behaviour - suggesting that your desing is bad. and probably top level won't be removed any time soon, but if you design your game good it's not even needed. also if you're aiming for the instant spawning of more elements that need to be "stuck together" and you want to do that in one tick - use containers. that's what they're used for. also "on created" is used for defining start state of an created object. but only after one tick is done your object gets UID, therefore you never had any output without wait(0).

    also, if you aim 60+ fps, have in mind that 1 tick is 0.016s (1/60)s which is really fast, and if you pick your objects in next ticks that won't look / work wierd. i know it takes some time to design the game correctly, but it works good.

    also what newt told you - do an action and if you want to set up some basic object items do it on created, otherwise use wait for some behaviours/events in your game that need to happen after some time /at some defined moment. instantly picking item that you created won't do much since that tick you're in has to PASS for object to really appear there.

  • yep, make a 3D game with 2D game makin' software. GL with that one bro. (without q3d)

  • i don't see why anyone would use wait(0) since it calls the wait function not to wait. but i've had a couple of good wait usages and i find it pretty usefull.

    also i don't see what is your "top level design" problem? if you are thinkin' on gui/UI i don't see how removing that would solve your problems

  • same amount? you just have to render them in 30° manner <.< and set your collision blocks differently a bit.

  • it's a game for learning programming. in my opinion.

    c2 is the only game makin' tool for html+js with exports to everything.

  • too many questions, too many answers.

    oh yeah, bought it like 5mins ago Ashley

    yeeeeeeey!

  • i agree completely. people whine too much and learn/work too little. it's a time consuming job, but once done right - gg

  • Stuff like units pushing out of object, to be used in games like rts or hack and slash etc.

    • what if you use something like Spring RTS engine uses? each unit has it's own thread and a bit of time (yes it's really cpu dependant, but still around 1000 units runs pretty well, maybe even more, since i've done some games in spring). (i know spring RTS uses lua for scripting but.. )
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • why not split your stuff into more event sheets? having only one makes it hard to... organize

  • Danwood - functions are just a definition of some work - the only thing they affect is memory usage by the size of them (example 1 function ~ 100bytes or more - depending on how big it is) - once they get used it could affect performance, but if you never use that function it only uses your memory waiting to be called. also depending on what is in that function you can have normal or horrible performance. functions should be used to do EXACTLY 1 job!

    example - "EnemyHealthCalculation" - enemy.hp = enemy.hp - someothervar.damage   
                                       - set enemy hpbar to some width 
                    - if hp <0  enemy destroy[/code:v9p1yxs3]
    
    and so on...
    
    global variables are just a memory place that is used across the application - (therefore word "global") you can access it from any sheet. they just use memory and do nothing. 
    and groups... groups are run all the time, and events in them are run each tick / unless the group is disabled, or if that group contains functions. 
    functions are run "on function 'nameoffunction' ", non depending if they are in group or not. but group is just used to make your code cleaner - you put similar stuff in one group and close it when you don't use it
saiyadjin's avatar

saiyadjin

Member since 19 Jul, 2014

Twitter
saiyadjin has 2 followers

Trophy Case

  • 10-Year Club
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Coach One of your tutorials has over 1,000 readers
  • RTFM Read the fabulous manual
  • Email Verified

Progress

16/44
How to earn trophies