AGS 3D

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

Previous topic - Next topic

Kweepa

Quote from: Rui "Brisby" Pires (a Furry) on Wed 31/08/2005 17:03:04
Sorry, I must not have been clear (or am just misunderstanding you): I'd like to know if there is a certain "formula" to calculate the most useful and precise scaling, based on the dimensions of the original sprite.
Not really, since the player has a collision box too. Just make a guess based on the coordinate system (the default unit is an inch, so a reasonable width is 24.0 and height is 68.0).

Quote
Nope, our lovely Rosella only has 4, the poor soul. I DID want to test the 8 loop thingie, but I didn't find any pre-drawn character with 8 loops, and was certainly not going to draw one...
Aah, I forgot to mention this in the manual - all loops in a view must have the same number of frames, since it remaps the loops depending on the orientation.

Quote
I think you've earned a credit in the manual by now.
And you're in.

I put a new version up with the camera position and collision tag accessors.
It also fixes the sorting bug (DOORHANDLE sorted in front of ROSELLA) you reported, and the sorting problems with objects and characters I mentioned.
I fixed the SetFirstPerson function and updated the manual.
Finally, I fixed the dependence on EGO that you reported and that I misunderstood totally before :)

So I think I've covered everything.

v1.05:
http://www.steporg.com/step/ags/games/ags3d.zip
Still waiting for Purity of the Surf II

strazer

#221
I'm not a big fan of #defines, so I would probably do

enum Ags3d_Filters {
  eAgs3d_Filter_Visible = 1,
  eAgs3d_Filter_Solid = 2,
  eAgs3d_Filter_Ground = 4,
  eAgs3d_Filter_All = 7
};

instead of

#define AGS3D_FILTER_VISIBLE 1
#define AGS3D_FILTER_SOLID 2
#define AGS3D_FILTER_GROUND 4
#define AGS3D_FILTER_ALL 7

Works better with the autocomplete, too.

Also, I think you should name the function parameters better, since they're the ones that the autocomplete shows:

  import static function SetCharacterPosition(int i, float x, float y, float z);

becomes

  import static function SetCharacterPosition(int charid, float x, float y, float z);

But I would even suggest making it a character pointer instead:

  import static function SetCharacterPosition(Character *thechar, float x, float y, float z);

since they're used primarily throughout the new AGS scripting style. (And you can still access the char's number in the function with the .ID property.)
This way users don't get confused that they suddenly have to use MIKA instead of cMika.

Edit:

And the doc still shows AGS 2.7 as minimum requirement. Isn't it v2.71?

Edit 2:

Btw, if you go the enum route, changing "int filter" in the parameter list to "Ags3d_Filters filter" pops up the autocomplete list the moment you enter the comma. More convenient methinks.

Gregjazz

There's some sorting issues with Scid's bar, if you stand at its corner and look around.

Gilbert

Also in the manual:
Quote- The game must be at 320x240 resolution and 16 or 32 bit colour

Actually I think it will work also if you set up your game to default at 640x480 (not tested though), since I always run the demo at 640x480 (it looks much nicer) and don't notice any extra glitches. :=

Kweepa

Quote from: strazer on Thu 01/09/2005 06:24:05
  enum Ags3d_Filters
  ...
Ã,  import static function SetCharacterPosition(Character *thechar, float x, float y, float z);
Oh, you evil evil man!
Couldn't you have mentioned this before I wrote up the documentation? :=
Sounds good. I guess I'm not up to speed on 2.7 programming...

Quote
And the doc still shows AGS 2.7 as minimum requirement. Isn't it v2.71?
You're probably looking at the .txt file which I removed from the latest zip.

Quote from: GeoffKhan
There's some sorting issues with Scid's bar
Aieeeeeeeee! Wow, this sorting is giving me trouble. Thanks for the report.

Quote from: Gilbot
I think it will also work if you set up your game to default at 640x480
Hmm, I think there's a difference between changing the resolution in the setup and in the editor. I'll need to test 640x480. I can probably just use Ags3d.SetWindow(0, 0, 640, 480) and it will work though.
Still waiting for Purity of the Surf II

HeirOfNorton

Looking at the script module, I just noticed that you have it licensed under the GNU GPL. Please correct me if I'm wrong, but wouldn't the GPL require that any games made with this module have THEIR source code released as well? While you can certainly do this if you wish (it is your module, and a wonderful one at that), this does seem rather strict. I've always preferred the LGPL for 'helper' libraries (like this) that are not, in themselves, complete programs.

HoN

Gregjazz

Quote from: SteveMcCrea on Thu 01/09/2005 14:44:37
Quote from: GeoffKhan
There's some sorting issues with Scid's bar
Aieeeeeeeee! Wow, this sorting is giving me trouble. Thanks for the report.

Yeah, and I just noticed it this latest version. The previous version (I update versions like every day or whenever you post) I don't think had that problem. I usually run around and jump and do strange things.

Kweepa

Quote from: HeirOfNorton on Fri 02/09/2005 05:07:28
Looking at the script module, I just noticed that you have it licensed under the GNU GPL. Please correct me if I'm wrong, but wouldn't the GPL require that any games made with this module have THEIR source code released as well? While you can certainly do this if you wish (it is your module, and a wonderful one at that), this does seem rather strict. I've always preferred the LGPL for 'helper' libraries (like this) that are not, in themselves, complete programs.

