vicplay's Recent Forum Activity

  • +1 would also like to know if it is possible

  • I figured out that the game is failing to download resources when the url is https.

    Back in Oct 22 it was crashing, now it is triggering the Browser plugin "is Downloading Update" forever

  • On the other hand, calling functions to modify instances is like nightmare fuel.

    Not being able to modify instances with reusable code is pretty much being left with limited useless functions, sadly.

    Any other professional engine let you instantiate and modify instances in the same tick at any point of the code as long as you call them after instantiating. That`s why it is a bad design of C2. For me it is a bug because that`s not how functions should work but it seems that it is just a terrible limitation of the engine

  • Are your C2 projects on a HTTPS url?

    Here I have this problem only when the game is HTTPS

    If it is HTTP it works just fine!

  • Actually they don't exist - fully. You can not pick, except by UID, until the next top level event after an object is created. There are countless threads on this - it is just part of the design.

    With functions not even if you run the function in a separated "top level event" it will not work, you will have to wait until next frame. Without functions it works. Again... either a bug or a bad design

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Nevermind you're doing something weird.

    Objects don't really exist till the end of their event.

    I disagree (Run my Test3). Without functions you can freely modify a created object right after "Create Object" and everything will work just fine.

    If you have the SAME events inside a function it has the strange behavior of changing instance variables just inside the function context for that tick.

    Functions are useless if you have to wait 1 tick to access values modified by them.

    The problem extends not only for objects created in the same tick. If you have a simple function that changes an instance variable value of an existing object, log the new value inside the function and then log the value AFTER running the function you will see that the value is logged correctly ONLY inside the function. The log AFTER the function was called will log the old value until the next frame.

    This is either a bug or a terrible design

  • You can do everything in the same tick without functions and can't with functions. Objects DO exist at the time they are created.

  • Problem Description

    You can`t compare instance variables of objects that has been set inside functions with the oficial Function plugin. Let`s say you create a function called SET that sets an instance variable value of a sprite to 1 (And logs it`s value)

    Then you create a function called GET that only logs the value of the instance variable. If you run SET and then GET after (Inside an On Start of Layout event) the SET will set the value and correctly log the value. The GET function that runs after will fail to log the value (Will log the old value stored in that variable)

    That being said... you can`t pick objects based on their instance variables unless you wait for the next frame. Waiting for the next frame is a terrible workaround. I`m uploading a capx with 3 tests. Only the test without any functions works as expected.

    Attach a Capx

    https://www.dropbox.com/s/9n1cruqrutv1g ... .capx?dl=0

    Description of Capx

    The capx has 3 tests where a "Card" object and a "CardImage" object are created on start of layout. CardImage stores inside itself the UID of the Card created. After that, the scale of both Card and CardImage are changed to 0.1. Test1 has two functions (SpawnCard and SetScale), Test2 has one function (SetScale) and the card is spawned "hard-coded" inside an On Start of Layout event. The Test3 is made without any function (So it does not support parameters without ugly go horse workarounds) but it works by successfully picking the right CardImage and resizing it. I`m not using containers for this because what I need is more complex and containers are too limited to this (Because they can only allow one instance of each object per Container Group)

    Steps to Reproduce Bug

    • Run the tests inside the capx

    Observed Result

    What happens?

    When using functions, events do not recognize the value of instance variables and fail to pick objects to change their scale. The SetScale functions just works correctly one frame after the objects Card and CardImage were created

    Expected Result

    What do you expect to happen?

    To work just like the Test3 without functions

    Affected Browsers

    • Chrome: (YES)
    • FireFox: (YES)
    • Internet Explorer: (NOT TESTED)

    Operating System and Service Pack

    Windows 10

    Construct 2 Version ID

    Construct 2 r244 64bits

  • Awesome plugin, very powerful.

    Just an observation: The expressions "RGBA At" (When called multiple times in the same frame update) causes a considerable impact on performance when playing the game with Firefox.

    Google Chrome seems to handle the same events pretty well.

    Thanks for sharing this, I love it!

  • Hello there!

    Your isometric behavior is awesome but when the game have big layouts with lots of objects the game gets really slow.

    I've tested with a layout that had about 1000 objects with your iso and the preview was running at ~5 fps

    (With the behavior disabled it was running at 60fps)

    Then I've made some changes on the runtime.js of the behavior to ignore all objects outside of the canvas completely and creates an array of references to the remaining objects index numbers before looping over and over again.

    Now running at 60fps with the same amount of objects without messing the sorting.

    	behinstProto.tick = function ()
    	{
    		//alert(window.rojoList.length);
    		var refList=[];
    		var isoList = this.type.isoList;
    		if(this === isoList[0])
    		{	
    			for (a=0; a < isoList.length;a++)
    			{
    				var isoA = isoList[a];
    				if(this.IsInstOnScreen(isoA.inst))
    				{
    					refList.push(a);
    				}
    				else
    				{
    					isoList[a].behind.length=0;
    				}
    			}
    		}
    
    		if (this === isoList[0] && (this.type.state.enabled || this.type.state.sortOnce))  // only run once
    		{
    			this.type.state.sortOnce = false;
    			var isoA, isoB, a, b, c=0;
    			
    			// updade positions from isometric positions
    			for (a=0; a<refList.length; a++)
    			{
    				isoA = isoList[refList[a]];
    				//isoA.updatePosFromIso();
    				isoA.inst.update_bbox();
    				isoA.visited=false;
    			}
    
    			// build dependency graph
    			for (a=0; a<refList.length; a++)
    			{
    				isoA = isoList[refList[a]];
    				
    				// culling
    				if (!isoA.visited && !isoA.inst.visible && !this.IsInstOnScreen(isoA.inst))
    				{
    					isoA.visited=true;
    					continue;
    				}
    				
    			    for (b=0; b<refList.length; b++)
    				{
    					isoB = isoList[refList[b]];
    					
    					// culling
    					/*if (!isoB.visited && !isoB.inst.visible && !this.IsInstOnScreen(isoB.inst))
    					{
    						isoB.visited=true;
    						continue;
    					}*/
    						
    					if ( isoA != isoB 
    						&& isoA.inst.bbox.intersects_rect(isoB.inst.bbox)  //bounding box check
    						&& isoA.ix-isoA.sx/2 < isoB.ix+isoB.sx/2 -0.001
    						&& isoA.iy-isoA.sy/2 < isoB.iy+isoB.sy/2 -0.001
    						&& isoA.iz-isoA.sz/2 < isoB.iz+isoB.sz/2 -0.001)
    						{
    							isoA.behind.push(isoB);
    							c++;
    						}
    				}
    
    			}
    			
    			// topo sort
    			for (a=0; a<refList.length; a++)
    				isoList[refList[a]].visitNode();
    		}
    	};
    [/code:1s0bhs7i]
    
    \o/
  • I'm having a similar issue. I'm developing a project with a PC with Windows 10. Every text have the correct size both inside C2 and in any browser while running with Windows 10 but if I open this same project with a PC with Windows 7 all the texts get bigger, ruining the alignment of (for example) the ranking table.

  • Sadly this turns listroompeercount, listroommaxpeercount and listroompeerstate useless since we would have to create rooms with no peer limit so anyone can join merely to test ping. We would have to analyze all these information manually (and also implement the room locking system through the event sheet).

    This listroomlatency to get average latency before joining rooms would save us from a lot of rework and I think it can be added to the mp plugin. It would be simply a join room which ignores peer limits, locked state, synced objects and does not fires any peer related trigger on the host side. It would be simply a "stealth join room" :'D

vicplay's avatar

vicplay

Member since 24 Apr, 2013

None one is following vicplay yet!

Trophy Case

  • 11-Year Club
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

14/44
How to earn trophies