-
Pumpkin Carving 2008
Being quoted by Marmotte - very awesome.
Would it not be easier to simply store appropriate rotation values in the tiles themselves? He said himself he's not using vectors for collision, so instead of comparing points, you could just rotate the clip to the rotation angle specified by the tile data?
The 'Boose':
ASUS Sabertooth P67 TUF
Intel Core i7-2600K Quad-Core Sandy Bridge 3.4GHz Overclocked to 4.2GHz
8GB G.Skill Ripjaws 1600 DDR3
ASUS ENGTX550 TI DC/DI/1GD5 GeForce GTX 550 Ti (Fermi) 1GB 1GDDR5 (Overclocked to 1.1GHz)
New addition: OCZ Vertex 240GB SATA III SSD
WEI Score: 7.6
-
Yeah, except that the collisiontiles are just a big bitmap (tileset), and I don't store anything else. But I could try precalculating this or something... if I ever decide my engine needs characters that rotate with the slopes... But that would also exclude more complex shaped tiles (right now about any shape is possible, as long as it's big enough).
Marmotte: wasn't being serious, though I wouldn't mind doing a game together some day... I'll send you a pm/talk to you on msn with more info on my platformer idea... I think it's wicked cool and very original, so I don't want to talk about it too publicly yet.
-
DOT-INVADER
Originally Posted by ImprisonedPride
Being quoted by Marmotte - very awesome.
Here we go again, then
Originally Posted by ImprisonedPride
Would it not be easier to simply store appropriate rotation values in the tiles themselves?
That's what I said as option #1 (or, what I WANTED to say )
(And that's another quote with you)
Fall_X... bitmap collision? Oh yes, I understand now... I've re-read one of your old message, you are using bitmap detection for sloppy tiles... Is that also called "tile-based", then?
In my case, I have an array that stores the data of the irregular tiles. I'm also able to have any possible shape, since the array stores for each "row": how many blocks (or free tiles) you have in the 32 rows of the tiles (if it's 32x32).
I don't know if it's the best way, but it works... That way I was also able to assign many other things to those irregular tiles (ex: it affects your walking speed, when the sprite doesn't move he's sliding ...etc). I took days and days to achieve that, because it's still a bit abstract for me (I was used to work with art-based games years ago)... But I think it works well so far
And yeah, you can try to contact me. But beware, I'm always busy for at least 1 thing (that doesn't mean I'll not listen to you)
-
Fall_X... bitmap collision? Oh yes, I understand now... I've re-read one of your old message, you are using bitmap detection for sloppy tiles...
For all tiles actually. My platform code doesn't know what kind of tile it's on. It just asks my world for a few points if there is something there... and if there is, it moves back the way it came until there is no hit.
Is that also called "tile-based", then?
Well, my scrolling engine is tile-based, and the collision detection is also done using a seperate tileset with 32x32 tiles in it, so I wouldn't know what else to call it than tile-based...
In my case, I have an array that stores the data of the irregular tiles. I'm also able to have any possible shape, since the array stores for each "row": how many blocks (or free tiles) you have in the 32 rows of the tiles (if it's 32x32).
Not sure if I'm following... but if it works as I think it does, it's a similar system, except that you use an array of 32 numbers per tile, and I use a 32x32 image. You have the benefit that you can add other stuff (angle, type of surface, etc) in that array, but I could always extend my system so that I store these extra properties per tile somewhere...
Have you implemented climbing in your engine? For me it was pretty tricky to do, more of a challenge than I thought it would be.
And can I see it somewhere?
-
DOT-INVADER
(...) except that you use an array of 32 numbers per tile, and I use a 32x32 image.
Yes! For the sloppy / irregular tiles, I have an array with 32 slots. And each slot informs me how many free vertical pixels you have from the top of that tile.
And yes, you can extend your system too You would probably need another array/grid that is holding the extra informations of the map.
Have you implemented climbing in your engine? For me it was pretty tricky to do, more of a challenge than I thought it would be.
Not in my current engine, but I already wrote ladders with my several of my "normal" tile based games ("normal" tile based game = without any slope). Hmmm, I don't remember if it was that tricky, but I'll see when I'll have some time
And can I see it somewhere?
Haha, not yet, last time I worked on it, I decided to rewrite/optimize several parts, so it's not working as great as before right now
-
You would probably need another array/grid that is holding the extra informations of the map.
Well, it can be done with the same grid because I use objects that contain the bitmaps, so I can have extra properties that can be read from xml or something...
Hmmm, I don't remember if it was that tricky
Well, the climbing isn't that tricky itself... but I now have two types of climb-tiles, one for ladders that you can also walk on without falling through them (as in the demo), and also a type for larger climbing areas, where you can't walk on (not in the demo yet). And I also support different keys for climbing and jumping, but they can also be the same (ie up could be jump and climb, but space could be jump and up could be climb), and the down key is used to jump through platforms, but also for climbing down, but again it could be double-press for falling through platforms, etc, so it took me a long time (=4 hours or something) to get all this working correctly, taking into account all possibilities. I'm happy with it now though, the code is quite complex but still readable and performant, and works a charm.
-
Updated with a nice 3D parallax/mode7-ish effect in the background (which glitches when the camera's x position is negative, but this won't happen in the actual game)... Graphics are still temporary, off course.
-
The Cheeze to Your Macaroni
Cool effect. How does mode7 work anyways? Is it pretty complicated?
-
Well, this doesn't work the same as normal mode7 engines, because there's no rotation involved. But what is the same is that you basically have a number of independant horizontal lines (in this case thay're 4 pixels high to save some speed), and you draw into them.
(modern) Mode7 engines in flash usually use beginbitmapfill with more than 100 of sprites. You can find some examples in the forums here.
My effect just uses copypixels into one bitmap's bitmapdata to increase speed, which I can get away with because I don't have to rotate parts independantly. It's basically the same as parallax scrolling, you move the different parts at different speeds. I also did not want to scale in realtime, so my image is skewed in photoshop, ie the top part of the image is smaller than the bottom, because the top parts will scroll slower.
I can give you the code if you'd like, but it needs the rest of my scrolling engine (which you already have), and it's also a bit messy due to heavy experimentation to get it working.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|