Chadori's Forum Posts

  • Well, something that my professor said while I was coding "C" at class made me think I might be doing many bad coding habits in Construct 2.

    I wanted to know whether these bad habits of mine do significant impact on my game's performance.

    My game is a rpg type of game & any performance gain means a lot to me since the mechanics of the game is quite big, if you are wondering why I bothered to ask this.

    1)One thing that my professor told me about my bad habits is that I use 2 or more loops when I can just make a nested loop out of all of those.

    For example (In C2's event system):

    My way:

    *For Each AI_Characters:

    , ------> AI Behaviors....

    *For Each AI_Characters:

    , -------> AI Animations...

    Professor's Way:

    *For Each AI_Characters:

    , --------> AI Behaviors

    , ---------> AI Animations

    I do that style because it looks neat on the eventsheet, also that the events are so long that I need to organize & especially that I am grouping it to avoid confusion.

    So does separating conditions doubles the cpu computation & affect performance?

    2) Also another thing, it is about the Else... In C2, I use the "invert condition" more times the "else condition" since I am not sure if the "else" will always work.

    So in class, I did the same & my professor said that it will slow down the CPU...

    At that moment, I thought about my game and concluded my game is wasting too much CPU... since I was using "Invert condition" more times than the "else condition".

    So does it still matter in C2? Does it significantly affect performance?

    My way:

    *If Variable = 1

    , move()

    *If Variable is not = 1

    , stop()

    Professor's Way:

    *If Variable = 1

    , move()

    *Else

    , stop

    Thanks for giving time answering my questions.

  • I am not a lawyer, so what I am about to say may not be entirely accurate or correct.

    As far as I know, doing that without permission is risky. Especially that you are actually naming the actual game.

    In this case, it will now depend on the owner to sue your game or not, if you're caught.

    But there is a way to do that without mentioning a game.

    For example, instead of saying "This game is like Tetris Mania", you can say it in this way "This is a Tetris Game." or "This is like your typical Typical Tetris Game.".

    I recommend you to never mention an actual game name in your game in comparison.

  • lucid - I am not sure yet since I lack manpower... But I might change my mind though especially since the reward is great.

  • That's weird, I have been using C2 for 3 1/2 years but never encountered this.

  • Since my first day here in C2, mobile games were my main focus. I had many failed games because I didn't know the limits of the mobile device, and other C2's good practices. I would like to share you my list of do's.

    *Always make black boxes for every hero in adding behaviors and collisions. Don't use the sprite of the image of the character for behaviors and collisions.

    *Don't use sprites for terrains. As much as possible use Tiled backgrounds for layout background and Tilemap for terrains.

    *Make sure your game terrains and background are tile based. Use the tiled program.

    *Don't use the C2's frame by frame animation for characters with many animations and combinations.

    Like RPG characters, the parts should be separated and connected or removed rather than frames.

    I suggest using "SPRITER with scml plugin".

    *As much as possible for making solid ground. Don't use tilemap's or sprite's individual collision for solid behavior since it will not only risk performance, it'll also make seams between sprites and tilemaps. (A must avoid limitation of mobile device) Use tiled background with 2x2 size with color and make the the tiled background "50 % opacity" so that you can see it. Use the tiled background for solid behavior or jumpthru behavior.

    Hope that gave you some tips.

  • CDogs1964

    I'm not sure if I remember it well.

    On banner ad preloaded - That means the ad is downloaded from the internet.

    On banner ad loaded - That means the ad is placed on the layout. (In a Once Trigger)

    Loaded banner ad - Same with "On banner ad loaded" but it is not a trigger. (Runs every tick)

    Let me guess, it is Cordova Admob by cranberrygame right? This plugin of his unfortunately doesn't have any description and makes it harder to understand.

    BTW if you are making for mobile, this plugin doesn't work properly with IntelXDK anymore.

    I suggest you use Josek5494 's plugins:

    Admob Pro:

    Paid version: ($20.00)

    *100% ad income is yours..

    Free version:

    *98% ad income is yours

    *2% ad income for the developer (Liming Xie)

    or you can use:

    Admob Free:

    *100% ad profit is yours.

    -Though, it doesn't have reward video interstital ad feature.

  • Voytek - Sorry for the delay, I didn't expect this to be very complicated especially because of all the loops I used .But fortunately I have completed the sample .capx file of your requested Typo Corrector w/ Analyzer. I used here the Dictionary plugin instead of the Array plugin since it is far complicated in the Array Plugin. So about the comments, I am sorry but I don't have any time left to fill those up since I will be having my exams tomorrow, but I believe you can understand it. But if I have time then maybe I can make it tomorrow.

    Btw, the accuracy is not very great but for games, especially considering performance then I think that will be enough.

    And the tolerance rate is 75%, if the pre-made sentence is 75% similar to the typed one then it will auto-correct.

    Animmaniac - Your algorithm is very good but sadly I didn't find a way to implement that in C2. I think a plugin using your algorithm is better than using C2 events. You made it accurate by pairing 2 chars alternately while mine was by comparing each char index with it's neighboring chars. I think your's makes more sense though since the formula was thought out.

    .Capx Link:

    https://1drv.ms/u/s!AjcW2ueud6qpwlt_a_Ew0XXRm0tR

  • odiusfly - it's not free but it's kind of though.

    Paid $20:

    100% of ad profit goes to you.

    Free:

    98% of ad profit goes to you &

    2% goes to the developer.(not to be confused with the plugin developer)

    But the plugin is free.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Well, I think what you are trying to achieve here is a game that analyzes the user inputs if they have a typo and the input is close to the required text then it will accept it.

    I admit this will be tricky but very achievable.

    But there will be limitations though, a typo of letters will be accepted by typo like forgetting to put "space" between texts will not work, and it is kind of impossible for me to find a workaround for that mistake since we can only analyze a typo, word for word by measuring the percentage of typo. And we will use the expressions tokennat & tokencount for this.

    So, is this what you mean? If you are asking for a .capx file, I'll be glad to make it for you, just say the word. But I think you can do it by yourself using the tokennat and tokencount expressions.

  • blackhornet - The outcome is still the same without the "Obstacle.PickedCount = 0".

    But I do understand what your point is. So you mean that the "Pick by comparison - Obstacle.Signature = 'Active'" is the same as "Obsctacle.Signature = 'Active'", that it doesn't

    run if the condition is false.

    That makes sense since there are 0 instance in the layout that has the Obstacle with Signature = "Active".

    Nice. Thanks, I get it now.

  • lucid - Good thing you already knew about this so that I don't have to make a .capx file reproducing it, it makes it easier for my part. This bug doesn't really affect me at the moment so I'll just wait for the next Spriter Pro Version Release as long as it doesn't take 5 months, by that time I'll have to release my game. Thanks again.

  • Why can't we create object if there is a pick condition:

    Look at the event below:

    Another example, if you have a "pick condition" on a "create object" action even though the picked object doesn't have anything to do with

    the create object. It still avoids object creation.

    Look at the event below:

  • If you are talking about Admob Reward Video Interstitial Ad. Then you can use Josek5494 's plugin:

    Admob Pro:

  • The best contest I've seen yet. And I swear the narrator has a great voice.

  • A simple boolean/variable limiter can make it work. But I'll just stick with number variables and I'll use the touch object instead of the mouse but it still works the same with the mouse object.

    For example:

    Global Number Variable named "ClickCount" .

    *On Touched Object1

    . -----> Add 1 to Global Variable - ClickCount.

    *ClickCount less or equal to 2 & *On Touched - Blow Tile.

    . -----> Call Function ("Blow")