Spock's Forum Posts

  • Question: What are the list of attributes for "Initial" - "current" is default. Curious if "fromTo" or other methods like TweenMax/Lite are available.

    EDIT: Nevermind. I switched to LiteTween. Looks like Initial is no longer used.

  • Sorry, I can not disclose the project or the client. The interactive unit runs at the same time of "another" unit that is very resource hungry. I should be fine, like I said I have gone over that limit before. If It was up to me I would just use a pre-loader. Which, may be something I will use if it gets much larger. Lots to add yet, so I assume it will be over.

  • Think of this as more of an interactive unit and not a game. The Interactive unit I am building needs a load time of 1-3 seconds on a 3g netwrok. I agree, hand coding this would be more file size efficient and in most cases I would. However I really enjoy the workflow in construct 2 and it solves some problems that would otherwise be time consuming to code by hand. I would like to give CS2 a chance to be a tool I use daily.

    The PNG tools I use get the filesize much much lower. The reason is the unit is in retina so I am able to push the PNG compression further than normal and end up with a clean result. I also compress each PNG individually "by hand" so some are more compressed than others as apposed to everything compressed the same . Flat images turned into compressed JPG's rather than PNG I save even more resources than what is exported via construct 2. However what I am saying is, I take the files exported from Construct 2 and compress them again via 3 other stages. Sounds like I will just see what happens, I broke the resource restrictions in the past I will just break them again. lol Thanks for the feedback, thanks for the great product

  • Hey Ashley,

    My restrictions are for a mobile network of 3g or less. The 250k restriction includes images and runtime. I turn the images that I can to jpg and use my own png compression. In my case the unit needs to load instantly without preloaders so every kb counts. In the past I always break the 250k limit it is just frowned upon. Right now I am 30% done with my project and my runtime is already 180k "minified". Are we able to draw shapes with CSS in Construct2? Do you have any advice on what practices I should follow to keep my runtime to a minimum? What events/actions/behaviors cost a lot? For example, Is the behavior LiteTween more efficient than EaseTween behavior?

    EDIT: Was on the train before when I commented so I missed some things. Are you saying, the 106k for example polite loads over the network so in a way the initial load time is more like 30k(ish) when pulled from the server? Also, a blank document is 367k uncompressed and 106k compressed.

  • Hello,

    I am working on a project that needs to be as small as possible. However, its a bit disturbing that before I even start a project in Construct 2 a blank project is already 110k runtime.js. when I have a limit of around 250k. Anyway possible to strip the runtime down to the bare bones?

  • BUMP. Anyone know how I can prevent my lines from looking like crap? lol. Really need to figure this out soon before my deadline. Any help is appreciated.

    [attachment=0:203n9ks6][/attachment:203n9ks6]

  • Oh nice catch! Thank you very much for the help. Tested and it works

    For others that need this in the future.

    CAPX -[attachment=0:daw4yl7s][/attachment:daw4yl7s]

    JavaScript added to index.html

         <script>
    	function myFunction(){
      return{ 'prop' : 'some_value_works'};
    }
    </script>[/code:daw4yl7s]
    
    This can also be simplified.
    
    [code:daw4yl7s]    	<script>
    artist_name = "VALUE_2"
    </script>[/code:daw4yl7s]
    
    [code:daw4yl7s]Browser.ExecJS("artist_name")[/code:daw4yl7s]
  • Thanks Noncentz705 really appreciate the help.

    Please forgive me if I may not be comprehending all this properly. "I am not an advanced developer"

    I am still a bit confused how I set this up.

    * this is the code I will add to my index.html

    function myFunction(data) {
      var data = {
        artist_name: 'Alestorm'
    }[/code:1ec5rp9w]
    
    In terms of construct, still confused how I [set text] "artist_name" in the example above.
    [attachment=0:1ec5rp9w][/attachment:1ec5rp9w]
  • Hey Everyone,

    I am working with our developer who will be helping me do some back end development to load in dynamic content. He will be providing me some JavaScript that will load (3) dynamic variables. However, I have never messed with dynamic JS in construct and I am not sure how to post that data.

    QUESTION:

    1. How would I inject the (3) JS objects "artist,bio,trait" into Construct as text.

    2. Do I need to make a custom plugin for this?

    Quick "fake" JS snippet

    //this function goes into construct
    function MusicToConstruct(data) {
    
      //here's a fake data object. Anytime the MusicToConstruct function is called by my code, it will contain this data object. So remove this when we get the real one working
      var data = {
        artist: 'Alestorm',
        bio: 'blah blah blah i\'m a long string',
        trait: 'pirate metal'
      }
      //end fake data object
    
    }// JavaScript Document[/code:3ufvqt71]
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Quick question. Any idea how we could fake anti-aliasing on the line. so it doesn't stair-step?

    Only thing I can think of is make it double resolution and scale down.

  • PERFECT Exactly what I needed.

    Looking at the events. I should have figured that out. Its been a few months since I was nose deep in Construct.

    Thank you very much!!!

  • Question: How would I draw a line, or stretch a sprite from one object to another?

    I plan on tweening (2) objects. As they tween a line needs to be drawn to connect them. I need this to be as CPU lite as possible.

    [attachment=0:3ch0ez6m][/attachment:3ch0ez6m]

  • Hmm... Seems to work if I uncheck minify script. Must be a bug?

  • Game works when I preview in chrome (or any browser) but when I upload anything to my server all I see is a black screen.

    Any idea?

  • I tried everything. But I did have an unused animation in the sprite. I deleted the animation and its frames and the png is crisp. No idea why it would solve the issue.