AGS 3D

Started by DoorKnobHandle, Sun 15/05/2005 15:21:53

Previous topic - Next topic

Darth Mandarb

Most excellent!  Thanks for the speedy replies!  Of course ... production of JP&CosmoII is on hold pending the completion of Occultas Veritas ... so that gives lots of time for this 3D stuff to develop and be perfected!

Steve - I thought AGS Mini-Golf was awesome ... this is even better!

Of course that gives me another idea.  You could use this to set up 3D terrained golf courses and actually make a golf game in AGS!!  How cool would that be!

The possibilities just keep occuring to me!


HeirOfNorton

I'm working on the DOOM-style texture-mapping myself (expect an update in the next day or two with it implemented, if all goes well.)

Quote from: Darth Mandarb on Sat 20/08/2005 21:35:57
lastly, would it be possible to use a background (starfield) that would loop/scroll (AGS can already do this) so that as Cosmo navigates around the scene the stars would be moving in the background?

I already have this sort of thing working, as long as you do not change the pitch of the camera (ie, look up or down). If you need to be able to rotate in any direction, then it becomes significantly more complicated to get right. If this is adequate, though, then I've already got it. It will be included as part of the AGS3D with Texture Mapping !!! mod that I'll be uploading soon.

HoN

GarageGothic

Quote from: HeirOfNorton on Sun 21/08/2005 05:34:19
Quote from: Darth Mandarb on Sat 20/08/2005 21:35:57lastly, would it be possible to use a background (starfield) that would loop/scroll (AGS can already do this) so that as Cosmo navigates around the scene the stars would be moving in the background?

I already have this sort of thing working, as long as you do not change the pitch of the camera (ie, look up or down). If you need to be able to rotate in any direction, then it becomes significantly more complicated to get right. If this is adequate, though, then I've already got it. It will be included as part of the AGS3D with Texture Mapping !!! mod that I'll be uploading soon.

This would pretty much be like a standard FPS skybox texture (I imagine that it would work as in Doom/Duke3D - that is no deformation when looking up/down). Basically this could be done as a big scrolling background, but there would need to be some code to connect the scrolling to the camera rotation.

Kweepa

#143
New version.
Mostly internal changes.
- in edit mode, can right click to select the object under the cursor (within 1000 units)
- uses n-gons for rendering rather than triangles
- clipping is performed in 3d

As a result of the above points, the script code to render is faster (probably about 50% faster) and much less complicated. Also, the wireframes in the selection mode look better.

Again, there may be bugs. Please let me know if you see anything unusual - except the sorting bug!

[EDIT] Link as before.

[EDIT2]
Added some functions:
SetWindow(int x, int y, int w, int h)
- sets the extents of the 3d window (can have a small window for faster rendering)
- doesn't clip the objects or characters so you need to draw a frame around it
SetCamera(float nearClipPlaneDistance, float fieldOfViewDegrees)
- hopefully self explanatory
The above can be called at any time, so you could change the FOV for special effects, or move or resize the window while playing.
SetPrimVisible(int i, bool visible)
- allows you to have collision only primitives
SetPrimGround(int i, bool ground)
- allows you to disable walking over primitives
- you still move above it, but the camera doesn't move up or down
- useful for small details on floors
SetPrimSolid(int i, bool solid)
- allows you to walk through primitives
- useful for small details on walls, and for slopes

[EDIT3]
I have noticed that pitching and banking an object distorts it. Fixed! Must remember to bracket everything. In AGS scripting -a - b == -(a - b)!
Still waiting for Purity of the Surf II

DoorKnobHandle

#144
Sounds great, but all I need is a link... ;)

EDIT: That's better. Awesome, the extra-speed especially!

monkey0506

Steve's latest has been my first version.  I must say, WOW!  Seeing as AGS was not built for 3D support, this is pretty good.  I mean, this is the stuff that the first 3D was made of.  Anyone remember games like Duke Nukem and Wolfenstein 3D?

1 complaint though.  I don't like falling off the edge of the world.  Watching Dixie shrink infinitely until she ceased to exist...it was more than I could bear. :=

But that's not to say I'm not having fun.  I just was playing around with, say, moving the ground out from underneath my feet.  Or moving it up above all the other objects then trying to land on one of them...

