Game Development Community

Page «Previous 1 2
#1
04/01/2005 (3:12 am)
Look into setWorldLimit (I believe that's it). The tutorial PDF included with T2D goes into this.
#2
04/01/2005 (4:19 am)
Could you use another scene/window?

What happens to the collisions outside of the rendering clip?

Wouldn't it look a little strange with a boss that gets culled?

If you want this, can you not have something in front where you effectively want the boss to be culled?

Just a few ideas as I'm not sure exactly how handy this would be generally. In terms of developing it; I wouldn't want to add scissoring until we've done some other rendering work that's planned but after that, there wouldn't be any good reason why you couldn't do it. It's not impossible to do now using something like scissor except you couldn't rotate the scissor region.

- Melv.
#3
04/01/2005 (5:08 am)
Maybe if you send me an example image and draw-on the kind of effect you want, I can advise you better. Having trouble with the minds-eye view of exactly what you're trying to achieve here. Besides, I've not got the previous image you sent me here (I'm @ work).

- Melv.
#4
04/01/2005 (7:43 am)
Yeah I'm hitting the same thing, trying to imagine what your mentioning Robert and its not forming up quite right
#5
04/01/2005 (7:50 am)
I think I know what you mean.

Imagine an old school vertical scrolling arcade shooter. Now play that game in MAME on your PC. You'll have a big black border on the left and right.

Now recreate that in T2D. If you have something in the middle of the screen, and it moves towards the left, it will leave the play area and start being drawn over the black border.

At least I think that's what he's getting at :)

Having a 'mask' that gets drawn on a different layer (and therefore hides part of the squid when it moves 'under' it) would probably be the quickest fix, but it depends if it fits in with the style of what you're trying to do.
#6
04/01/2005 (8:22 am)
I guess it will come down to some clever use of layers in the short term then.
#7
04/01/2005 (8:37 am)
Ater reading Phillips post it's starting to make some sense... I think.

Could you not make a black image with a square "hole" in the middle of it, and just position it on a layer on top of your enemy, background, etc. layers in the rendering? You could then still have your item, or whatever, that needs to go over the game and the border, but just makeing another layer.

I dunno... A) Maybe I don't have the whole picture in my head; B) I've been in Tampa for a few days and it broke into my T2D learning time, so I'm thinking more conceptual than what is actually possible atm.
#8
04/01/2005 (8:52 am)
So what actually does render in this "black border" then?

- Melv.
#9
04/01/2005 (1:04 pm)
I've a similar problem.

I've a fullscreen background image. On top of that there is a border, around one third of a screen wide and not quite as high as the actual screen.
My tilemap is several screens high and should be rendered only inside the border.

I also want to display a larger portion of the tile map scaled down to the right of the border.

www.steinke.net/overview.png
gray is the bg
red is the tile map (rendered twice, inside the playfield and as overview)
green the border

The "active" part of the tilemap should only be visible inside the border, the background should still be visible at places w/o tiles.
The complete map should be rendered in the overview window at the right.

Both the views of the tilemap are supposed to scroll down.

I know how I'd do that in C, but I have no idea how I should do this with t2d.
Help would really be appreciated.
#10
04/02/2005 (12:40 am)
@Lennart
Yeah, I don't understand why you don't use border sprites. Just make a solid black sprite, and cover what you want to cover. In your picture, you have the black behind everything. But you could cut a rectangular hole in the center, and bring it up between the scrolling area and the hud. Right? And if you use separate border sprites, I can't imagine 4 black rectangles would cause any kind of performance hit. It seems like you want to add a complicated feature for something that's very easy. Maybe I still don't understand what you're trying to do.
#11
04/02/2005 (3:58 am)
Quote:Yeah, I don't understand why you don't use border sprites. Just make a solid black sprite, and cover what you want to cover.
Because that would cover the background.
The background consists of a full screen image and 2 scrolling layers on top of that.
I could render part of the background instead of your suggested black sprite, but again, that's not possible because I can't render only a part of the bg.

I was kinda surprised when I realized that I couldn't scroll the map, but could only move layers. I would have expected that you place the map somewhere (defining the outer border of the visible map) and then scroll the actual tile layers inside the defined map area.
Like scrolling the content inside a scroll pane. It's not a problem if t2d handles this in another way, but then I'd need to know that way :)
#12
04/02/2005 (4:05 am)
The tilemap should only be visible in the area colored green.
Below the tile map are the space images and animated, moving, transparent / translucent sprites simulating moving nebulae.

www.steinke.net/render.png
I'm not sure with the adding another scene, since I'm already using a 2nd scene to render the tile overview at the right. I tried, but couldn't get it to work ...
#13
04/02/2005 (5:22 am)
Green Layer: Layer #3
Stuff in Green Layer: Layer #2
Gold Border w/ BlackSpace & Blue at the top, transparent where the green is: Layer #1
Gui that would be above everything: Layer #0

So, if you loaded your tile-map in Layer #2, the black border of Layer #1 would "mask" what's underneath
#14
04/02/2005 (9:27 am)
Quote:Gold Border w/ BlackSpace & Blue at the top, transparent where the green is: Layer #1
There's no such thing. Since stuff is moving in the background, and the background itself is changing as well from level to level, i'd have to blit part of the background and all the moving sprites below the border ontop of the tiles.

My background isn't black, nor is it static. There's subtle animation going on and the background will change as soon as the level changes. I might even make it a scrolling background, if that fits the game better.

The thing that bugs me the most is that something like this could be done easily in C - but without all the nice effects T2D gives me. (I'm not saying that to diss t2d, it's just frustrating for me that I know how to do it in C, but have no idea how I should do it with an engine that has so much power under the hood)
#15
04/03/2005 (1:37 am)
It wouldn't be too difficult to adjust the viewport for non-rotated fxTileLayer2D objects so that we get the additional hardware clipping.

For the moment though, either using a new scenegraph or using occlusion is the way to go.

I'll add that to the list. It may even get into the next update which would be nice.

- Melv.
#16
04/03/2005 (8:05 am)
Okay,

I got some time this afternoon to do some T2D stuff and I thought this would be a nice challenge.

I've corrected the problem by adjusting the viewport-clip and using an appropriate orthographic projection for the reduced region so you get hardware clipping.

This only works for tile-layers that are non-rotating as the hardware viewport cannot be rotated. It is possible to do this with additional clip-planes but I'll do that another time. Non-rotated tile-layers are the most common though.

It would be pointless to post the code here as it does draw on a handful of functions that are only in the update SDK.

If you can wait, it'll be in the next update and I'll try to get rotated tile-layers done as well.

Cheers,

- Melv.
#17
04/03/2005 (8:46 am)
Wow, Melv. You kick ass. Next update no less.

Actually... I can use this in the game I'm currently working on...
#18
04/26/2005 (12:29 pm)
Just thought I'd bump this thread to say that this made it into the v1.0.2 update but only for non-rotated tile-layers.

If you create a tile-layer now, you'll get hardware clipping.

@Lennart: If you'd like to give it a whirl when you get chance, I'd be greatful to hear if it works for you.

All the best everyone,

- Melv.
#19
04/26/2005 (1:31 pm)
Did the original post get deleted?

I am cornfused.
#20
04/26/2005 (1:43 pm)
There's something strange going on with "Robert Cummings" posts. I've got no idea what's going on. All his posts seem to have disappeared for some reason and he's been curiously inactive for a while.

His ID now seems to be "yourbent"!

Very strange!

- Melv.
Page «Previous 1 2