arontwose's Recent Forum Activity

  • Ok not checked out tulamide's version yet but I had a go as I like these type of challenges.

    The code is broken up into functions which I hoping will make it easier to understand. The code that creates the hex grid can be changed to create any number of rings by changing the hex_ringTOTAL var.

    The code for the shuffle only works correctly for hex circle grid with 19 tiles. The shuffle works by creating a table of data.. which after re-reading your post may beyond your requirements. On the upside you can shuffle the board 19 times and a tile will never appear in the same place twice.

    Its pretty compact at 46 events and the hex draw is only 16 events anyhows hopefully someone else may find it useful reading this topic

    Cap file Link:

    dropbox.com/s/c2894cf0jn7vkbf/hex_grid.capx

    Cheers

  • I'm not 100% sure on how well it work performance wise, as I feel tulamide's idea would be the best in the long run, but you could use multiple layers.

    Separate layers for exterior, interior, npc's and player... when the player moves inside you hide the exterior layer and show the interior.

    You would probably need some kind of reference/spawn point to re-position the player during the transition.

    Then use a variable "location" for the npc's that could be checked for when they are outside or in the inn to enable/disable there visibility.

    Just a thought

  • Arima

    Windows 7 Pro 64bit - Service Pack 1 and aero theme, double checked by selecting a different areo theme and got the same results.

  • Just figured out it is when you have multiple monitors, if both Media Player and Construct 2 are on the same monitor everything works fine.

    If I drag Media Player over to my other monitor I lose 20fps when testing.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Also I have just found that I get the same drop in fps using Chrome when a steam chat window flashes with a new message. As soon as I stop the chat window flashing the fps jumps back up to 60.

    Again Firefox and IE are fine.

  • When I play music in either Media Player or VLC, the fps will drop to between 40-45 when testing in Chrome, if I pause or stop the music the fps will jump back up to 60.

    Firefox and IE aren't affected, and I don't have any extensions added to Chrome.

    Just thought I would mention it just in-case anyone else had come across this.

  • zenox98

    Originally the missiles did use the Bullet behavior however the bug was still present. I changed the code to use Move Forward to ensure it wasn't related to the Bullet Behavior.

    I didn't come across any problems with the fps, during the game there are only a maximum of 20-25 enemies and 40-50 missiles at peak times also each missile has a short 5 second life span, so nothing close to the test files I uploaded.

    I've only been using Construct 2 for 4 weeks so still not 100% sure what to expect in regards to Construct 2 speed capabilities and which routines are quickest. Now that I am a little closer to understanding what is causing the errors I'll probably revert back to using the Bullet Behavior.

    ramones

    That is an interesting result as I felt there had to be a double call somewhere. As I mentioned above the bug was present when I had the missiles controlled by the Bullet Behavior which is still odd.

    I guess there could have been a problem during the For Each missile loop as well, however I doubt I would have spotted it as it was only used to control the turning and lifetime.

    Cheers all

    I hoping that in the short term if I use a single event sheet for the game that will cure the problem.

  • zenox98

    Glad that you can confirm the behavior.

    This being my first project in Construct 2 and still learning the setup and calling functions etc, I went through rewrote, shuffled events so many times to ensure it wasn't my code.

    Naturally I only used one event sheet when I started bug testing, so I did feel I was starting to lose the plot when I couldn't reproduce the bug.

  • Link to .cap file

    Here is a more compact file...

    dropbox.com/s/mq2a14cm54ewhmi/bug_OnParticleCreation_Compact.capx

    While I was reducing the code down the bug went away when everything was on one event sheet. I thought that perhaps the bug was caused by calling the explosion function from another event sheet...

    However it seems simply including an empty event sheet makes the bug appear

    • > If I include the empty event sheet the bug appears
    • > If I remove the include to the event sheet the bug disappears

    This has left me very puzzled

    Browser Effected:

    Firefox: yes

    Chrome: yes

  • Link to .capx file (required!):

    dropbox.com/s/bz6t7dotl65jtgq/bug_OnParticleCreation.capx

    Steps to reproduce:

    Fly the ship around for approx 20-30 seconds and you will see that some missiles move faster than others

    Trigger:

    Events Sheet: EvadeMain

    Group: Main - Collisions Section

    When the particle explosion is created via a function some missiles end up moving faster than they should

    When the particle explosion is created directly in the collision code the bug isn't present

    Observed result:

    Odd missiles move at double speed

    Expected result:

    All missiles should move at the same speed

    Browsers affected:

    Chrome: yes

    Firefox: yes

    Operating system & service pack:

    Windows 7 Professional

    Construct 2 version:

    Release 139 (64-bit/Steam)

    Notes:

    Although this test uses lots of spawned enemies and missiles to ensure the bug shows up, it also appeared during level testing when I had only 10 or so enemies and perhaps 20-30 missiles.

    The bug was also present in other tests when the missiles used the Bullet Behavior / Move Forward command / direct Sin,Cos calculations.

    Using some quick calculations on other tests I found the bugged missiles moved at exactly double the speed they are set to.

    Please forgive the slightly larger code, I have spent five days tracking down this bug, from dissecting my game to creating small tests. In the end I started building my game from ground up slowing adding pieces until finally the bug appeared again.

    I will try and create a more compact test later next week

    Cheers

arontwose's avatar

arontwose

Member since 4 Sep, 2013

Twitter
arontwose has 1 followers

Trophy Case

  • 11-Year Club
  • Email Verified

Progress

12/44
How to earn trophies