dim3 Forum

dim3 Announcements => dim3 Versions => Topic started by: ggadwa on July 02, 2014, 07:04:07 AM

Title: dim3 v24 Release
Post by: ggadwa on July 02, 2014, 07:04:07 AM
Next release, this list isn't big but the things I've done represent a lot of updates to important parts of the system.  The rag dolls are pretty preliminary, they need a lot more bone information to work properly, but all the important math and animations are there.  Transparency is better handled, but as described before, it'll be slower on modern system and won't always be perfect (no real time system is.)  A lot of stuff in the auto-generator, a lot of small fixes in Editor.

The demo project is still the same.

OS X: http://www.klinksoftware.com/download/dim3_0024.zip
Windows: http://www.klinksoftware.com/download/dim3_0024_win32.zip
Data: http://www.klinksoftware.com/download/Data.zip

Code: [Select]
Engine
 * initial rag doll support
 * animation changes automatically smoothly reset rag dolls
 * fixed a crashing bug where removed projectiles could have remaining pointers in hit structures
 * joining now has a custom host tab for hosts not in the host list
 * static chase camera needs same > 180 to negative X flip as regular chase camera
 * models are now transparency sorted
 
Scripting
 * added xxx.model.animation.ragDollStart(forcePos,force,needReset,msec) to start rag dolls
 * added xxx.model.animation.ragDollRandom(needReset,msec) to start random rag dolls
 * added xxx.model.animation.ragDollClear() to clear rag doll changes

Editor
 * "rotate polygon UV" was mislabeled "reset polygon UV" in the menu
 * goto selection now rise up or down if view is top/bottom
 * deleting/adding texture frames, light/reflection maps texture changes all speed up
 * tons of auto-generator additions and updates
 * OS X scrolling works better when zoomed out (was OK on windows)
 * some fixes to the set mesh normal in/out functions
 * models are now transparency sorted
 * model texture palette changes
    * reflects any selected polygons
    * click a texture resets it to any selected polygons

[>] Brian
Title: Re: dim3 v24 Release
Post by: c^5 on July 07, 2014, 12:08:02 AM
I'm out of town so I haven't had much chance to mess with this version, but I quickly scripted the demo's bots to ragdoll when they die. Very cool, I look forward to seeing it finished!
Title: Re: dim3 v24 Release
Post by: Koridar on July 10, 2014, 09:48:45 AM
For some reason in the Animator, clicking on a texture now defaults to polygon select mode, making it impossible to select vertices via textures. Haven't had the chance to play with it much lately, but looks good so far!
Title: Re: dim3 v24 Release
Post by: ggadwa on July 10, 2014, 09:50:18 AM
For some reason in the Animator, clicking on a texture now defaults to polygon select mode, making it impossible to select vertices via textures. Haven't had the chance to play with it much lately, but looks good so far!

That was intentional, but I didn't realize people were using it the other way.  That was to help so you can change textures, because it allows people to swap in and out transparent textures to speed things up.  I'll have to think about putting that back, or having something else in there.

[>] Brian
Title: Re: dim3 v24 Release
Post by: Koridar on July 10, 2014, 06:52:39 PM
That was intentional, but I didn't realize people were using it the other way.  That was to help so you can change textures, because it allows people to swap in and out transparent textures to speed things up.  I'll have to think about putting that back, or having something else in there.


Ahh, I just noticed this. Very nice indeed! It probably would be best to allow for both; I usually use vertex select if I'm copying a mesh and want to delete portions of it, as it can be annoying to manually select all those polys....


