I know this question has been asked dozens of times in the past, but I can't seem to find any non-broken examples of it. I'm looking at implementing something similar to the 'GTA "3d" building illusion' into a current project. I'm not looking for anything too complex (even though it probably would be complex anyway), just something that will allow to create objects that have a height and move with the player.
Ultimately what I'm aiming to achieve, is something like 3 levels. The middle level will be where the player walks around and interacts. The top level is the top of the walls and the bottom level is for pits, holes, etc. If I'm not explaining myself well enough, please ask.
Someone had created an example of an engine that created skyscrapers of several levels in height. It's along with an example of a musically-activated equalizer bar that reacts to the wavelengths of the sound sample. Do a search for engines and examples, and you'll most likely find it. From what I remember/know of the original GTA, chances are that effect can be replicated with this example.
Additionally, you may be able to use the parallax object to do what you're trying to do. There are some impressive examples with the Clickteam updates.
Thanks for your help. Had a search for that example you mentioned. No luck as of yet. Also had a play around with the parallaxer object. Trying to get my head around it and figure out how to do this.
If anyone else has any luck on this, keep me posted.
I still have the example made by Shab. If I remember correctly, I added scrolling (arrow keys) and converted it to .mfa to upload it to Aquadasoft but nothing else has changed.
Hmmmm, I've put this into my game now but because the sprites are always being created they flicker randomly. I'm sure there's a better way to optimize it. Anyway, yeah. If anyone has any ideas on that then please let me know! ;D
Trying to do this in mmf2 is a bit of a lost cause, I'd recommend you to to use construct instead.
With it you can export and render 3d model which is then treated as a 2d sprite by the runtime, I can't think of any easier way to do 2.5D like you want.
Lost cause? Then you need to do some math dear boy.
Using a bit of trig and a few values this can be made "rather" easy and fully stable.
It's all a matter of positioning objects relative to the camera in the right scale and with the right offset. The scale and offset are found using distance calculations while the scale is set initially.
It also means means to abandon a language/system that you know, for something completely new that you aren't used to.
And if that's the case you will probably end up not finishing it even more than if you'd just stuck to the concept you know, albeit it meaning more calculations and such.
Construct and mmf2 are so similar in everything I doubt that would be much of a problem-
It's not a new language in any way and doesn't feel entirely new at all, on the contrary one of the most common complaints (here anyway) about construct is that it's a rips off mmf2's interface and architecture.
Does the whole screen flicker or is it just an/some active/s?
Check if you've got conflicting animation changing- or direction changing events. Most of the time, you've just forgotten something somewhere.
Nah, only the objects that are created for the Voxel effect flicker. It's mostly when the player is moving and/or the mouse. The actives are always being created and always being destroyed so it always updates their relative position to the player.
Oh I just found what it seemed to be... I had an event to check if the bullet collided with the voxel wall effect then destroy the bullet. I changed it to the parent wall object and it seemed to do the trick... strange... But YAY
I've just done a quick once over and have to say that I'm stumped. There is no reason it should do that, yet it does...
That being said, I cannot replicate that issue in any of my versions of the engine. So I'm stumped.
Seems to happen more when the mouse cursor is over the voxel ob. But now that I think about it; it could be a collision/ordering on the y axis problem.
I'm pretty sure though GTA actually uses real 3d buildings. Not real 3d. But kinda like in Doom, raised and lowerd floors, a few angles too. Probably more like Duke 3d. But it couldn't have a 3d object floating around in the air somewhere. The cars and pedestrians were all 2d sprites. The overpasses were too from memory.
I'm pretty sure though GTA actually uses real 3d buildings. Not real 3d. But kinda like in Doom, raised and lowerd floors, a few angles too. Probably more like Duke 3d. But it couldn't have a 3d object floating around in the air somewhere. The cars and pedestrians were all 2d sprites. The overpasses were too from memory.
In GTA, the scenery was 3d and grid-based - composed almost entirely of cubes (plus a few slopes). Different textures could be applied to each of the 5 sides of each cube (not including the bottom).
I think your best bet for something like this, would be to find/create a pixelshader similar to the Perspective shader, but also capable of skewing the image. You could then use that for each of the 4 side walls; and another normal active for the roof.
That way, you could have very detailed, textured 3d buildings using just the 5 objects.
It doesn't work quite right unless you either:
* Set RGB coefficient to something other than pure white (254,255,255 works fine),
or
* Set Blend coefficient to something other than 0.
You'll be able to test it yourself when I upload the example...
Okay, so I put together a rather shoddy and uncommented demo.
There's loads of room for improvement, including optimizing it to improve performance (eg. You only need either a left or right wall, and either a top or bottom wall, as you can never see both at the same time; plus the coding could be much better).
I may get around to finishing and commenting it eventually, but to be honest, I'm bored of it right now.
I extracted "3d Shader.fx" and "3d shader.xml" to Multimedia Fusion Devloper 2/Effects and it still doesn't seem to work for me.
There was no Effects folder already, I had to create one?
You are using the HWA version, right? It won't work in the standard build.
The fact that there wasn't already an Effects folder makes me think you probably haven't installed it yet?
Yes! Thanks Sketchy, great job! Unfortunately I can't remember who made it or where I got linked to it from. I found it extracted in my downloads folder when looking for something else and thought "I don't remember this but it's exactly what I need" lol.
Apparently the shader is made by someone called "Werbad" on the clickteam forums.
I just searched the forums there, and found a thread exactly like this - with someone wanting to make a GTA style game, and someone else suggesting the use of the very same pixelshader...
But at least noone had submitted an example, or I'd feel pretty silly having wasted my time
I think it still needs fixing up a bit more before I submit it to the downloads section, but thanks
Oh right, now that does sound familiar. You're right it was Werbad. I had a crack at it myself and came up with something similar but yours is way better
Relating to the voxel engine, I believe the issue may lie with setting the position of the 3d Camera to your player. Make the 3d object your player and then move your animations over it.
Hi. Sorry to bump this, but I would really like to figure out how to remove the walls that are between buildings placed right next to each other. This would probably keep the frame rate high and remove some of those visual clipping issues. Does anyone have a solution?