naelian's Recent Forum Activity

  • It's perhaps a little bit more difficult ... do you really want to add coins every 10 secs or add for example 1 coin for 1 house 10 seconds after "this" house have been built and then 10 seconds after etc ... ?

    In this last case seems the better way is to use instance variables for objet "house" and "flat" and use this instance variables as timers for each element built ...

    I saw a recent post about someone requesting help to make ennemy fire X seconds after "spawn" and not all at the same time and seems someone give him a good commented answer ... 10 seconds i'm searching ;-p

    Found ! answer comes from "R0J0hound"

    Consider rhouse and rflat as sprite objects ... (in fact here "rhouse=realhouse") you have many instances of rhouse built and many instances of rflat too ... each objet have a instance variable called "timer" set to 10 by default (10 seconds) .... also a global variable "coins" to count "coins" ;-p

    on every tick

    --- For each rhouse

    -------- rhouse : timer > 0

    ----------- rhouse : Subtract dt from timer

    -------- rhouse : timer <= 0

    ------------ add 1 to coins

    -------------rhouse : Set timer to 10

    --- For each rflat

    -------- rflat : timer > 0

    ----------- rflat : Subtract dt from timer

    -------- rflat : timer <= 0

    ------------ add 10 to coin

    -------------rflat : Set timer to 10

    and so on for each type of built element ...

    C2 is very powerful ! ... you can also create a instance variable to manage delay after which a element begin to get old and make earn less coin or will be destroyed !

    But perhaps the more interesting feature is that rhouse timer and rflat timer can to set to different values ...

    -------------

    But if you only wanted a simple 10 seconds timer for all elements managed with the same is simply

    --- Every 10 seconds

    ------- system : add houses + (flats*10) to coins

    (where houses flats and coins are global variables)

    simply add "+ (numberofnewconstructtype * newconstructtypegivehowmanycoineach10)" for each type of construct you will have to this formula

    -------------

    Don't be afraid by number of events spend to release the heart of your game ... because this part will make your game interesting or not .... your don't have to repeat "on every tick" or "on every 10 seconds" each time spending 1 event for nothing, try grouping events using the same condition.

    Good sim city like project ! ;-p

    ENjoy !

  • Yes thanks "everybody" sorry i'm a lout ! ... i'm really confused if someone put himself into trouble when wanted to help me ... it was inappropriate but done in "good spirit" (closed).

  • It can probably be done using a "advanced" lerp function depending if you want a regular increase or not ... using lerp the problem is the third parameter and math is my nemesis so ... i let "expert" give you a more complete answer ! ... it can perhaps be done using a "sin" too

    A very interesting post (not as mine ;-p) about this kind of effects

    interpolation

    thanks for this very interesting post !

    Perhaps something more simple ... if you add dt to a variable every tick, it adds 1 to this variable every second so consider "x" = "targetvalue-value" must be reach in 6 seconds perhaps :

    every tick :

    value = value + dt * (x/6) ?

  • I think you can consider after a week there is perhaps a problem ... i don't know average waiting time before approval ... when you will receive a email saying you that your game or update is approved ... your new game or release is "up" ;-p

  • Thanks ludei and sorry again to ask this cocoonjs question here ... perhaps i will ask now a few more questions about ios/cocoonjs on ludei forum !

    ... thanks to all men that wanted to help me too ... <img src="smileys/smiley18.gif" border="0" align="middle" />

  • yeti Kart Racer, of course mister YKR ! ;-p ... i just make this answer because many players speaking about mouse control ask for full control features (such as center mouse in window or/and move it by code to avoid that the mouse cursor leave the gaming area) ... here the mouse control is very limited and only in "game area" window and so ...

    ... to control the mouse cursor display on all the screen area you must put your game in fullscreen mode ...

    For old players like me playing "in window mode" and doing others tasks when playing it's a heretic behaviour ! ;-p ... a game must put you in another world and make you forget you are playing on a computer/browser Grrrr !

    ;-p

  • Yes but notice if doing so that this cursor is not display only if the mouse stay in the window project area .... so if going "out" the cursor is display again and disappear if going again "in" project area ... no way to change this last behaviour in C2.

  • Sure Ashley so many things to do ! ;-p ... please users i need your experiment feedback in prioriry about appmobi ... no need to make Ashley spend is precious time in this post but if someone can give me a quick and dirty tutorial explaining the appMobi distributed webapp (.zip) publishing and use and differences with test mode if so ? ;-p

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I hope so ... i don't have android device and i don't have mac ... so i'm waiting for the cocoonjs launcher in appstore to test it ...

    edit (good news Ashley ;-p)

  • Sorry men i follow a recent subject speaking about appmobi/ios and there is some things i don't understand as i'm a novice in appMobi export and use.

    Export C2 project to appMobi (XDK) .... ok if using "Browser" mode ... using direct canvas and it's always black screen with all projects i have tested ... ok it's experimental but i never see something working even a simple project ! is this feature broken in last C2 releases ?

    AppMobi => Testing in local mode ... ok good result using iphone "App lab" (from appMobi)... my test project scale perfectly to iphone screen covering fullscreen (except battery/time bar) so the result is perhaps even "better" than the HTML5 C2 export.

    AppMobi => export to distributed webapp + dropbox publishing ... here i'm really confused ... some are speaking about launching "App lab" but as it's a distributed project seems it's created to be launched via common "index.html" url in safari/iphone ? ...

    The result is not good, project scale to screen but "a black bar" appear below the battery/time bar cutting the bottom part of the screen !

    So i think i miss something ... if someone can give me some tips it's really help me.

  • Well, it's not really a direct C2 post but as the future of C2 on mobile seems more and more link to "cocoonjs" i think this subject can be publish here.

    I have no doubt than cocoonjs have a future on Android mobile ... but on ios ... seems the cocoonjs launcher is waiting for Apple approuval to go on appstore since several weeks now and the only "answer" to install actually cocoonjs on ios is to "simply" buy an mac ! ;-p ... sure i will do this to build my free ios app !!!

    Well this story remind me the forgotten MobiUs appMobi browser (remove from appstore without more explanation) ... the most strange perhaps is the awkward silence of forums about this story ($/?/? ?) ;-) ...

    I simply hope that cocoonjs don't follow the same way ... but perhaps it's time to have a real answer about this subject ...

  • Seems perfect ... it give just enough details about the game ... ok it's a kart race with yeti ... if you have to repeat this name 10 times speaking about it you can always use a very short project alias name such as "YKR".

naelian's avatar

naelian

Member since 21 Apr, 2012

None one is following naelian yet!

Trophy Case

  • 12-Year Club
  • Coach One of your tutorials has over 1,000 readers
  • Email Verified

Progress

14/44
How to earn trophies