Million questions

For questions about using Classic.

Post » Thu Aug 09, 2012 9:29 pm

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.
B
12
S
4
G
3
Posts: 426
Reputation: 2,458

Post » Thu Aug 09, 2012 10:41 pm

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!
eku2012-08-09 22:41:55
B
5
S
1
Posts: 37
Reputation: 576

Post » Thu Aug 09, 2012 11:30 pm

[QUOTE=eku]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?[/QUOTE]It'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.

[QUOTE=eku]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?[/quote]This 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.

[quote=eku]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.[/QUOTE]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.Zotged2012-08-09 23:31:12
B
11
S
2
G
3
Posts: 100
Reputation: 2,150

Post » Fri Aug 10, 2012 5:03 am

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

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

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.[/quote]

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.

[quote]
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.[/quote]

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.

[quote]
3. In one place there is huge fps drop:

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)?[/QUOTE]

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.Elyzius2012-08-10 05:10:20
B
6
Posts: 27
Reputation: 404

Post » Fri Aug 10, 2012 9:57 am

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 :
[quote="Elyzius"]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.[/quote]
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).

[quote="Elyzius"]Many professional casual games are set at 1024x768 resolution[/quote]
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.
[quote="Zotget"]If you want quick results without looking at channels you can make use of xaudio's autoplay feature.[/quote]
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?


[quote="Zotget"]
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.[/quote]
What I'm talking about? Let's see.
When layer with hard light blending mode has grey, let's say, background

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:

Into this:

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.eku2012-08-10 10:32:24
B
5
S
1
Posts: 37
Reputation: 576

Post » Fri Aug 10, 2012 5:34 pm

[QUOTE=eku]This:

Into this:

You think that it exactly this result can be archived with different layers effects?[/quote]

Why not? With a bit of Photoshopping to remove as much of the gray background as possible, some interesting effects can be achieved with shaders.



[quote]
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![/QUOTE]

Yep, I noticed them. Very cool.
B
6
Posts: 27
Reputation: 404

Post » Sat Aug 11, 2012 8:42 am

Actually you can create something like (without erasing stuff in photoshop) this with light on black background and then (in CC) give it some additive shader. But its not exactly the same effect. I know is almost not important, and CC is not "Photoshop for games", but this is bother me - I like when CC show me exactly what I created in Photoshop...
B
5
S
1
Posts: 37
Reputation: 576

Post » Tue Aug 14, 2012 12:00 pm

Maybe it's a problem now, but probably will be in future, so I better ask now.
I created main character with weapon, and there will me something like "if 'enemy' colide with 'player_attack' destroy 'enemy'"(yea, simple as hell, but you know what I mean), so its better to create weapon (sword), as a another sptrite attached to main character hand, or you guys have better solution?


eku2012-08-14 12:46:26
B
5
S
1
Posts: 37
Reputation: 576

Post » Tue Aug 14, 2012 5:44 pm

You can make the sword part of the character's sprite if you want. The main advantage of having a separate sword sprite is that you can extend it beyond the square area of the character sprite.



If you look carefully at the above picture, you will see bits of cyan color behind the sword. The cyan color is actually part of the sword's collision mask, which I purposely kept visible for demonstration purposes.

If you decide to make the sword blade separate from the character, you should set its sprite's origin to the bottom center of the blade.



Likewise, the sword's collision mask should also have its origin at the bottom center.

Next, edit every frame of the character's animations to create an image point where the sword blade and its collision mask will be attached.



Finally, create events to attach everything together at the proper angle. Rather than explain the process step-by-step, I prefer to upload a demo CAP file for anyone to look into.
B
6
Posts: 27
Reputation: 404

Post » Wed Aug 15, 2012 2:04 am

The two biggest things to consider are, of course, the power of two textures and limited shader use. I had a loading lag on the edge of when something came on-screen that had a shader on it. I just found another way around it and that solved that. Also, tiled backgrounds are neat and all, but you can get the vram way down with the chunks you mentioned you were going to do. If you have a lot of graphics, the higher VRAM use is fine, just try to not go overboard.

I'm not posting it as any means of showing off, but rather giving an example. It's pretty well optimized on graphics, though could probably use a little more. And there are no tiled backgrounds because nothing really repeats:

That layout is around 95MB of VRAM. There's a ton of motion going on (the grass and many of the pine needles blow in the wind), and a lot of objects. But without sticking to power of two, that would end up being a nightmare to run. Your graphics look fantastic, don't get me wrong. And I do have layouts that go up to around 125MB, but optimizing will allow you to get a LOT more detail on-screen without taking a hit.

In your case, those large wall textures could easily be tiled backgrounds and then post an occasional crack or whatever as a sprite over top to make sure it doesn't get too monotonous. Then you could use a mask layer for your lighting (search it on the forums if you aren't familiar) and then post your windows/etc. as sprites over that tiled background. Your interior levels lend themselves well to doing this.C-72012-08-15 02:05:55
B
90
S
32
G
14
Posts: 935
Reputation: 14,540

PreviousNext

Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 1 guest