Greg's Forum Posts

  • My workaround for this right now is to have a "debug" layer, on that layer I add all of my debug info, whenever I am ready to release all I need to do is be sure the debug layer is not visible. I have 1 text object with instance variables to link it to different functions, and 1 sprite with animation frames to have different colors to represent different things while debugging. A in-engine debugging feature would be nice, but with a bit of setup checking things using the tools available isn't super hard.

  • Is this the best sorting option available to us right now?

    I am going to try this out before jumping into a plugin, but sorting in my "birds eye view" game is becoming an issue that I do not want to design around any longer, so hopefully this works out for me.

    > I dont understand why youd want to move between layers at all. If a layer is over the main play layer then that layer should be considered to be a "not much of anything is higher into the 'sky' than this" the exception being sky/clouds etc.

    >

    You're right that there is no requirement to change layers. The issue is one of performance. If you are sorting every sprite in the layout, and you have a huge layout with hundreds of items, that is a lot of sorting! If you have the items divided between a three or four layers, then you only have to sort 1/3 or 1/4 of the items.

    Anyway, I got it basically working with the player swapping layers based on Y. I have one more thing to iron out, and then I'll post it.

    EDIT: Here is the version with the player moving between layers. Looks much more complex because of all of the text objects used to show what is going on (layer number, Y, number of sorted objects out of total scenery objects, and cumulative sorts). There are 138 scenery objects, and without dividing them between layers, they'd all be sorted on each collision. Dividing them between two layers cuts the number of sorts, but still not sure of the benefit of this...

    DepthSortingLayerd3.capx

    NOTE: When I say number of sorts, I guess I really mean the number of objects moved to the top or bottom of the layer as the result of a sort. The sort is actually sorting all SortedSprite objects, but they are only moved if they are on the player's layer.

  • Sorry to bump the topic, but I figured it was better then making a new thread. In the latest beta release (r98) the log notes that texture sizes for tiled background objects need to be power of two, and gives the example of a 1:1 ratio image.

    Can images be in a power of two with different height width ratios?

    In my previous experience other engines allow us to use any height width ratio as long as it stays within a power of two.

    For instance a 64x32 texture would be fine, but a 61x31 would cause issues.

    Our engine at my last job had issues exporting to wii when the ratio was x<y but x>y in the ratio was fine (64x32 good, 32x64 bad) but this was only on the wii not on any other platforms. Also, images smaller than 16x16 had issues on 360, but taht was not much of a problem because of the power of the system using a smaller then 16x16 texture was unncessary in most cases.

  • My results are invert.

    Chrome has sprite showing as sharp and tiled background as blurry, same with firefox. I.E. is all blurry.

    I am on nvidia 560m with latest stable driver. I will test on another pc tomorrow if I can.

  • I am having an issue with all of my tiled backgrounds showing up blurry.

    Here is a screenshot of the problem I'm getting https://dl.dropbox.com/u/30187917/issue.jpg

    Everything looks good when I am in construct 2, and image editing software, but when I run the project in chrome, i.e., and firefox, my tiled bgs are very blurry!

    I need to be using webgl and point sampling to get the pixelated look I am going for.

    I am using r97 on a nvidia gpu with win 7 64bit.

    My drivers are good, and I get the same result in all browsers.

    Here is the capx showing the problem.

    https://dl.dropbox.com/u/30187917/tiled_background_blurry.capx

    The project shown above is a sprite next to a tiled bg. When I run the project, the sprite is crisp and point sampled but the tiled bg is blurry. Same texture, different object, different rendering results.

    The texture is 48x24 (it was 48x20 when I found this thread, but changing it did not help.)

    I tried scaling it to 48x48 just to see if that fixes the blurryness, but no luck.

  • Helpful, thankyou! I think I am going to try Yann's suggestion first to avoid additional plugins, but if if I am unsucessful this is a great plan-b!

    Edit:

    Setup Yann's suggestion, and it works like a charm! A tiny extra bit of setup compared to an animated sprite, but the results are ideal and controllbe. Wonderful! <img src="smileys/smiley32.gif" border="0" align="middle" />

  • Yann - The master strikes again, thanks man! I will give it a shot and post a capx when I got something, but this seems very straightforward, thank you!!

  • You can create as much object as you have frames and swap them during runtime :D

    A big pain but that should work

    What your saying is replace the tiled background with another tiled background, creating the illusion of a single animated background animating?

    Would this not be resource intensive?

    So for a simple 3 frame, 1 second, animation, the basic setup would be

    tiledbackground 1 is on screen

    wait 20*dt

    destroy tiledbackground 1

    create tiledbackground 2

    tiledbackground 2 is on screen

    wait 20*dt

    destroy tiledbackground 2

    create tiledbackground 3

    tiledbackground 3 is on screen

    wait 20*dt

    destroy tiledbackground 3

    create tiledbackground 1

    Is this going to ruin my performance, the water covers more than half of the playable/viewable area.

  • Is there no way to create animated tiled backgrounds without editing js scripts? I started to create water and realized there's no way to add animation frames to the tiled background object. Would be a ton of sprites, so a tiled background would be ideal, but if there's no animation it does not look like water.

  • Very cool topic, thanks for bringing it up!

    To do a camera move in a birds eye view style game (zelda, space shooter) how would you make the camera move away and then back to the player?

    Brainstorming about it makes me wonder if you would use a sprite as a "target" for the camera with a scroll to behavior. When the cut scene starts the player's "scroll too" would be disabled, and the camera target's "scroll to" behavior would be enabled for the cutscene. After the cutscene ends shift the "scroll to" back onto the player character.

  • 1. Are you asking if it's OK to use lots of instances of the same sprite? That's pretty much what the manual was talking about. It doesn't matter which object types you use, lots of instances will cause a slowdown, period.

    In UDK and the proprietary engine we used at my last job there is a performance boost when using instances as opposed to unique sprites/meshes. Is this not the case here?

    If you have two sprites that are the same object, placed as instances, it would not perform better then two objects that are unique?

    A+B > A+A in terms of resource use?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Make a variable "score"

    Make an event. Give that event a system condition of "every x seconds." Set the amount of seconds will pass to the amount of time between adding to score. Give the event a system action "Add To Variable". Make it add to "score" and set the number it adds to how much you want it to go up by every time the event plays.

    Whatever you set the time to for every x seconds, is how often it will add to score. Whatever you set the add to score value to will be how much it increases.

    For instance, every second add 1 to score would make it add 1 to score each second that passes.

    Here is an example of what I am talking about:

    http://dl.dropbox.com/u/30187917/plaatforming_with_score.capx

  • Plugin is awesome, going to be implementing it into my project today, will cut down on a lot of duplicate objects created for effects.

    In my experience "additive" and multiply are opposites of each other.

    Additive makes all of the white information "add" to whatever is below it,and black is shown as invisible, used for glows and highlights etc.

    Multiply makes all of the black information "add" to whatever is below, and white is shown as invisible, used for making shadows and grunge etc.

  • First make a layer for the timer, and set the parallax to 0 so that it will not move when the view does. Position your text where you want to show the time measure (score.) The dotted line represents the border of the players view, so use that to reference where you want the timer to always stay. Also add a "keyboard" object to your project so you can map the spacebar action later

    In the event sheet make a variable "score". Make an event with a condition of every x seconds, and use the amount of seconds you want to pass before another point is added to the score. make another condition for the object to not be touching (overlapping) whatever object you want it to pause et. Make an action for your text box that will display the score and set it to "add to variable" action. Select the amount you want the score to change by with each second passed.

    For instance,

    every 1 second            | add +1 to "score"

    is not overlapping object |

    Make a second event that is "every tick", and give that an action using the text box you made for score set the text to "score".

    for instance:

    every tick | set text to "score"

    make a third event with the keyboard condition "on pressed" and select spacebar as the button that should be pressed. give the event an action of setting the variable "score" to 0. This will make it so that whenever you press spacebar you will have the score reset to 0

  • I am not sure if this is what he's talking about, but I wouldn't mind having the ability to group a selection of objects (sprites, mostly) and assign a "group" to them. For instance a tree with a trunk, canopy, and apples could be 3 seperate sprite objects, with different properties/behaviors. trunk is a plain sprite, canopy is a solid to platform on, and apples can fall to the ground. To do this now you would have to select each object (either with a marquee selection or by clicking each). If it were possible to make a "group" of objects, such as in illustrator or flash, you can more easily select and duplicate/reposition a series of objects. Families to me are more for event sheet work, where as group would be a for the layout view and would make multiple objects selectable by one click.