# Thread: "Simple" pseudo 3D space engine needed without extensions

1. Ok, maybe the term "infinite" was a bit misleading. What I meant with that was just the stars, which are created at runtime to random locations. Those would continue coming all the time. The individual bigger objects would obviously need to have fixed coordinates defined in some map file from which they are then created in the game. I don't know about scene graphs, but the number of objects wouldn't be that high.

2. Sounds challenging and motivating. No extensions, no shaders? I'm considering it and I have even few ideas already.

3. SEELE has made some quite nice 3D examples in the past. One of them was without extensions or anything like that, and it was a star field of sorts, if I remember correctly. I don't have it on this computer, but I remember that it exists, and that it proves that it is possible using only active objects. I could also probably make such an example, though I won't be able to do that right at this moment.

4. @happygreenfrog: I have seen demos like this too. There was a really old school star fox type one that was made with Games Factory 1. However they were poorly commented, used a lot of hard numbers and generally if you didn't already know the math behind it they were pretty much useless to you. Or at least to me anyway. Perhaps one of these examples could be used as a base but it would still need to be converted into a state where other people could use it.

5. The math is kinda simple, actually:

X = <insert screen width/2>+((3D X-CameraX)/(Z-CameraZ))
Y = <insert screen height/2>+((3D Y-CameraY)/(Z-CameraZ))
Scale = Z-CameraZ

The reason you divide the X and Y by the Z is because that will make the object move closer and closer to the center of the screen as they get further and further from the camera (it's also why you add the screen width and height divided by 2 to the X and Y). The Z is the distance from the screen, BTW. The 3D X and 3D Y should be stored as alterable values, BTW, and the same goes with the Z. This is the basic idea, anyway. It's actually also something along the lines of what you would do to use the surface object's polygon drawing feature to make colored (but not textured) 3D polygons. If it doesn't work, then let me know, and I'll try to see where I went wrong with the math (I learned the math from SEELE's article on 3D in MMF2, though I might not be remembering it perfectly).

6. @happygreenfrom: I have absolutely no idea what to do with that. I mean, I think I know what it's for but I'm not sure how I could use it.

7. This is an example that has it in action. It should give you the basic idea of what this is capable of: http://community.clickteam.com/threads/71770-Fake-3D-in-MMF2-MMF2DEV

Note that I have a better understanding of it now than I did before (I think), so I probably could make a better example now, but it still should give you the general idea.

8. That's a neat example, happygreenfrog.

Now if we could get this smiley face to float in space and travel to any possible direction instead just on the flat ground...

9. I don't understand Sin and Cosine enough to make a rotating 3D camera, unfortunately (at least, I don't think I do). I also don't have MMF2 on this computer, so I can't do it right now anyway (however, an endless star field shouldn't be too hard to do, as soon as I have MMF2 on here (I'll need an external CD drive for that)).

10. Originally Posted by MJK
That's a neat example, happygreenfrog.

Now if we could get this smiley face to float in space and travel to any possible direction instead just on the flat ground...
Well, I'd also want some kind of map editor. I did manage to add another square to appear on the field but I had to create a hole new object, not just an instance and if I had to keep an entire level on graph paper or something it would probably get pretty unwieldy pretty quickly. Also, we'd need some way of automating angles too. I think using the internal MMF animation angles should be enough.

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•