Gilbert

Quote from: monkey_05_06 on Mon 22/08/2005 01:14:37
S I mean, this is the stuff that the first 3D was made of.Ã,  Anyone remember games like Duke Nukem and Wolfenstein 3D?

No, what about the wireframe ancient games?

Jay

#147
This 3D ability is amazing. I check this thread every day! I can't wait until it's finished.
Just a couple things I noticed:
- There's something wrong with the underside of pyramids. It doesn't get rendered correctly.
- About the sorting bug: I noticed that when I experience the bug, if I click on where a primitive should be, then the correct primitive is selected, as opposed to the one that is wrongly sorted. Might this shed any light on how to fix the bug?

Other than that, this whole thing is very impressive! I hope HeirOfNorton's texture mapping goes well.

edit: Also, barring CJ updating AGS itself, couldn't someone just write a plugin that gives AGS3D the functions it needs to do textures, as well as even maybe RawDrawTransparent...() functions to allow for partially transparent shapes?

Kweepa

Quote from: Jay on Mon 22/08/2005 02:28:41
- There's something wrong with the underside of pyramids. It doesn't get rendered correctly.
Oops, thanks for noticing. Fixed in the uploaded version.

Quote
- About the sorting bug: I noticed that when I experience the bug, if I click on where a primitive should be, then the correct primitive is selected, as opposed to the one that is wrongly sorted. Might this shed any light on how to fix the bug?
Basically, no. :=
I know exactly why the sorting is wrong. It's just not easy to make it right.
The picking code uses an entirely different, extremely slow, method to find the closest primitive.

Quote
edit: Also, barring CJ updating AGS itself, couldn't someone just write a plugin that gives AGS3D the functions it needs to do textures, as well as even maybe RawDrawTransparent...() functions to allow for partially transparent shapes?
Yes, I/they could. But that would spoil the fun!
Still waiting for Purity of the Surf II

Rui 'Trovatore' Pires

It's such fun to read the first discouraging replies to this thread seeing the current achievements!

Steve, I dabbled a bit in it - very simple stuff, like remapping the keys to my liking, and I have a coupla questions/notes.

The up/down DEFINES seem to be reversed (I defined the UP key as W and DOWN as A, but ingame W made me move BACKWARDS and A made me move FORWARDS)

I tried to set it up so that LEFT and RIGHT rotated the camera instead, so I used "camera_rotation.x+=2.0" for rotating RIGHT. Instead of what I expected, it rotated UP. I'm sure there's a reason, but one would think that logically moving an X coordinate would make it go sideways, so I'm just curious as to why it is not so.

Physics don't apply to most primitives - in fact, they only apply to the camera. That is already kewl, but I can't help but wonder - will some primitives/characters/objects also, say, fall down when there is no floor below them? Or is that something we can self-script?
Reach for the moon. Even if you miss, you'll land among the stars.

Kneel. Now.

Never throw chicken at a Leprechaun.

Kweepa

Quote from: Rui "Brisby" Pires on Mon 22/08/2005 09:25:07
The up/down DEFINES seem to be reversed (I defined the UP key as W and DOWN as A, but ingame W made me move BACKWARDS and A made me move FORWARDS)

Oops. I'll fix that.

Quote
I tried to set it up so that LEFT and RIGHT rotated the camera instead, so I used "camera_rotation.x+=2.0" for rotating RIGHT. Instead of what I expected, it rotated UP. I'm sure there's a reason, but one would think that logically moving an X coordinate would make it go sideways, so I'm just curious as to why it is not so.

Heh. The camera is being rotated. The 'x' here refers to the AXIS OF ROTATION, which points to the (camera relative) right. So the view tilts up and down.

Quote
Physics don't apply to most primitives - in fact, they only apply to the camera. That is already kewl, but I can't help but wonder - will some primitives/characters/objects also, say, fall down when there is no floor below them? Or is that something we can self-script?

I'm planning to make falling physics an option for all primitives. It's expensive so it should be off by default and only switched on if you think it's necessary. It'll also be very limited. It'll just check if there's something marked "ground" in a direct line downwards from the center of the primitive (like the player/camera does).

Cheers,
Steve
Still waiting for Purity of the Surf II

Ishmael

