vicplay's Recent Forum Activity

  • 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

  • True true, but you could ofc just have it invisible by default, and that after some ping pong like events, the players gets activated and is brought into play ?

    Construct 2 games often have a base object, on which another sprite is pinned with player animations.

    If the base gets synced, you could simply not create the extra objects.

    Well this is a good solution (At least for simple games). But I hope that in the future we get an update to make this more practical and safe.

    Always good to discuss with people that also understand MP btw

    Thanks for taking time to reply to this, lennaert!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • "Host sees the 0 ... and does not create the needed objects."

    This can't be done. Sync Object is automatic, it doesn't have an option to create or don't create objects.

    The only thing you can do is don't create the object that represents the peer on the host side but all the existent synced objects on the host side will be created on the peer side automatically.

    Example:

    Synced objects:

    • player
    • bullet

    On peer connected, send message, check playing

    Peer receives messages, and replies: 0

    Host sees the 0 ... and does not create this peer player object

    Every other synced object that already exists on host side (player object associated with the host and bullets) will be automatically created on the peer side regardless of if check playing was 0 or 1. (and this can't be disabled during runtime).

    *Bullets spawning on the lobby!*

  • I meant the connection between the host and the peer wanting to know the latency.

    To get the latency, you would actually have to transmit some data back and forth resembling the game data in order to get a decent estimate about latency between the peer wanting to know the latency and the host hosting the game.

    To overcome the obstacle of on which layout is what ... simply add some checks for on which layout it resides. There is an expression LayoutName, which returns the current layout name.

    LayoutName <> "lobby" should prevent it from checking while it is in the lobby

    I see... but the problem is: Sync Object is a setting that (as far as I know) can't be disabled during runtime. Once it is set it will automatically start to create objects everytime the player joins any room (Sync Object is usualy set before connecting to the signaling server and persists forever while the game runs) . If we had an action like Desync object to disable it when needed it would be possible to use your method.

    We could think of executing the Sync Object action only when the layoutName == "game" but (as I said) it will persist during runtime even if the player leaves the room, so if the player tries to check latency after (in layout "lobby") the Sync Object would be previously enabled, causing the unwanted behavior of creating objects.

    Do you know any way to disable the Sync Object after it was executed?

  • heh ... with associated objects, when you leave .. your objects get destroyed in those rooms.

    but euhm, This latency ... isn't this rather the host latency ? and the signalling server would never be able to predict this seeing as its location is not yours ?

    Your method of workaround actually sounds decent, seeing as you would get the latency between you and the host of each room.

    Downside is that during this action you would effect each games host and peers their performance for a few seconds as your stuff gets created and destroyed.

    The main problem of the Sync Object while using this method of workaround is that the peer may not be in the same layout as the actual game layout, this usualy cause unexpected bugs when the multiplayer engine tries to sync objects for players in different layouts. (e.g. host is playing a match in the layout "game" and the peer is checking the latency in the layout "lobby", the engine will try to sync objects and associate objects in the wrong layout). Also this method can't check latency of full rooms and locked rooms because you can't join those rooms.

    This expression should return the latency between the host (of each room) and the peer that calls the expression and not the latency between host and signaling server.

    • Player calls request room list
    • On room list triggers
    • A For loop feeds an array with listroomname, listroompeercount, listroommaxpeercount, listroomstatus and listroomlatency (For each loopindex)
    • When this multiplayer.listroomlatency(loopindex) is called a generic message should be sent to the signaling server,
    • signaling server should send it to the target host (current index),
    • target host send it back to the signaling server
    • signaling server send it back to the caller of the expression containing the average time (in ms) that the message took to reach the host and return.
  • Hello!

    Multiplayer Plugin is really powerful and easy to use but I think there is an expression that would be extremely useful. Something like multiplayer.listroomlatency(index) which would return the average latency of each room (by index) after On Room List.

    This would be extremely useful to create a quick match finder that picks the lowest latency or even a server list (using the form object List) ordering rooms by latency.

    I know there is a workaround to implement this by joining every available room, storing latency inside an array, leaving the room and then manipulate the array but this approach can cause problems with the Sync Object since it automatically creates objects for each peer that joins the room.

    \o/

  • [LOG]

    Online Team Deathmatch test recorded 04-20-2015

    OBS.: This scenario is not an official map of the game.

    ____________________________________________________________________________________

    Inspirations:

    • Armored Core
    • Hawken
    • Counter Strike

    About the Game:

    • Game Genre: Top-Down Shooter Online Multiplayer
    • Game Theme: Futuristic
    • Playable Modes:

    Single Player Campaign:

    - Play solo missions to unlock new tank parts.

    Cooperative PvE:

    - Team up with other players to complete the hardest missions and unlock special tank parts.

    PvP:

    - Show your combat skills by fighting other players in a variety of game modes like Team Deathmatch, Conquest, Capture the Flag and Search and Destroy.

    • Platform: Windows

    Game features:

    • Fully customizable tanks with lots of unique weapons and functionalities.
    • Achievments system: Show to the world your achievments by customizing your Pilot Emblem.
    • Squad system: Join an existing squad or create your own squad to participate in Squad Battles
    • Level system: Level up your tank parts to increase performance, resistance and firepower.
    • Exploration Mode: Explore the galaxy to find secret missions... and secret rewards.

    Language: English and Portuguese (Brazil)

    Development started: 03-21-2015

    I will be posting news about the development here every week!

    SHARE YOUR OPINIONS, ASK ME ANITHING

  • Ashley thank you, I had the latest version of my graphics drivers but it seems that this latest version was causing the problem. I've installed a newer version this week and now everything works fine.

    Sorry for not sharing the .capx. This problem was happening only on this layout of this project in particular. I could not reproduce the bug on another project and it's obviously not good to share the original project for anyone to see.

    Thank you!

  • [BUMP]

  • Problem Description

    • I have a layout with several sprites and all of them are set to "Normal" blend mode, some of them have the Tint webgl effect and all of them are in the same layer,

    When I set the "Preview Effects" to "Yes" some of the sprites just get invisible with no reason.

    -This problem started with r200

    • Tried to reinstall C2 but the problem persists
    • My PC: Amd FX8150, Asus GTX 550TI 1GB (Latest drivers), 8GB 1333mhz RAM, Windows 7 64bits and running the 64bits version of C2.

    I've recorded this video to show what is happening:

    Operating System and Service Pack

    Windows 7 64 bits Service Pack 1

    Construct 2 Version ID

    r200

vicplay's avatar

vicplay

Member since 24 Apr, 2013

None one is following vicplay yet!

Trophy Case

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

Progress

15/44
How to earn trophies