jayderyu's Forum Posts

  • rexrainbow

    I get it. Why not re-use code and plugins

    I still find the remote function calling dreamy

  • Now that's a sweet sweet RexRainbow plugin. Though this division of plugins and dependencies is still annoying... I'm still annoyed...... but I love Function calling plugins... droooooooooooooooool.

    good work

  • I appreciate everyone's input and it's great to get some insight into what is happening under the hood with C2. That was a fantastic bit of information.

    I guess though even with that information the situation doesn't change. Developers should take care and understand that putting 50 different objects that do the same thing, are single image sprites as say a jigsaw puzzle. Are actually working against the rendered.

    Having done some research older devices such as iPhone4(not s) should only have apx 25 draw calls to maintain good performance. I think Ashley should certainly write the blog about draw calls, use of sprite sheets and a guide.

    Ashley once said recently that one of the biggest reasons people have a hard time with mobile game dev; is because of GPU overload. I see this all time. Knowing that C2 treats every different object regardless of spritesheet optimization will still cause a separate draw call is good to know.

    Of course mobile devices of 2013 easily have draw call of around 200+. Also It seems like modern computers have a relative safety around 1000 to 2000. But it seems people want to do 200 calls on older devices.

    I found the discussion fascinating. Thanks. I'll continue to read up if more posts come.

    batching sprites is good. Be smart about batching as an object over multiple 2048x2048 sheet's isn't that good.

    Yes a well written technical blog would be fantastic on the subject and may help relieve the "mobile performance sucks" syndrome.

  • SgtConti

    Custom variable ID of the unit that needs to be shared. Possible based on order of creation and type.

    Also the Host doesn't need to know the selected Unit. The host needs to know the action result and Unit ID... ^^^

  • Hey all. Progress is going forward. I will be working on Part 3 for my Devlog shortly. Although I'm currently debating on how to execute the first MasterHost. The idea of this host is to be a bot to maintain stability by just existing and providing a communal in/out for players. However since MP Plugin doesn't support multi connection I've been thinking of a way around that. Here are my thoughts and input would always be fantastic.

    Instance handler

    MasterHost with logistics to handle each area(a layout) as a form of internal sub room. This will require creating the same type of logic as the signalling room server.

    Pro: A MasterHost can be used to instance large number of players. Similar to how GW2 has zone instances. A MasterHost can be one world instance.

    Con: Extra work to create a sub room system and more custom messages.

    RoomHandler

    This form of MasterHost would require that a host connection would be required per layout or room. This offers the benifit of no additional coding for players going in and out of rooms. no need for extra messaging. however as a room handler each room would be it's own instance and as more players are playing this would bloat up the number of connections.

    Pro: Easier to develop, Ashley would be happier I don't bloat the rooms

    Con: annoying manager backend

    So after that it is safe to assume I will be tackling the multiroom master host rather than just do more prototyping. I will be putting up the first public results in the next few days for everyone to play.

    I was originally going to skip scaling. Primarily because I don't want players to be too small. Also because PathFinder is doesn't scale the speed vertically very well. However I change my mind the other day.

    1. I'm going to limit depth. Unlike some adventure games where you can get very small. Players will only depth down to 75% of the base size. So some depth will be provided for the illusion of depth, but not enough to spoil the graphical looks.

    2. I'm going probably not use PathFinder in the end, but create a regional node traversal. Pathfinder is nice, but I want more speed in path finding. I have a node pathing demo on my website. I'm going to use the principle, but make the nodes areas.

  • lucid

    To which ever is making the Spriter Plugin for C2. I have a request based on technical review over C2 and Open/WebGL.

    I am asking that the entire image object structure be done. After having read recently to Ashley's statement in gagillion zillion download thread. Ashley mentioned that each game object even if using the same visual image is in fact a different image and will result in an additional draw call in WebGL.

    After having done some research I can confirm that the more Objects in the game the more heavier the OpenGL drawing system is tasked in regards to the draw call. Having done some tests I found out that preview C2 tests is that preview never uses an image atlas. I also found that an exported game will use an image atlas. This results that with carefull design that our games can have better performance when exporter.

    Why is this important. because on mobile devices we have very limited number of Draw calls to use. The iPhone should limit to 25apx, iPad 100, of course newer devices probably 150 to 200 and PC I can imagine around 500 or so. But this isn't a request for PC's.

    Complicated Spriter entities can use many different parts. To show that the Basic_Platformer_object has 45 Objects. This means that alone with no other objects on the screen that spriter object is going to use 45 draw calls in Preview and Export.

    If i'm target a mobile device where I have say about 100 draw calls that Spriter object is going to use almost half my entire draw limit if I want to maintain GPU performance.

    If Spriter Plugin could instead use 1 Sprite Object, but instance itself, use frames and animations for the graphics then we could get a Spriter object to reduce the number of draw calls. Of course there is still layering and all of that, but this would offer a much needed performance assistance for mobile devices in C2 games.

  • russpuppy

    Thansk for the fetchapp link. I'll use that myself. At the moment I'm using by devlog site as my store site. More exposure the better. Good fortune. I hope in the long run it pays well enough

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I find that lot's of dev's use 1 object per game button, 1 object per bullet type, 1 object per enemy.... so on etc. In the end they have around 200 objects and at any one time they may have 50 different objects.

    Where as if all the buttons, bullets... small stuff were in 1 Sprite used as an atlas using animations and frames. that would be better.

    As for more robust stuff. Well if you have a player with 5 different animation types and many frames per animation. It might be easier for development reasons to to just have the player have there own entire object.

    I have been enlightd towards mobile development. Even older hardware say an iPhone4 should be limited to 25apx draw calls. So of course if each of your objects on the screen is there own object then your going to hit and pass that fast.

  • TiAm

    That's really interesting and that shouldn't be happening. Ashley mentioned before that a Sprite should be rendered as a whole. Though I have a question. Did that include Z-sorting and layers? I would assume z-sorting and layering would increase draw call in any circumstance.

    All right so I did a simple render test. With unique but stable results. These are done with 1 sprite object. 10 objects are created providing creation allowed. Creation is allowed fps < 30 up to 100 time. The reason I chose this was because of how GPU handles rendering dips and how often and when they become extensive. This doesn't mean a MAX limit.

    1. Performance is better if your UV size or in our case Texture sizes stick to the power of 2(2,4,8,16,32,64,128..)

    2. On Preview (rounding to nearest 500)

    1 Frame displayed on the object. Made it 11,500 after 10 tests.

    Random Frame on object. 6000 after 10 tests.

    3 On export

    1 Frame displayed on object. Didn't test because this is about atlas testing on export.

    Random Frame on object 9500 after 10 tests

    Interestingly enough that on Export the performance increase by %45 where the GPU had less troubles.

    However other factors I found out. When given the unreasonable usage of just constantly creating objects. C2 CPU will become over burden rather quickly. I suspect this has to do with the JS storage object. But it's not important because your not going to have 5000 objects on the screen. but it's interesting to know that C2 CPU usage will hit 100% before the GPU hit's limits.

    So with this information. It might be best to actually create games based on the idea of an Atlas sprite object. Of course these will only count for sprites that live on the same layer.

    My question is now answered. It is best to use Atlases as much as viably possible. So all widgets, small objects should share 1 object. And let robust stuff have there own sprites.

    I appreciate everyone's input. I wouldn't mind Ashley's thoughts on the entire subject to.

  • That seems to be the case. Going to have to do some kind of active performance test. I don't actually have a performance problem as of now. I'm just thinking that if this is the case where the export atlas can get better performance. Then that would have considerable changes in how the game should be structurally designed. Making a large change to fewer atlases later would be a big job. Where as designing around this from the start would save a lot of effort.

    Well time to work on a test

  • R0J0hound

    Thanks that clears a lot up. So I suppose then the part that could use some final clarification.

    " However on export C2 creates texture atlas' of the frames if it can, so then it may take only one call. To be more exact about a draw call, it is only done once per frame in webgl. Everything else is just sending info to webgl to use when the frame is drawn."

    So because C2 creates a texture atlas. Could or does this happen. Can the export receive better performance improvements if the atlas was larger. I'm wondering because would it be better to design a single sprite as an atlas sprite and then use invisible game objects to handle game logic.

    I do get your point. If the sprite breaks the image into more memory blocks then that's more calls. Where as if the sprite were to drawn with more advanced UV coordinates off using a larger memory coordinates could reduce draw calls could improve performance.

  • Fimbul

    In regards to levels. R0j0hound made a plugin that does a good job of saving a Layout's object. While C2 can export a scene to JSON I found the result file to overkill. So using R0j0 plugin you can use C2 as a level edit, run the level, and get the the plugin string export to save to file.

    Aphrodite also has a good solution too. Also if your using Tiles you can use Tiled. The SDK isn't impenatrble. I've used to make a photon multoplayer client.

    Also the SDK allows you to render to game world. So you could render special information like pathing trails if anyone were to write a node based path system. The SDK also let's the dev to implement various Inspector options, values and so on. However, it would be really nice that the SDK let have more GUI control in the editor. Like new windows, rendering options to create say curve based value control. Ways of putting in the editor colour control for editor functionality.

    I'm just arguing on the point that there is a block to making big games. In fact this thread inspired and a the gajillion zillion down load thread inspired me to devlog on my mini multiplayer online game. The link is in my sig. Because let's see if we are really bound. Although you should check out Penelope and Our Darker Purpose,

  • Ashley or anyone who can effectively answer this question.

    There was a discussion not to long ago about cloned objects, rendering he "same" image when they are different memory references. So I wanted to know some more technical question in regards to C2 rendering logic and a single sprite object with multiple instances.

    I admit I could be fuzzy on this. So please bear with me

    At the render time when C2 renders the object. The image is moved to the render pipeline. If there are numerous same instance of the Object then C2/WebGL makes 1 render call based on fill rate. So 1 call draws numerous images on the screen.

    Now what if it's 1 sprite object, but with numerous frames or numerous animations. When rendering the 1 sprite object, but has numerous instances set at different frames; are all the frames image put into the pipe line. If so does WebGL/C2 only make 1 render call still because it's only 1 sprite object even though it is multiple instances set at different frames?

  • Katala

    Well if Functions and Array were simlar primitives in C2 then that would be over all beneficial.

    Instead of Array.ValueAt(0,0,0) or even worse if your using instance arrays

    Compare Array.id = "arrayname" to get a specific array in an SOL to use.

    you can just use

    array[0,0,0] in your expressions. which is the way all programming languages access array data.

    or

    array[0,1,1] = some data

    same with Functions

    instead of

    Function.call("functin name", p0,p1,p2)

    it would be

    functionname(p0, p1, p2)

    In expressions the variable name is in expressions list. This makes using variable names impossible to use if you spell them wrong. The expression won't let you exit unless the var name is correct. Where as Functions require you to use a "string" paramater. So it's possible to use the wrong string name. Also when you change a variable name the change is caries over through the rest of C2. Where as in Function that's not the case. If you change a Function calling name you need to go manually change it everywhere.

    This would also lead to better scoping of functions.

  • I constantly get logged out after apx 20-30minutes