3D Python Camera

This forum is currently in read-only mode.
0 favourites
From the Asset Store
Simple and easily editable template for a dynamic camera that zooms in and out based on how far apart the players are.
  • This is another little 3d experiment of mine. I had a bit of fun toying around in python and got this. However, I'm concerned with the speeds I'm getting, wondering if it's just my computer, Construct itself, the 3DBoxes themselves, python, or just my own bad programming killing speeds. Right now I'm doing 60-80fps, and taking away all but a few objects only yields about a 40fps gain.

    Anyway...link: dl.dropbox.com/u/10316081/Construct/3DEngTest/3DEngTest.rar

    Mouse angles camera

    WASD Movement

    QE   Elevation

    Edit: Would everyone be kind enough to tell me what kind of speeds they're getting?

    Edit 2: The cap, dl.dropbox.com/u/10316081/Construct/3DEngTest/Python3dtest.cap

    You will need lucid's mousemovv plugin

  • I'm getting around 120fps, dipping every so often to 117-119.

    Geforce 1GB 9800GT, AMD X2 Dual 6000+ 3.11 GHz, 4GB RAM.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 100 +/- 3 at all times. Amount of objects doesn't matter i.e. it's still ~100 even looking at an empty space.

  • stuck at 60.

    Intel Pentium T4300 2.1 GHz, NVIDIA GeForce G105M, 4 gb RAM.

    This isn't to be taken seriously, tough, since this PC is overheating as crap. Tomorrow I'll post my results on my new machine. <img src="smileys/smiley2.gif" border="0" align="middle" />

    -velo

  • Very, very nice, this is amazing! I was getting between 60 and 78 fps.

  • Some of the stuff you people do never ceases to amaze me. 215fps with nothing; 201-205 with most objects visible. What are you aiming for?

  • I'm not aiming for anything in particular, I'm mainly trying to see how many resources this kinda construct game would consume*. As I mentioned, this exe uses python. I would like to also make another version of the exe that only uses events, then see if one performs better than the other.

    *Part of what I'm working is a 3d framework for games, so I guess you could say I'm aiming for something that's ultimately functional (60fps on a mid sized level), but also easy to edit. Once I get more of it done, I'll may post caps.

  • 60 fps constant

    Geforce 6200(256), P4 3GHZ, 2G RAM.

    I would love to know how you achieve the mouse\ rotate camera thing. <img src="smileys/smiley5.gif" border="0" align="middle" /> <img src="smileys/smiley19.gif" border="0" align="middle" />

  • about 80-90 FPS

    with a 2 GHZ and a geforce 9600M GT

    hmm maybe using some sort of occlusion culling could help the FPS <img src="smileys/smiley20.gif" border="0" align="middle" />

  • 40fps or above, on a GeForce G210(512MB) with a 2.8GHz P4 and 2G RAM.

    Pretty sweet, I'd love to see the math you've used to do this.

    As a test, it might be worth seeing if using 3D models with a box obj model instead is faster.

  • Went ahead and posted the cap in my first post for those who are interested.

    Anyway this cap relies on a formula I'm not even completely sure how it works, but it does. The formula can be found here.

    Obviously, a few tweaks were made since this formula is meant to give the location of points, not objects with rotations; not mention the formula makes the center (0,0) instead of the top left. The formula for rotations was mostly guesswork, although it wasn't much different than it was for the single-axis-3dcameras that occasionaly permeate this board.

    I should mention,there's a bit of a bandaid coding with camera pitching. The camera actually starts pointed at the sky (Or is it the ground?), if you catch my drift. It was a bit easier to code that way.

    One of the big downsides to having a psudo-camera is that is makes rotating objects on a world basis with more than just yaw a huge challenge to implement with the tools construct offers. Since world rotations come before camera induced ones and construct is limited to a yaw-pitch-roll order of rotations, you can sanely do Yaw(Wld+Cam)-CamPitch, but not Pitch(Wld)+Yaw(Wld+Cam)+Pitch(Cam).

    Python and Speed

    Python has really been a timesaver, it's kinda nice being able to find and replace small parts of code without turning all of it into a warzone. The other great thing is that done right, it works with families, so I could possibly even make a formula and apply it to all 3d objects, sprites, and boxs, with only 3 lines of code.

    Although from what I've heard, behaviors and plugins are the faster and less intensive. So I would probably say that any large project would definitely need them, either that or real 3d camera support.

    chris, I would really like to see what inventive thing you cook up with this, and I would have no problem elaborating further on this and some other little experiments I've done if you're interested. <img src="smileys/smiley4.gif" border="0" align="middle">

  • Thanks for sharing his Yarfapet.

    Im gonna see if a can work how the math works. <img src="smileys/smiley4.gif" border="0" align="middle" />

    One thing i did get was an error message when i clicked on(selected) one of the 3d boxes(not during runtime)...but it doesnt crash, it just gives a warning?

  • Thanks for sharing his Yarfapet.

    Im gonna see if a can work how the math works. <img src="smileys/smiley4.gif" border="0" align="middle" />

    One thing i did get was an error message when i clicked on(selected) one of the 3d boxes(not during runtime)...but it doesnt crash, it just gives a warning?

    What did the warning say?

  • I got an error also. It says:

    "Error in Private Variables. The selected Object Type has 1 variables(not my spelling mistake!) but the selected instance has 2. Please report the bug to Scirra."

    It happens when you click on WWall2.

    zen

  • Sorry..I should have included it in my post, but it's the same as error that Zeno98 is getting.

    The cap still WORKS, but if you try and alter the position of WWall2,

    it triggers the error.

    Do i have to install any extra files to run caps that use python?

    <img src="smileys/smiley5.gif" border="0" align="middle" />

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)