GeorgeZaharia's Recent Forum Activity

  • Object(n).expression lets you pick the nth instance of am object in an expression.

    https://www.construct.net/en/make-games/manuals/construct-3/project-primitives/events/expression

    See the section on object expressions.

    Iirc, this is special in that it can reference the values of an object that isn't currently picked by event conditions.

    There is nothing special about object.anything, as long as object.anything is any expression that returns a number that represents the object instance (n, or iid) you're trying to get at.

    ah ok so it is usable as a identifier of a specific object as long as u know the iid or N custom value u assign it to him. ok that is helpful thanks. also the link u sent doesnt work but this explanation solved my issue. thanks a lot. :D

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi there, long time since i posted around the forums. I searched the forum but couldn't find a result cause i don't know how to call this expression, that is in Construct but never understood what does it do.

    The expression in question is this:

    object(object.anything).x

    the (object.anything) what does it do? identify a certain object? or what is it for?

    im using it as a object identifier of the same type for example:

    i have 5 buttons... all the same sprite just different instances.

    from left to right i assigned a 0 to 4 id to them as i create them in a loop at a start-up to perfectly align them.

    but as u press the button the buttons increase in width to "simulate" it's selected.

    and decrease in width to original width to show that is not selected.

    now i need to calculate the distance from the first to last button in order to perfectly align the object in center based on the gap between those buttons.

    im calculating the distance as distance(button(button.id=0).bboxright,0,button(button.id=4).bboxleft,0)

    this if the expression between the parenthesis is working as im thinking at as a identifier between objects of the same type. then it should give me the exact distance between first and last object. but ...it's short by 20% or so...

    i realize the problem is with me no understanding properly what the (object.anything) expression is for... anyone can explain to me what this thing does? i think i asked before but i forgot was a long time ago 2-4 years ago maybe. Thank you in advanced.

    P.S im looking through the manual to see if i can find it... so far no luck.

    P.P.S i solved my issue another way... but i still don't know what this expression does. If anyone can answer would help a lot.

  • are the sprites on top of each other? it sounds like u are pressing overlapped objects at the same time. the event code should work fine as long as the objects don't overlap. and are different types/names.

    and my all events at the same time u mean the two in the picture im guessing?

    or other events as well? it might be a "touch/mouse" function or just ur cache needing some clearing. try a different browser if above is not the issue or clear cache. sometimes might get buggy if u working for multiple hrs and closing/opening the project a lot of times a day.

    but since ur doing a touch and find missing object, my thinking is u got overlapped objects and the event code u have is missing "identification order" which item should it pick to trigger the even the top or bottom one?

  • Yup, been trying almost the same game engines as you, and more. Have to say C3 has something special. It just clicks with people once they try it. Is the simplicity of it all. The user interface makes sense, is all layered out in a way you don't have to think twice where objects and options are. Compared to unity interface or other engines. The UI learning curve is very short as mimics the old paint interface.

    As features comes, most of what I need is there. I been using it for years now, and had my share points of complaints and disappointments regarding some of the objects and missing features, but being a web based engine has it's limitations, and with time i realized majority of my complaints where a fan Boy perspective and were not realistically pointing towards what i need as tools and features for what im creating.

    The only thing that I'm having a struggle with is the learning curve over multiplayer game systems, however in it's defense it does say in fine print "requires some server side coding knowledge". Which compared to other engines is a breeze. But I'm learning it, so many tutorials from the community and the engine creators online. Wish there were more in depth tutorials covering step by step setting up IAP's and other stuff. And not have to read a e-book about it or a convoluted manual that at the end of it you realize it still didn't completely give you a answer to all of your questions. Luckily that missing information is found online from the awesome community creators that share their dev process, and we learn from one another. The community is somehow like Quora or stackoverflow for C3, which makes it shine.

    Other than that, one missing feature i wish it had, is the browser loading interface to be actively customizable and not by having 2-3 loading screens but to basically hijack the loading bar in beginning and customize the graphics of it and all. Which is a bit hard to do as requires some work around and "dissecting" how the "start screen" happens before your "custom loader layout kicks in".

    And a 3rd wish there was a C# or C++ compiler to convert the js code automatically to C# or C++ that would help massively the future of this engine, as would open the chance to be easily published and ported to Sony Devices such as PlayStation and XboX. There are 3rd parties that manually do it for you, but in the process they loose fine tuning you are doing on ur "game mechanics" and you lose a lot of time and money in the process of going back and forth with them to pin point exactly "the gravity feel" or other stuff you coded in C3.

    Short to be said, some of this problems i have are probably most of the heavy users problems, that are looking to use C3 for creating amazing products to be published literally everywhere.

    Maybe there are solutions to what i said. But after some 5+ years i sort of gotten tired of searching for answers and just focus on what i can achieve with the engine in it's current state. And by simplifying my expectations it just got more natural to use and less frustrating.

    Amazing product, really the go to game engine when something needs to be done fast.

  • WoW the video is amazing, i got lost the entire time in how every little animation is playing on that battle cruiser. Great job. Keep at it.

  • GeorgeZaharia

    i have a technical task what i got to do and what images to use.

    from a big company that doing playable and other ads a lot. and have a vision how it got to look.

    i needed to use spine, but to save size I redone all animations in the construct's timeline, that isn't easy if you are doing skeletal animation of the human body, hard to recreate, add new characters with this animation. it also makes code bigger.

    what I can exclude - box2physics, which took about 500-600 kb.

    all other plugins took 10-20 kb

    But again, as I said, code can be minifying.

    what we need, the same playable export as now, but separated folders for sound and for images. It can help to keep the main, HTML file inside 2mb.

    it is a weird requirement from facebook, 2mb HTML file, but they are monopolists and don't care about users too much, really nothing to do with it

    google requires html5 file with the 1mb size by the way...

    i asked about the size images/plugins cause if the business u working for can let you rescale down the images and lower the resolution of the playable ad, then u might be able to save some file size, as using a 16px grid size images, compared to a 256x one is a whole lot difference in size around ~70% more or less. about spine you could export spritesheets at lower scale size of the character and that could save some file size also not having to use spine plugin which is pretty big.

    when i say lower size images i mean instead of exporting a 1080p playable ad do a 400x200 one instead. or something similar. would have the same quality just small images. really small.

    also i read the playable ads guides and it seems they have a "zip package playable ads" capability that allows up to 5mb and 100 files in that 1 playable ad.. but not sure how that will be exported from C3 since current export for playable ads is just single file html5

    ** note... resizing the images to such a drastic difference might result in quality loss, unless the original files are vector images. but not sure how spine does the rescale export.

    if you find a solution to this let me know would love to know how you achieve it, and maybe a lot of other people around community.

  • hey there guys, i kept looking at this issue with playable ads it seems they have unlocked more than 2mb now

    For Zip Files
    A playable ad in a zip file format is currently supported on all placements on iOS and Android.
    Zip archive should contain an index.html file located at the root, for example:
    
    ./index.html
    Note: Resources may be placed anywhere in the directory structure, as long as they are referenced relative to index.html. For example, the following file:
    ./assets/splash.png
    must be references as:
    <image src="assets/splash.png"/>
    Any html files and JavaScript files in the zip archive should have the same constraints, although FbPlayableAd.onCTAClick() only needs to be called in one place.
    The total size of uploaded files may not exceed 5MB.
    The number of files inside the bundle may not exceed 100.
    The size of index.html file should not exceed 2MB.
    

    it seems they support playable ads zip files that have 5mb and a bundle of maximum of 100 files inside it (but only limits the playable ads being visible on ios and android devices only, that means no desktop playable ads).

    hope it helps here is the link

    specifications for playable ads facebook

    now the issue i see is... how do we export using C3 playable ads as a zip? cause if we export the regular c3 project as html im guessing it won't have the

    FbPlayableAd.onCTAClick()
    

    Ashley is there a way of not having the images as base64 string in current playable ads feature?

    im curious about it myself also, i don't really need the html5 ads i can find works around this, but i think would help the community that rely on this feature to get commissions which would be awesome.

    based on their specification page it seems the playable ads work the same as instant games zip files or direct 1 file with limitations of course but ... having 5 mb file range ... now sort of fixes that 2mb file problem.

    if the playable ad is not using any custom plugin the current export option should export under 2mb files.

    1mrpaul1 can i ask, how many custom plugins are you using in your playable ads? cause a minigame should be doable with just default event sheet and images using C3 if you follow those rules you should get a very small or atleast around 2mb playable ad.

  • 1mrpaul1 here is a quote from instant games FAQ

    instant games FAQ for devs

    as i said in my 1st post, the solution is to have the "loader" be under 1 mb or loading in 5 seconds or less but the content inside can be 200mb that means, you can have a pre-loading screen and then fetch inside it the project u really want to load, from a different hosting location. similar to a iframe or a download manager.

    the simplest solution would be for client version protocol automatic update...

    meaning you upload the same game with version 1.0 loads instant since will be empty.

    and then request the latest version 1.1 and the update will happen on client side without you having to modify the instant facebook game hosted client file.

    hope this all thing makes sense and helps you.

  • > it converts rgb format images to cmyk format colors if the image isn't to complex like shadows etc will look

    cmyk colors scheme has more size

    anyway, the code itself costs more than 3 mb plus 500 kb sounds plus 500 kb images

    I hope you know that you got to see the uncompressed size of the html5 file of the playable ad? there is the problem, construct making big code files

    if to upload the game as zip file, we need different game structure

    And anyway, if to handle the limits, there is just blank screen. Facebook is blocking construct games probably

    facebook shouldn't block construct games, as the game export is html5 not .c3p

    in my test i did export as a playable ad tho not as a facebook game. il test it again and come back to u but it seems u are trying to upload a full game now and not just an advertisement.

    however last time i checked instant games on facebook, they where taking in consideration the zip file size and not the size unpacked. maybe they changed that.

    cause on my 2nd test now i did got a 800kb instant game zip file but unpacked is 2.4mb considering that the c3runtime.js is 1.7mb the rest of the game is around 700kb images and code. im guessing in order to create a very small facebook game now, you need to host everything in ur project externally. that is the only solution i can think of.

    (as for the cmyk profile image yes it is larger, but when u have pngs with transparency u actually save size just try running that image through the image recompressor once exported ul see it works it might be something else and not cmyk but that is how i seen the file profile once imported in photoshop as the original file was RGB color and after conversion turned into cmyk but size difference was around 80% less heavy.)

  • when you export the file, try taking the spritesheet you get from the project and run it once or 2 times through the tinypng dot com software. it converts rgb format images to cmyk format colors if the image isn't to complex like shadows etc will look the same and save u some 40-80% file size on that image.

    that can bring ur project down to the size requirements.

    depending on what you are loading you said an advertisment... i would use a iframe and import the image/advertisement from a outside source. that way your project should not contain nothing inside. but just the event sheet.

    1mrpaul1 i just did a test on my end with a 2mb multiplayer game .. and the exported playable ad for facebook is 500kb there is something weird you are doing on your end.

  • that is basically looking like the core example of C2/C3 photon multiplayer all u need is add custom graphics to it. google search photon construct 3 example. and then tweak it.

  • totally doable yes, C2/C3 can handle all this. they are not that hard, the difficult part is the IAP's the gameplay itself is rather simple but you need a insane amount of graphic work and animations, and a same insane amount of coding.

    but overall is doable.

GeorgeZaharia's avatar

GeorgeZaharia

Member since 30 Jun, 2014

Twitter
GeorgeZaharia has 35 followers

Trophy Case

  • 10-Year Club
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • x9
    Popular Game One of your games has over 1,000 players
  • x21
    Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

21/44
How to earn trophies

Blogs

  • Construct For Dummies - Simple Tutorial Collection

    I scour the Construct forums for users tutorial requests, and create small quick and simple tutorials using Construct's defaults features so anyone can use and apply them.

  • My Dev Logs

    Thinking on games 24/7 is fun and waste of time and unproductive if we don't bring those game ideas to life. In this blog im bringing my game ideas to life and log their development process.