Million questions

This forum is currently in read-only mode.
0 favourites
  • Hi guys!

    I back to CC with full force and... of course I have million problems, but I don't wanna create milion topics for my silly question, so I will be post my "help me!" screams here. And, of course, sorry for my poor English language. Every one who hepl me will be in "credits" section in game! Wow ;-)

    1. When my blue box "sprite", I mean player, touch a invisible canvas "scream1" the sound of screaming human "scream1.wav" is playing over another invisible canvas "scream1pusher":

    <img src="http://i.imgur.com/Sq1Gq.jpg" border="0">

    But every time mr. blue box touch "scream1" canvas the sound was playing, even with "once" condition.

    <img src="http://i.imgur.com/V25YY.jpg" border="0">

    so I created something that works, but it's stupid, don't you think so?

    <img src="http://i.imgur.com/bf0mG.jpg" border="0">

    It's working good, but I don't think is good to use solution like that, because there is probably other, better solution with events.

    2. Now quite complex one. I create game for 1024x768 resolution, but many people have other monitor proportions like 16:9, 16:10. I send preview exe to two guys with 16:9 monitor and everyhing is working, but graphic was streched horizontaly, and I really don't know what to do with this. Help.

    3. In one place there is huge fps drop:

    <img src="http://i.imgur.com/XGsB7.jpg" border="0">

    censored due to brutall stuff

    I know the project is very graphic "heavy" (an will be only more), but fps drop only in one place, when mr. blue box jump (1) to another place (2)?

    Problem 1, 2 and 3 CAP (created with CC r1.2) - http://dropcanvas.com/8lkqj/1

  • Hi,

    regarding the sound trigger, I would suggest not to use a canvas object if it`s the sole purpose for it. A canvas consumes already VRAM in portion of its size. I`m also not able to tell wether there`s some buggy stuff going on with the collision detection and eventing since your condition and expression should work fine as they are.

    I would replace the canvas with a tiled background as this is more flexible when you scale it and doesn`t consume VRAM.

    Regarding the aspect ratio, you might want to check this thread.

    Cheers

    The Colonel

  • Maybe you also might want to check on how you compose the level. Running your example uses up to 120 MB already which is quite heavy for a scene where there is not much going on except the background and the platforms. Try to have your platforms made up of smaller sprites if you have repeating textures. That might also counter the fps drop you are experiencing.

  • To trigger sounds in a specific position. Create a sprite, then add a string variable to it called soundpath with the value f.e "scream.ogg"

    as you collide with the object, you autoplay appath&"Data\Sfx\"&soundpathvar at the position of the object. THat way, you can have multiple objects and give them different variables.

    If you want the scream to sound like it's travelling away from the player (if i

    understand you correctly?) you can lerp the position of the sound.

    THere is an expression called get last autoplayed audio and it is usefull for this

  • colonel Justice

    Thanks for reply.I use a lots of canvas in the scene, like for fire sound "placement", and other stuff. I will try replace all canvas with something that don't eat VRAM. Those "places" that trigger or emmit sound is invisible so I can use something different, like tiled background. Thanks for your suggestion. And I can cut everything to small piecies (now they are 1000px width) if this will help. And I don't have repeating textures... Too much Photoshoping :/

    Urled

    Sorry, but I don't understand you, I only know basic stuff of CC... and little of English language. And player is already "listener" to all of sounds (scream and fire) and thats fine, I think.

  • Ok, I replaced all canvas with "empty" tiled background and now VRAM usage looks like this:

    <img src="http://i.imgur.com/wR876.jpg" border="0" />

    And, och, I forget about two layers - colors and shadows. Those to have 4 sprites of 3000px width. So, is better to have 10 sprites with 300px of width?

  • Not to throw in a wrench, but I wonder though, is building for 1024x768 a good idea with most computer users having higher resolutions now (1280x720 for example)? I saw a stat somewhere that says only 13% of computer users are on 1024x768 diplays now.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • eku,

    Awesome graphics.

  • Ok, I replaced 3000px width png24 with 1000px width jpg and use layer effects to have shadows and light over character (mr. blue box) and now VRAM usage is something about 90. But, I don't get it. It use 90MB of video ram from graphic card?

    4. Five xaudio objects play the same file - "fire1.wav" - at different places (those fancy fireplaces). So, I must "cache" "fire1.wav" to every xaudio object or one caching is ok?

    <img src="http://s9.postimage.org/bg0wo0im7/cache.jpg" border="0" />

    MrMiller

    Thanks. I don't have (I mean CC don't have) few layer effects that I want ("hard light" and "screen" from photoshop) so it's don't look like it should look. And about resolution - I still use 1024, so it's ok for me.

  • eku

    Yeah, if you're only making the game for yourself then it shouldn't be a problem. It's just if you release it for the public to play, that's where you might run into issues...

  • As for effects, there are all kinds of ways to play with lighting in Construct, and Construct does have a screen effect but I'm not familiar with Photoshop's operations so I'm not sure if it's the same thing or not.

  • I have two guys (with different desktop resolution) to test my stuff, so its not a problem. And game is not my answer to Crysis 6, nothing big here.

    I missed "Screen" effect, thanks!

  • Ok, I replaced 3000px width png24 with 1000px width jpg and use layer effects to have shadows and light over character (mr. blue box) and now VRAM usage is something about 90. But, I don't get it. It use 90MB of video ram from graphic card?t's a very bad practice to have humongous textures as backgrounds. Doubling the texture size quadruples vram usage. Yes your game is using 90mb of video ram but some of it is taken by the shaders so it might not be all textures. Once imported to CC it doesn't make any difference what format the image files used to be in, they're converted to png unless you load them in the runtime (in which case they still take the identical amount of vram but might be comparatively highly efficient when stored externally).

    Anyway you should always use textures sized in the powers of two because that's how the graphics cards handle them. If you have a texture of the size, say, 1050x1050 it'll be treated as if its size is 2048x2048 which is a huge waste of vram.

    4. Five xaudio objects play the same file - "fire1.wav" - at different places (those fancy fireplaces). So, I must "cache" "fire1.wav" to every xaudio object or one caching is ok?his too is a very bad practice. There's almost NO need to have multiple xaudio objects, let alone multiple ones for individual sounds that are the same. If you want quick results without looking at channels you can make use of xaudio's autoplay feature. You have to think of xaudio as a library that plays sounds for the entire project, not as a single sound that's treated as an object. It's very nonsensical.

    Thanks. I don't have (I mean CC don't have) few layer effects that I want ("hard light" and "screen" from photoshop) so it's don't look like it should look. And about resolution - I still use 1024, so it's ok for me.n effect similar to photoshop's hard light could be achieved fairly easily by stacking a contrast or curves shader with additive or screen on the layer and finding the right values.

  • But every time mr. blue box touch "scream1" canvas the sound was playing, even with "once" condition.

    <img src="http://i.imgur.com/V25YY.jpg" border="0" />

    so I created something that works, but it's stupid, don't you think so?

    <img src="http://i.imgur.com/bf0mG.jpg" border="0" />

    It's working good, but I don't think is good to use solution like that, because there is probably other, better solution with events.

    Nothing wrong with your solution, but if you want a different one, here's what I suggest: Create a global numeric variable with an initial value of zero. Let's call it "screamed." In your event, you'll need to check for On Collision AND whether global variable 'screamed' is zero. Your actions will then be to play the sound file and to set global variable 'screamed' to 1. This will guarantee that the sound file won't be played again even if the sprites collide.

    2. Now quite complex one. I create game for 1024x768 resolution, but many people have other monitor proportions like 16:9, 16:10. I send preview exe to two guys with 16:9 monitor and everyhing is working, but graphic was streched horizontaly, and I really don't know what to do with this. Help.

    I don't really see that as being a big problem. Many professional casual games are set at 1024x768 resolution. There is some minor horizontal stretching when the games play at full screen, but that never bothered me. If you're making your game for the general public, this resolution will be playable on all but the most ancient PCs.

    3. In one place there is huge fps drop:

    <img src="http://i.imgur.com/XGsB7.jpg" border="0" />

    censored due to brutall stuff

    I know the project is very graphic "heavy" (an will be only more), but fps drop only in one place, when mr. blue box jump (1) to another place (2)?

    I'm not seeing any huge FPS drop, although I do have a pretty good rig.

    If I were you, I'd optimize the use of graphics to save on VRAM. Many people who play 2D games don't have the computing power to play 3D games. Replacing your background Sprites with Tiled Backgrounds is good advice. Even better, you can break up the repeating parts of your backgrounds and stretch them across your layout. Stretching a tiled background will not deform it the way it does to a Sprite. Instead, it will cause the image to repeat across the stretched area.

    Your graphics and sounds are excellent, by the way. I wish you the best of luck with your project.

  • Guys, it's pleasure to read such a good (and easy to understand) advices.

    In this "room" I can only cut graphics for smaller pieces, because the graphics are non repeatable, so I can't use tiled backgrounds object. But I will try use it for next rooms. Thank you good people.

    In RPG Maker times (years, years ago) playing with switches and variables was fun, but I'm not a programmer, I'm a graphic guy, so varialbles in CC are very hard to understand for me (and Construct wiki don't help me...), but :

    Create a global numeric variable with an initial value of zero. Let's call it "screamed." In your event, you'll need to check for On Collision AND whether global variable 'screamed' is zero. Your actions will then be to play the sound file and to set global variable 'screamed' to 1. This will guarantee that the sound file won't be played again even if the sprites collide.

    this is actually tells me a lot about variables in CC. You don't know how much you helped me here. Thank you very much (credits section will be looong I think).

    Many professional casual games are set at 1024x768 resolution

    Casual gamer will delete game after first stage. I planning quite hard game, in "old days" style. And thank you sir for your good words.

    Zotged

    You have damn right about texture sizes, I don't know why I'm such a lazy guy. I will cut everything to 512x512, I think this will help, and try to use tiled backgrounds in next rooms.

    If you want quick results without looking at channels you can make use of xaudio's autoplay feature.

    Forgive my stupidness, but before my "sollution" I was created only one xaudio oncject playing "fire1.wav" at all "palenisko" sprites, but this don't work at all. Thats why I use multiple xaudio object. So, if you have time, can you show me how can I "emmit" sound "fire1.wav" from every "palenisko" sprite from only one xaudio object?

    An effect similar to photoshop's hard light could be achieved fairly easily by stacking a contrast or curves shader with additive or screen on the layer and finding the right values.

    What I'm talking about? Let's see.

    When layer with hard light blending mode has grey, let's say, background

    <img src="http://i.imgur.com/nVhfp.jpg" border="0">

    it will become invisible. So we can archive quite nice results with lights. Mr. new placeholder, please show us example (probably I will have some problems with animations, I mean with collision boxes, so more "help me!" screams to come).

    This:

    <img src="http://i.imgur.com/SHgvC.jpg" border="0">

    Into this:

    <img src="http://i.imgur.com/1Svo8.jpg" border="0">

    You think that it exactly this result can be archived with different layers effects?

    And... you guys noticed moving candles flames (top of stage) and little "fire effect" from those candles fire? I'm planning add some falling wax from those candles via particles, but... you noticed it? I love small details!

    CAP - http://dropcanvas.com/8lkqj/4

    And forgive my poor English.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)