HoN

Ack, I just copied that from the template that RickJ wrote.
Yeah, the Lesser GPL makes more sense.
I'll change it for the next version.
Which is taking a long time!
Still waiting for Purity of the Surf II

Gilbert

Quote from: SteveMcCrea
Hmm, I think there's a difference between changing the resolution in the setup and in the editor. I'll need to test 640x480. I can probably just use Ags3d.SetWindow(0, 0, 640, 480) and it will work though.
Well, as far as I know actually it's not much difference apart from the warning message in the setup file.
Remember, in 640x480 the game coordinates are still 320x240 only, so you probably don't need ANY change, and for full screen it should be still SetWindow(0,0,320,240) I think.

Kweepa

Version 1.06 is up.
strazer's comments haven't yet been implemented.
Nor has the license changed.

I just overhauled the sorting. It's much slower (50%) but much more accurate.
For the curious, the sorting now works as follows:
- precache best split planes for static objects
- for each object, find objects that must be drawn first using convex overlaps and split planes
- a stack based iteration over the resulting DAG (directed acyclic graph)
Worst case on my machine is 20FPS.

http://www.steporg.com/step/ags/games/ags3d.zip
Still waiting for Purity of the Surf II

HeirOfNorton

You just need to add a BSP tree.  ;D

Somewhat more seriously (but please bear in mind that I have practically zero experience and only slightly more knowledge about 3D programming)...

Could it help any if you added a movable flag to all the AddSprite functions, and only allow the ones with this flag set to have their position/rotation/etc. changed after initial placement? That way, all the only that are unmoveable could be pre-sorted (to some extant) when the "level" first loads. Or am I way off on how this works?

HoN

Kweepa

#231
I did consider a BSP (and an octree), but this works out better - BSPs are slow to recalculate and any extra object splitting is expensive.
The movable flag is basically how it works right now :) - except that it's automatic. If you move/scale/rotate a primitive (including sprites) it marks it for recalculation. It might help to precache sorting info for non-moving objects and characters. I'm certainly considering that.
Cheers,
Steve
How's the texture mapper coming along?

[EDIT] Up to 1.07, with strazer's changes and a LGPL, plus a ClipRange for primitives to increase performance.
[EDIT] Up to 1.08, with some minor fixes.
Still waiting for Purity of the Surf II

HeirOfNorton

Quote from: SteveMcCrea on Sun 04/09/2005 16:39:16
The movable flag is basically how it works right now :)

Yeah, I figured that out about half an hour after posting, while looking through the more-recent code. Silly me, posting before I've actually read the important parts.  :-\

Quote
How's the texture mapper coming along?

Slowly. Right now I'm re-doing some of the code to better match the current state of Ags3d. I'm gonna fiddle with it some more, and I'll post whatever I have (working or not) sometime tomorrow and get other folks' input on it.

HoN

Kweepa

Here's a screenshot from v1.08:



It's a little slow in places but I've got some ideas for speeding it up.
Still waiting for Purity of the Surf II

DoorKnobHandle

Looks awesome, keep it up.

I still like the idea of writing a model importer for AGS 3D, although I don't have the time right now at all. So if anybody is up to that, it would be cool and just another big feature. We could either work on being able to import for example .3DS, .OBJ, .MDL or .MS3D model files ( or all of them ;) ) or we could create a new AGS 3D model file, although I'd love to give 3d artists that work with common tools like 3D Studio Max, Lightwave, Maya, Milkshape or Blender the possibility to import their work directly. Of course AGS 3D would only load the point/vertice information and not the texture/material stuff etc. Maybe to replace textures we could add a parameter to the LoadModel function, that determines the model's overall color ( the function could look like this for example: LoadModel ( string Filename, color Color ); ). So you could load a model file, that is placed into the game's folder and have it all one color ( maybe even include one color for every polygon )...

So to summarize all this I personally think it wouldn't be a very hard or time-expensive job to allow importing of a standard model file format that almost all tools can export to ( like .OBJ ).

Kweepa

A model importer wouldn't be difficult, but Ags3d as it stands can only accurately render convex (or certain limited concave) shapes.
Still waiting for Purity of the Surf II

Redwall

That's just like most games, right? From my memories of HL mapping anything concave had to be split into convex shapes to work properly.
aka Nur-ab-sal

"Fixed is not unbroken."

Rui 'Trovatore' Pires

Reach for the moon. Even if you miss, you'll land among the stars.

Kneel. Now.

Never throw chicken at a Leprechaun.

Kweepa

I knew I should have mentioned that some objects are drawn first.
The plan is to change room before you can get into that situation.
Still waiting for Purity of the Surf II

auhsor

Nice!

Is it just me or is the Invert Mouse option not working any longer. And you probably know, but there are some speed issues with this one, especially when walking behind the buildings. Oh and another very minor thing - the position when you come out of Scids causes some clipping on the wall that normally isn't there when you walk against it.

SMF spam blocked by CleanTalk