Still, awesome work!
Title: Re: dim3 v24 Release
Post by: ggadwa on July 28, 2014, 10:48:47 AM
FYI: For the next couple days (as of 07/28/2014) don't update any code from the archive, I'm mass moving around some things to prepare for the next update (it's been slow going stuff has been getting in the way) so any code you update won't compile.  Should be normal again in a couple days!

[>] Brian
Title: Re: dim3 v24 Release
Post by: ggadwa on August 12, 2014, 08:28:03 PM
The archives should be fine again, and I'll be back to bug fixes and updates soon, but here's an entertaining screenshot.  Remember, I'm working on creating a game that is completely auto-generated, and here's the very first pass (most of this is temporary, just laying the groundwork) for auto-generated monsters.  The model and textures are all auto-generated.

(http://www.klinksoftware.com/screenshots/ag_model.png)

His tangent spaces are a little goofy (therefore the weird gray color) and he's pretty simple, but at least he's constructed procedurally!

I need to work on auto-generating the bones, which will go a long way to more shapes for monsters, but it's a start.

[>] Brian
Title: Re: dim3 v24 Release
Post by: DomReardon on August 18, 2014, 12:01:07 PM
I love the idea of auto generated monsters! This guy definitely has a certain charm, be interesting to see how far this can go.
Title: Re: dim3 v24 Release
Post by: ggadwa on August 19, 2014, 06:35:01 AM
I love the idea of auto generated monsters! This guy definitely has a certain charm, be interesting to see how far this can go.

I don't think it'll equal your work, though :)

[>] Brian
Title: Re: dim3 v24 Release
Post by: Logan on August 19, 2014, 11:23:41 AM
Oh man, that's going to be fun to play around with. Is it a tool in the editor? Or is he generated on load?
Title: Re: dim3 v24 Release
Post by: ggadwa on August 19, 2014, 11:38:45 AM
Oh man, that's going to be fun to play around with. Is it a tool in the editor? Or is he generated on load?

In the editor, there's auto generators for map textures, a map, model textures, and a model.  The map one can make good stuff, but the model one is really new and simple, and neither are up to par yet.  Eventually, I'll make a special game where you start it, push a button and it makes a bunch of maps, monsters, weapons, etc, and creates a game on the fly for you to play.  That's way off in the distance, though, I'm just putting together some starting points.

[>] Brian
Title: Re: dim3 v24 Release
Post by: DomReardon on August 19, 2014, 04:04:52 PM
So is it a modular kind of model build? I'm yet to experiment with it, but intrigued as to how it works, I'll have a play around to see what I can achieve with it. This is a very cool way forward for Dim3, I think. The concept of an engine that can make games itself is utterly awesome. The only way I can conceive this working is with a kind of modular build, so everything is in chunks, so maybe a bot has 10 physical chunks- torso, head arms, etc, and maybe 10 script chunks- attack player, follow player, do a little dance, etc...
Somehow, I suspect that this is not how you have it working, and that you're doing something even more interesting...
Title: Re: dim3 v24 Release
Post by: ggadwa on August 20, 2014, 07:44:31 AM
I tried modular a while ago, and it's cool, but I want something truly random.  Right now, for maps, it creates random polygons and connects them together into a map, and then populates it with random real world items (like additional walls, or pillars, or rubble) and additional random floors and doors.  There is still a sameness that can happen, but the real world is that way too, most warehouses look the same.

For the models, I'm building bones, and then skinning around the bones.  The map stuff is getting there, but the model stuff is just terrible right now, I'm still feeling out my way into doing this.  I think I finally have something interesting that only I'm doing, or at least to this degree.

[>] Brian
Title: Re: dim3 v24 Release
Post by: c^5 on August 20, 2014, 03:54:51 PM
I could see this being really cool as a prototyping tool. Say you had an idea for a combat mechanic--you could auto generate a world and characters and test out the mechanic easily without having to spend a while building bad throw away stuff that doesn't feel like a real game just to test.
Title: Re: dim3 v24 Release
Post by: ggadwa on October 10, 2014, 10:21:02 AM
After a long time of puttering around, and experimenting, I think I'll be moving forward with making a new game, one that is all auto-generated, so that's where I'm going to be putting my time on dim3.  Got some cool stuff coming up, but I'm going to concentrate on the map creation at first.

[>] Brian
Title: Re: dim3 v24 Release
Post by: Logan on December 11, 2014, 12:00:21 PM
Can you add subfolder support for sounds? I like to have them organized by type, such as UI, Enemy, Weapon, etc
Title: Re: dim3 v24 Release
Post by: ggadwa on December 12, 2014, 10:17:39 PM
Can you add subfolder support for sounds? I like to have them organized by type, such as UI, Enemy, Weapon, etc

It should be supported now.  In editor, if you double-click on the "wave" property of the sound, it should show you all the folders in the sounds folder, and you should be able to pick the wav from there.

[>] Brian
Title: Re: dim3 v24 Release
Post by: Logan on December 12, 2014, 11:54:06 PM
What about through script or XML?
Title: Re: dim3 v24 Release
Post by: ggadwa on December 15, 2014, 06:09:00 AM
What about through script or XML?

The stuff you see in Editor -- which basically hooks up a wav to a name -- is meant to make all that opaque.  So in Editor if you hook up a name, say "laser blast" to "weapons/lasers/blast.wav" (a wav in a sub folder in sounds) then from everywhere else, "last blast" works.  There's no hierarchy for names, though.

[>] Brian
Title: Re: dim3 v24 Release
Post by: Logan on December 15, 2014, 10:44:00 AM
What about through script or XML?

The stuff you see in Editor -- which basically hooks up a wav to a name -- is meant to make all that opaque.  So in Editor if you hook up a name, say "laser blast" to "weapons/lasers/blast.wav" (a wav in a sub folder in sounds) then from everywhere else, "last blast" works.  There's no hierarchy for names, though.

[>] Brian

Ohhh... Okay, thanks. I had forgotten about the Setup module.  :o
Title: Re: dim3 v24 Release
Post by: ggadwa on December 16, 2014, 07:13:11 AM
Note that all those modules have been combines into one: Editor.  So there's basically just Editor and Engine now.

[>] Brian
Title: Re: dim3 v24 Release
Post by: ggadwa on December 16, 2014, 08:19:00 AM
Some more and better randomized models:

(http://www.klinksoftware.com/screenshots/ag_model_3.png)

Obviously, long, long way to go.  But everything, from the texture to the model was all randomized.

[>] Brian
Title: Re: dim3 v24 Release
Post by: Galavant Garde on December 16, 2014, 02:17:18 PM
Randomised models!!  ARGH how cool  ;D
Title: Re: dim3 v24 Release
Post by: Galavant Garde on November 24, 2015, 12:06:44 PM
Oh hey Brian, I'm up to my old tricks again...can't remember which version you did it in but you changed a bunch of things including allowing making particle constructors from objects i.e. obj.position instead of obj.position.x,obj.position.z,obj.position.y.  Anyway in that version (21 or 22 I believe) my engine launched fine with all my projects but since pasting v24 over the top of said version it crashes on launch and I can't work out why.

Does this give you any hints so I can know where to look?  I get the crash with all my projects, not just one in particular so I'm a little stuck

Code: [Select]
Process:               dim3 Engine [6659]
Path:                  /Users/USER/Downloads/*/dim3 Engine.app/Contents/MacOS/dim3 Engine
Identifier:            com.klinksoftware.dim3.engine
Version:               dim3 Engine version 3.0 (3.0)
Code Type:             X86 (Native)
Parent Process:        ??? [1]
Responsible:           dim3 Engine [6659]
User ID:               501

Date/Time:             2015-11-24 19:55:54.545 +0000
OS Version:            Mac OS X 10.11.1 (15B42)
Report Version:        11
Anonymous UUID:        1E87EE59-FBF2-C09B-29F8-D32B60C937A6

Sleep/Wake UUID:       63F4F174-FF35-45B1-905C-217DAB315C9D

Time Awake Since Boot: 200000 seconds
Time Since Wake:       4800 seconds

System Integrity Protection: enabled

Crashed Thread:        0  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_ARITHMETIC (SIGFPE)
Exception Codes:       EXC_I386_DIV (divide by zero)
Exception Note:        EXC_CORPSE_NOTIFY

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   com.klinksoftware.dim3.engine 0x000b8332 0x1000 + 750386
1   com.klinksoftware.dim3.engine 0x0003ef4e 0x1000 + 253774
2   com.klinksoftware.dim3.engine 0x000b102e 0x1000 + 720942
3   com.klinksoftware.dim3.engine 0x000d1c1f 0x1000 + 855071
4   com.klinksoftware.dim3.engine 0x0003f56d 0x1000 + 255341
5   com.klinksoftware.dim3.engine 0x0003f939 0x1000 + 256313
6   com.klinksoftware.dim3.engine 0x00002c35 0x1000 + 7221

Or alternatively can you post a link for versions 21 and 22 so I can get back into my projects and start troubleshooting?
Title: Re: dim3 v24 Release
Post by: ggadwa on November 25, 2015, 07:59:01 AM
Oh hey Brian, I'm up to my old tricks again...can't remember which version you did it in but you changed a bunch of things including allowing making particle constructors from objects i.e. obj.position instead of obj.position.x,obj.position.z,obj.position.y.  Anyway in that version (21 or 22 I believe) my engine launched fine with all my projects but since pasting v24 over the top of said version it crashes on launch and I can't work out why.

I don't know if I kept around any compiles that old, but I'll check.  Could you put up a copy of your project so I could try to run it?

[>] Brian
Title: Re: dim3 v24 Release
Post by: Galavant Garde on November 30, 2015, 04:34:35 AM
Worked it out  ;D not having a bitmap assigned for a loading animation will cause the engine to try divide 0 by 0 and crash.

Now that I've gotten that sorted, something odd is happening with Cinemas.  When they end, the camera puts itself at 0,0,0 on the map instead of reattaching to the player.  Even if I camera.state.save; just before the cinema starts then camera.state.restore; when the DIM3_EVENT_INTERFACE_CINEMA_DONE subEvent is received the camera is still stuck at 0,0,0 and the player is still where they were before the cinema started.  Is that likely something I'm doing or a possible engine bug?

EDIT:  I found a workaround - when the DIM3_EVENT_INTERFACE_CINEMA_DONE subEvent is received I can switch to a different camera view type then back to FPP immediately afterwards and it reattaches the camera to the player.  I'm guessing if I have to do this kind of manual switch it's a bug right?
Title: Re: dim3 v24 Release
Post by: ggadwa on December 01, 2015, 06:16:27 AM
That's more than likely a bug, the camera should return to the state it was in last.  Re-attaching the camera resets it, though, so that's a good workaround.

[>] Brian
Title: Re: dim3 v24 Release
Post by: `teh1 on December 01, 2015, 04:32:07 PM
Random thought... it would be cool if you could just set functions to each event/subevent. I wonder if it would be faster, too...

event.interface.camera_done = function(param1, param2){//do stuff;}

That's kind of the more modern approach using Javascript, I think. And much more easily understood by folks 'n' blokes.
Title: Re: dim3 v24 Release
Post by: Imon on December 02, 2015, 06:23:53 PM
Random thought... it would be cool if you could just set functions to each event/subevent. I wonder if it would be faster, too...

event.interface.camera_done = function(param1, param2){//do stuff;}

That's kind of the more modern approach using Javascript, I think. And much more easily understood by folks 'n' blokes.

do stuff;}
Title: Re: dim3 v24 Release
Post by: ggadwa on December 04, 2015, 06:04:14 AM
Random thought... it would be cool if you could just set functions to each event/subevent. I wonder if it would be faster, too...

event.interface.camera_done = function(param1, param2){//do stuff;}

That's kind of the more modern approach using Javascript, I think. And much more easily understood by folks 'n' blokes.

That's the way it should have been done.  I was kind of learning stuff as I went, and did some stuff in a very older more global way.

[>] Brian
Title: Re: dim3 v24 Release
Post by: Galavant Garde on January 03, 2016, 02:21:50 PM
Hey Brian with all that ray tracing stuff you've been working on, what do you think about making ray-tracing lighting?  Or even a ray-tracing sun that you can add lens flare halos to?
Title: Re: dim3 v24 Release
Post by: ggadwa on January 04, 2016, 06:17:12 AM
Hey Brian with all that ray tracing stuff you've been working on, what do you think about making ray-tracing lighting?  Or even a ray-tracing sun that you can add lens flare halos to?

That was neat stuff, but there just isn't the computing power for that.  The lightmapping phase IS ray tracing (they all are.)  Just done off-line and built into textures.  That's an area I'm working on speeding up right now but don't know how far I can take it without severely reducing the quality, it's just a really complex and long operation.

[>] Brian
Title: Re: dim3 v24 Release
Post by: Galavant Garde on January 05, 2016, 01:46:59 PM
Ahso cool, I might try some cheap tricks for now like making models shaped like cones of light with translucent textures and see how that looks, and put some lights in them that get skipped when baking light maps...it may or may not look terrible but could work
Title: Re: dim3 v24 Release
Post by: ggadwa on January 05, 2016, 01:52:58 PM
FYI: Got some fun stuff coming.  Mostly working on clean up and code optimization right now as that's gotten away from me as I am building a lot of stuff from scratch.  I'm decided to simplify the shapes that make maps; two many wild shapes made to many similar things, so I'm making maps out of combing 3 simple shapes; a box, a half circle, and a slanted box.  Those together will probably cover 99% of reality, and then I decorate them and combine them.  They make different shapes by being connected to one another instead of canned weirdness.  It's a better system then the current system.

Also, better light mapping.  A bunch of speed-ups in generation (light mapping is faster but it'll never be lightening fast).  Lots of bug fixes -- for instance text was never drawing right now it's shadowed and always on-top.  Tons of code clean-up, a concatenation of all the various settings into a single editable file, etc.

I added a 2D overlay map so I could more closely monitor what was being generated, and a whole bunch of debugging operations.

Again, very early, very pre-alpha, and still just a lot of experimentation, but it seems to be actually started to form into something!

[>] Brian
Title: Re: dim3 v24 Release
Post by: ggadwa on January 08, 2016, 10:08:16 PM
New version!

http://www.klinksoftware.com/ws/

Just refresh the browser to get a completely new map/models/textures.  There's not a lot done on models here, most of the work I did this time was on map generation, code clean up, and speed ups.  Things I've done:

Generates much better, a more complex (and more open) maps -- there's a bit more light pop in because of this, though
There's normal culling (sometimes the normals aren't perfect on the models) and more speed ups
Things like map building and light maps creation are 2-3 times faster
Improved text drawing routines
Add overlay map (eventually it'll be something you can turn on/off, it's really for debugging map creation.)
There's 3 model body types now (blob, humanoid, and animal.)  Not much else has been updated here
Tons of code clean up and bug fixes

I'm going to keep plugging away but eventually I'm going to have to pull some browsers until they have better support -- for instance, both chrome and firefox have the html5 full screen relative mouse mode, but safari doesn't.  Things like that are a long way off, hopefully support will catch up to what I'm doing!

[>] Brian
Title: Re: dim3 v24 Release
Post by: `teh1 on January 09, 2016, 08:46:49 PM
Pretty laggy/choppy. Comes and goes. But I'm still impressed that it looks this good being fully web/js.
Title: Re: dim3 v24 Release
Post by: ggadwa on January 09, 2016, 10:10:37 PM
Pretty laggy/choppy. Comes and goes. But I'm still impressed that it looks this good being fully web/js.

Yeah, that's actually not webgl/js, all that stuff ones pretty fast.  It's the timing system.  I might have to switch it.  It comes and goes through something I don't quite understand yet.  I'm using a new html5 events spec, and it just has a problem sending me events for a couple seconds, and then suddenly it's back.

It might be my bug, but I haven't been able to track it down.  I think it's associated with the browser redrawing something elsewhere.

[>] Brian
Title: Re: dim3 v24 Release
Post by: Galavant Garde on January 10, 2016, 10:48:08 AM
Looks good!  8) there was only one bit of map geometry that messed up (a staircase diagonally cut off by a wall) which is pretty good for a randomly generated map!  Is it just me or do the light maps and textures look better?  Love the map BTW
Title: Re: dim3 v24 Release
Post by: ggadwa on January 11, 2016, 07:02:20 AM
Looks good!  8) there was only one bit of map geometry that messed up (a staircase diagonally cut off by a wall) which is pretty good for a randomly generated map!  Is it just me or do the light maps and textures look better?  Love the map BTW

There's been a lot of general improvement here or there.  And note that there's a lot of random texture types, so refreshing the page might get you a completely different texture type for things.

[>] Brian
Title: Re: dim3 v24 Release
Post by: ggadwa on January 21, 2016, 09:04:57 AM
FYI: I've gotten extremely busy at work but I'm plowing away at this in the background.  It's good to be paused for a second because I'm still waiting for a lot of ECMAscript6 to hit some of the browsers!

I want to get some more work done on the models, then work on it constructing machine models (like weapons) and then try to get some pseudo game play in there (monsters attack, you get a random weapon to shoot, projectiles, etc.)

Try to get in a lot of system, and then just start the slow process of figuring out better and better generation routines, which is the whole point of the project!

[>] Brian
Title: Re: dim3 v24 Release
Post by: ggadwa on January 22, 2016, 10:02:39 PM
I updated the version on-line, as always, at: http://www.klinksoftware.com/ws/

There is nothing new creation wise in this one, BUT, I fixed a bunch of dumb things I did.  I was tending to still think of WebGL in a C, OpenGL way and ended up triggering massive GCs.  All this has been cleaned up.  The code should have a super solid high frame rate now, I can get around 40 fps.  Granted, there isn't a million polygons here, but it's all in Javascript.

That's why some of you were having bad performance.  I'll know better next time!

Just wanted to update so if anybody stumbles upon it, it'll be running fast until I can get new stuff up there.

[>] Brian
Title: Re: dim3 v24 Release
Post by: ggadwa on January 29, 2016, 12:31:14 PM
FYI: While waiting on Firefox to release a version that handles classes (really syntactical sugar but it'ls optimal for me) I'm just hitting parts here and there, no real direction of work at this point.

I'm developing some new dynamic creature textures -- I have a pretty cool fur, scales, and kind of a terrible leather-y doom monster like texture that I'll probably redo.  Doing a bunch of work on the dynamic models.  I have the start of a dynamic weapon model builder (just makes a single tube now, but the stubs are in.)  Started weapons and will start projectiles after that.  Misc. bug fixes, etc.

[>] Brian
Title: Re: dim3 v24 Release
Post by: ggadwa on February 04, 2016, 11:17:38 AM
Next version will have v2 of my map generator.  I like what the first version was doing, but it made pretty constrained maps (and maps with too many dark areas) and very unrealistic maps, and it looked like it was canned.  So I'm trying something new, using things I learned on v1.

[>] Brian
Title: Re: dim3 v24 Release
Post by: ggadwa on February 20, 2016, 11:42:54 AM
Current Progress:

* a whole lot of optimizations, especially tricky with javascript and avoiding GC (means a lot of giant buffers for data!)
* version 2 of the map generator is done
* version 2 of the model generator is done -- still a long way to go but I'm starting to get neat stuff out of both of these
* got the start of the weapons engine
* got the start of the projectile engine
* created the particle engine
* lots of physics updates and fixes
* got most of the entity system (anything not a map, like monsters, the player, when I have doors and such, are entities)
* misc bugs fixes and such

I'll probably update the web copy right before I start the major emcascript 6 update to use classes (which will be another code and hopefully optimization win) when the next firefox comes out (firefox is the one lagging with out of the box class support.)

[>] Brian
Title: Re: dim3 v24 Release
Post by: ggadwa on February 23, 2016, 02:51:50 PM
More FYI, and this will need to be on a separate thread: Sometime early in March FF 45 comes out, and that'll have class support, which is the last big thing I need to re-optimize the code (and work on some of the GC pauses.)  I wrote most of the code in anticipation for classes and that means un-optimal objects, which the classes will clean up.

When that happens, I'll put out another copy that will be playable.  You'll get to kill monsters :)

[>] Brian
Title: Re: dim3 v24 Release
Post by: Galavant Garde on February 24, 2016, 08:26:39 AM
Hey Brian could I possibly request a feature??  8)

Being able to check the location of a sound.  For example, using the watch event you can currently identify what sound you heard.  Wouldn't it be cool if you could also find out where the sound played so an enemy could wonder in that direction to investigate  ;D

It's kind of already possible in that I could get the script making the sound to call the game script with it's current location and save it to a variable, then get the listening script to call the game script to ask for the location of the sound...that's pretty clunky tho
Title: Re: dim3 v24 Release
Post by: ggadwa on February 26, 2016, 07:58:01 AM
If the object that got the watch event was "obj", then:

obj.watchPosition (x,y,z) should be the position of the sound.  You can also get the object that made the sound (obj.watch.objectId) and then look up the object to track it.

[>] Brian
Title: Re: dim3 v24 Release
Post by: Galavant Garde on February 28, 2016, 04:37:13 AM
Oooooh didn't see that, ace  ;D thanks Brian!!
Title: Re: dim3 v24 Release
Post by: ggadwa on March 03, 2016, 10:47:26 AM
More FYI (and a topic that is way off base now!)

My stuff now has a dynamic sound system, with dynamically generated sounds.  Sadly, the web audio API has the ability to do spatial panning, but the spec has changed so much (and just deprecated and replaced a couple weeks ago!!) that nobody has it implemented the same.  It'll shake out and I'll use it, but for now I'm going to have to go with a static inverse distance volume change only on the sounds.

[>] Brian
Title: Re: dim3 v24 Release
Post by: Galavant Garde on April 25, 2016, 12:57:01 PM
Request a feature time!  Again, sorry  8) Would't it be super cool if you could do a check for the intensity of light an object is illuminated by?  Something like obj.model.illumination=float.  It could then be added to sight check routines so that something in sight but in the dark won't be noticed whereas if you're under a light then you're visible!

I could potentially do a clunky workaround with invisible beacons near every light then run a script that checks the distance to said beacon - if close enough it'll assume you're in the light whereas if you're too far it'll assume you're in the darkness.  But if you've got a way to bake something like this into the engine that'd be ace!
Title: Re: dim3 v24 Release
Post by: ggadwa on April 26, 2016, 06:07:19 AM
Request a feature time!  Again, sorry  8) Would't it be super cool if you could do a check for the intensity of light an object is illuminated by?  Something like obj.model.illumination=float.  It could then be added to sight check routines so that something in sight but in the dark won't be noticed whereas if you're under a light then you're visible!

I could potentially do a clunky workaround with invisible beacons near every light then run a script that checks the distance to said beacon - if close enough it'll assume you're in the light whereas if you're too far it'll assume you're in the darkness.  But if you've got a way to bake something like this into the engine that'd be ace!

You have obj.model.bone.getBrightness(poseName,boneName);   You can just give it any pose name (or whatever pose you are in, the model won't change that much for it to be a big impact) and then the name of a bone (probably a torso or head bone) and that'll return a float from 0.0-1.0 telling how illuminated that bone's current position is.  So 1.0 means it's high lighted and 0.0 means it's completely in the dark.

[>] Brian
Title: Re: dim3 v24 Release
Post by: Galavant Garde on April 26, 2016, 01:03:22 PM
Amazing thanks for that Brian!  Never noticed that one

I'll just make a function in the player script that returns the bone illumination factor and get enemies to call it before they run their sight check routine. Thanks again  ;D
Title: Re: dim3 v24 Release
Post by: Galavant Garde on May 23, 2016, 07:56:38 AM
I think I worked out a bug Brian, please let me know if I'm wrong.  I had an issue with enemies occasionally springing back to life after they died, and I never quite got why because I stopped all chains/waits/timers in my enemy's death function.  But I realised I had the commands for stopping all chains/waits/timers in the enemy's parent script and simply called them from the enemy script.

What I think this means is if I call on the parent script to stop chains/waits/timers, it'll stop them only for the parent script and not for the child script that's calling.  Is that how it's supposed to work?  If so that's cool, I can easily work around that
Title: Re: dim3 v24 Release
Post by: `teh1 on May 23, 2016, 08:04:22 AM
That doesn't sound like bad behavior to me, and might be intentional. If you create it, you should destroy it. Similarly with child scripts.
Title: Re: dim3 v24 Release
Post by: Galavant Garde on May 23, 2016, 08:47:10 AM
It's not a bad behaviour at all, I guess I've probably just misunderstood the role of a parent script.  I've been using them to put identical chunks of code used by different scripts into a common parent so scripting the children involves less copying and pasting, and child scripts are easier to interpret/follow.  Strange thing is all other commands seem to work normally in the child script when I call them from the parent; it's just these 3 event commands that appear to apply to the parent but not the child.  Anyway it's easy to work with - I've just moved a few lines back from the parent to the child and it works ok now
Title: Re: dim3 v24 Release
Post by: `teh1 on May 23, 2016, 01:59:32 PM
Yeah but even with subclasses in, say, C++, the subclass is responsible for destroying any data it created that the superclass does not know about...
Title: Re: dim3 v24 Release
Post by: ggadwa on May 23, 2016, 06:33:49 PM
I think I worked out a bug Brian, please let me know if I'm wrong.  I had an issue with enemies occasionally springing back to life after they died, and I never quite got why because I stopped all chains/waits/timers in my enemy's death function.  But I realised I had the commands for stopping all chains/waits/timers in the enemy's parent script and simply called them from the enemy script.

What I think this means is if I call on the parent script to stop chains/waits/timers, it'll stop them only for the parent script and not for the child script that's calling.  Is that how it's supposed to work?  If so that's cool, I can easily work around that

Yeah, chains/waits/etc are attached to a single running script instance, so that's the behavior.

[>] Brian
Title: Re: dim3 v24 Release
Post by: Galavant Garde on May 24, 2016, 09:58:54 AM
Cool thanks, makes sense  8)
Title: Re: dim3 v24 Release
Post by: Galavant Garde on June 28, 2016, 07:38:08 AM
Me again Brian, how plausible would it be to make lighting cones instead of only spheres/hemispheres?  I don't mean like live ray tracing lights like what you did with your RT engine (that'd be too much) just the ability to focus directional lights to less than 180.

Reason being I've gotten by over the years with cheap tricks like making an array of lights that progressively get smaller to make a cone of sorts, but now that I've (finally) moved on from matte textures and N64-grade graphics, I'm finding that using shadows and bump/specular maps makes a right old mess of things when I string lights together like this.

It'd also be useful in alleyway/hallway scenarios so the light can beam down without shining too far through the walls into other areas of the map.  I know that light maps should get rid of the 'appearance' of light shining through walls, but...say when you step into the sphere/hemisphere of light that's on the other side of a wall, you don't see the light thanks to the light map, but you notice shadows start misbehaving and models start glowing when they're supposed to be in darkness etc.

I made a graphic to explain what I mean  8)

(https://dl.dropboxusercontent.com/u/46335427/LightingDilema.png)
Title: Re: dim3 v24 Release
Post by: ggadwa on June 29, 2016, 06:15:02 AM
That'd be a light cone, it'd basically have to be another couple settings on the lights, some more data passed to the shaders, and more calculations on the shaders.  I was always running into shader limits on earlier video cards, though, so not sure what changes something like that would make.

[>] Brian
Title: Re: dim3 v24 Release
Post by: Galavant Garde on June 29, 2016, 02:48:54 PM
Hmm I quite like how well Dim3 works on older hardware - don't want to break it.  I'll try a few workarounds - if for example there are any particularly big lights, I could just switch them off when in adjacent rooms using a script and switch them back on when you're in the room they're meant to light up...something like that
Title: Re: dim3 v24 Release
Post by: ggadwa on July 01, 2016, 07:01:57 AM
Hmm I quite like how well Dim3 works on older hardware - don't want to break it.  I'll try a few workarounds - if for example there are any particularly big lights, I could just switch them off when in adjacent rooms using a script and switch them back on when you're in the room they're meant to light up...something like that

Or just keep hallways far enough away from other rooms or have the parts of those rooms away from where the light in the hallway is; sometimes in games they separate things to work around how the engine works.

[>] Brian
Title: Re: dim3 v24 Release
Post by: Galavant Garde on July 04, 2016, 06:18:34 AM
True that, like those classic long hallways before you reach big open spaces  ;)

Separate question - is there any way to turn rain on and off using a script?
Title: Re: dim3 v24 Release
Post by: ggadwa on July 04, 2016, 01:24:40 PM
No, I don't think I ever added that.

[>] Brian
Title: Re: dim3 v24 Release
Post by: Galavant Garde on November 01, 2016, 01:30:27 PM
Oh hey so I found something interesting in v24 - when lights overlap, you occasionally get zones of the map that are 'dark'.  Anything within that area will have what appears to be an inverted specular map (if you're using specular maps) and even with light shining on it it'll stay dark.

Obvs not a problem if you keep your lights from overlapping, but I thought I'd mention this in case it's not expected behaviour

EDIT - so it appears to be when two light sources touch a single polygon or mesh, that polygon or mesh doesn't light up correctly.  Just gotta be careful with lighting I guess ;-)
Title: Re: dim3 v24 Release
Post by: Galavant Garde on March 23, 2017, 03:49:08 AM
Hola Brian, question...I recall you putting Scruffy's model on the start screen of Scruffy 3D - is there any way to change the location/colour/intensity of the light source?
Title: Re: dim3 v24 Release
Post by: ggadwa on March 23, 2017, 12:36:04 PM
Hola Brian, question...I recall you putting Scruffy's model on the start screen of Scruffy 3D - is there any way to change the location/colour/intensity of the light source?

Yup.  You made me go back and look at the Scruffy model, that was a really nice model :)

In editor, select the model, go to settings, and way at the bottom there's a bunch of settings for UI lighting.  Basically offsets to where the single light is that lights it.

[>] Brian
Title: Re: dim3 v24 Release
Post by: Galavant Garde on March 27, 2017, 05:18:34 AM
Ace, thanks!  Final question on this - is there a way to change the ambient light colour on the start screen?  I believe it's set to white
Title: Re: dim3 v24 Release
Post by: ggadwa on March 28, 2017, 06:59:58 AM
Ace, thanks!  Final question on this - is there a way to change the ambient light colour on the start screen?  I believe it's set to white

No, the lighting stuff is mostly used so the shading can look good on the model.  You can probably fake it by making a version of the model that has a texture that's darker, if that's what you are looking for (i.e., back in the darkness.)

[>] Brian
Title: Re: dim3 v24 Release
Post by: Galavant Garde on March 28, 2017, 12:39:19 PM
Ahso yeah that's what I meant - like it's in the darkness and the light only shows a little bit of its face. Cool I'll try darker textures, good idea!
Title: Re: dim3 v24 Release
Post by: Galavant Garde on January 04, 2018, 04:34:46 AM
Not sure if it's worth mentioning, but I think I found a v24 camera bug.  When restoring a save file, it restores the camera state from when you hit 'load' rather than when you hit 'save'

I came across it because when my player dies, the camera pans away at an odd angle.  So at full health with normal camera settings, I hit 'save', then I run out into the open then get shot.  When I die, the camera pans to the odd angle, and the 'load' menu appears.  Except when you hit the 'load' button to resume from when you had full health and a normal camera angle, it restores everything else normally but that weird camera angle stays.

Easy enough to make a workaround - I just reset the camera angle right before the 'die' event triggers the 'load' menu to open.  I'm really happy otherwise with how well the game state saving works - I remember older versions (years ago) that did all sorts of weird and unstable stuff.