Quote from: SteveMcCrea on Mon 22/08/2005 14:27:26
I'm planning to make falling physics an option for all primitives. It's expensive so it should be off by default and only switched on if you think it's necessary. It'll also be very limited. It'll just check if there's something marked "ground" in a direct line downwards from the center of the primitive (like the player/camera does).

Could you make elevator type of thingymambobs with this kind of logicalness or something else?
I used to make games but then I took an IRC in the knee.

<Calin> Ishmael looks awesome all the time
\( Ö)/ ¬(Ö ) | Ja minähän en keskellä kirkasta päivää lähden minnekään juoksentelemaan ilman housuja.

Kweepa

Quote from: Ishmael on Mon 22/08/2005 14:41:42
Could you make elevator type of thingymambobs with this kind of logicalness or something else?

You already can, for the player. To test it, just place a block, scale it down, stand on it, then select it in the editor and move it upwards. Obviously in a game you'd want to script the movement in the room's repeadly_execute.

Platform behaviour (moving left and right) won't work of course. I might try to do something about that.
Still waiting for Purity of the Surf II

Kweepa

Bump for a new version - finally fixed the sorting!
Of course there may be bugs in this implementation, and there's definitely room for speed improvement - please check it out and let me know.

Get it here!
Still waiting for Purity of the Surf II

Jay

It's good for the most part. After a bit of trying, I managed to break it in a few ways. Firstly, it seems like when I switch into move/scale/colour/rotate mode, some things aren't sorted correctly anymore. Also, the doorknob to the back room in Scid's is easy to notice sorting problems with. Lastly, I was able to get the second step (in the main room) to be drawn under the first step when I was at a certain angle, but I don't know how to describe it. It took a screenshot of it malfunctioning and it being fine (two slightly different angles), so that perhaps you can see the angle that broke it.
Hope that helps.

Gilbert

Quote from: SteveMcCrea on Tue 23/08/2005 05:05:07
Bump for a new version - finally fixed the sorting!
Of course there may be bugs in this implementation, and there's definitely room for speed improvement - please check it out and let me know.
[/url]
Hmmm strange, are collision detection, walk up ground objects, right click jumping disabled by default for this version? (I can even use pgup/down to fly, dive like the old versions now).

Anway, now, what you need to do is to import 4-direction character graphics and make them face the appropiate direction!

Kweepa

#156
Quote from: Gilbot V7000a on Tue 23/08/2005 11:31:44
Hmmm strange, are collision detection, walk up ground objects, right click jumping disabled by default for this version? (I can even use pgup/down to fly, dive like the old versions now).

Oops, yes they are. Press F6 to reenable.

Quote
Anway, now, what you need to do is to import 4-direction character graphics and make them face the appropiate direction!

That's next on the to do list (along with character movement)!
You read my mind!

[EDIT]
I haven't forgotten you Jay.
Thanks for the bug report - and the incredibly useful pictures!
I fixed it in the latest version, by making the sorting slightly more expensive.

Cheers!
Still waiting for Purity of the Surf II

Kweepa

#157
Bump for new version
- moving characters that can move from room to room (eg, talk to the Bum)
- view frustum culling
- even better sorting
- a FPS meter using Debug(4, 1)

Let me know if you encounter any problems!

http://www.steporg.com/step/ags/games/ags3d.zip

Edited by moderator, fixed the url. :=
Still waiting for Purity of the Surf II

Jay

#158
You're amazing Steve, I wish I had the skill to contribute to this.
After testing I found a sorting problem with Mika. After I first noticed it, it was a bit hard to duplicate, but I managed this screenshot (which is from a distance, but the first time I saw it it was closer).
Also, the ground is still always drawn last, and Scid's roof is still drawn first.
The last thing I noticed is that when I turn collisions off and move in the air, I can't land on the blue blocks or the yellow sphere when I turn collisions on again.

Oh - and there's a warnings.txt file that says "(in room 1): display_switch_out".

edit: I tried to get a better screenshot of the Mika thing, and when I did, I noticed that I think it might be an issue with her baseline. (see here)

Gilbert

Hehe it's fun watching Mika go, it would be great if I can talk to her. And that sliding "walk" of the bum is hilarious. ;D

I miss dixie...

SMF spam blocked by CleanTalk