Jump to content

Irrlicht enviroment


fireryblaze
 Share

Recommended Posts

Whatup guys.

As to the issue of NPC AI, I've been doing alot of thinking about such things lately. My suggestion would be a coordnate based value system, for the actual thinking. Also an "trigger" block system would be very useful, utilizing the hit detecion but not actually drawing the objects. I'll write up some UDF's when I get some time.

[center][/center]Working on the next big thing.Currently Playing: Halo 4, League of LegendsXBL GT: iRememberYhslaw

Link to comment
Share on other sites

  • Replies 63
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Well there r probably more pople than you realise, only problem is that they still dont post their scripts becose their project still inst ready for posting and there is still lots of things to b tested (that sounded like me ;) )

Posted Image

Back to the topic

I never liked to use gravity even on old irr becose of sliding down on low framerate, now i use eather _IrrGetTerrainTileHeight or _IrrGetCollisionPoint depends on situation to get next destination on keyboard press (stick to the ground option). I get current Height position, if $aCollideAt1[1]+25 < $temp + 1.5, and compare it to next destination, and if its FALSCHE that mean (in this case for me) that i can't climb up, That mean that i will not have option to jump, but i think it's better to recreate your option to jump instead to use gravity all the time if you dont need it most of the times.

JRowe I wonder if there's way to turn on collision only when you need to jump and to turn it off after? What command did i miss?

Congratulations on making such a beatiful scene(Runs and starts coding for beauty...then realises I stink at making things beautiful)

Now that you mention that their scripts aren't ready for posting it makes me wonder, was mine? I created this thread so that I could share my learning experience with others and give a rough example of how things can be done for those that might not know where to begin. However it makes me think that maybe I should have done more work with it first.

as for adding then removing collision, try _IrrAddCollisionAnimator and to remove _IrrRemoveAnimator

Aight actualy tested it now and here is the code that I got.

while _IrrKeyEventAvailable()
        ; read the key event out.
        $pKeyEvent = _IrrReadKeyEvent()

        ; arbitrate based on the key that was pressed
        if __getKeyEvt($pKeyEvent, $EVT_KEY_IKEY) = $KEY_KEY_1 then
        If  $CollisionState = 0 Then
        $CollisionAnimator = _IrrAddCollisionAnimator( _
        $CombinedCollision, $CameraNode, _
        30.0,30.0,30.0, _
        0.0,-3.0,0.0, _
        0.0,50.0,0.0 )
            $CollisionState = 1
        EndIf
        EndIf
        if __getKeyEvt($pKeyEvent, $EVT_KEY_IKEY) = $KEY_KEY_2 then
         If $CollisionState = 1 Then
            _IrrRemoveAnimator($CameraNode, $CollisionAnimator)
            $CollisionState = 0
        EndIf
        EndIf
    wend

Pressing the 1 key turns on the collision and pressing the 2 key shuts it off. Its actualy a very usefull idea, I monitered the FPS doing this and it skyrocketed upwards to 90+ FPS when it was sitting down around 45ish. I will definiteley be adding this to the project ASAP.

Edited by fireryblaze
Link to comment
Share on other sites

Version 4.0 is now available.

BogQ you should find a good starting point for turning the collision on and off when jumping. However I found a serious glitch the reason of wich I cannot fathom. About 1/2 way up the ladder functions stop working, locking you with the FPS camera + the collision. However jumping back down fixes the bug. Also the animator is only called when the character jumps using space, not when the character just walks off of somthing(Except from the top, but the collision is still in play there)

Edited by fireryblaze
Link to comment
Share on other sites

Jumping lacs inertia. any way you could make it so when you jump, you can't change direction midway in the air? Also, making the jump faster and increasing gravity effect would make it more real.

0x616e2069646561206973206c696b652061206d616e20776974686f7574206120626f64792c20746f206669676874206f6e6520697320746f206e657665722077696e2e2e2e2e

Link to comment
Share on other sites

@corgano

Thanks for your input I will look into making the jump seem more real.

@Everyone

_IrrGetCollisionGroupFromComplexMesh()instead of using _IrrgetcollisiongroupFromMesh() gives back those 40 or so missing frames when standing still. So basicly that problem is now solved.

Edited by fireryblaze
Link to comment
Share on other sites

A quick sneak peek @ what the next update will bring...Yes Zibit this is for you ;)

Posted Image

Anyways, yes next up is the old gamers favorite the weapons system. Check back for when it is posted.

PS: I know Version 4 kinda sucked...ok Epicly sucked... I jumped the gun because I was getting tired... Anyways I went back to the old system and corrected the problem that was resulting in lost frames. V5 is gonna be good. I promise it will be somthing to look forward to.

Also Does anyone know why _IrrGetCollisionPoint doesn't return collisions at longer ranges?

Edited by fireryblaze
Link to comment
Share on other sites

Posted Image

I am so jealous.

I'm going to have to stop playing games and start working on mine!

010101000110100001101001011100110010000001101001011100110010000

001101101011110010010000001110011011010010110011100100001

My Android cat and mouse game
https://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek

We're gonna need another Timmy!

Link to comment
Share on other sites

Hmmm... I get:

Hi Mat, had a same problem with irrmeshes some time ago - so I guess you are running fireryblaze's script NOT from inside a dir "\Irrlicht"?

Then, the texture paths inside the .irrmesh will not be found:

<texture name="Texture1" value="...\Irrlicht\Meshes\hightechwall06.jpg" />

@fireryblaze: Think this is because of paths written relative to IrrEdit. Don't know if this can be changed in IrrEdit, for my problem I simply re-edit the .irrmeshes with paths relative to the script, in this case ".\Meshes\hightechwall06.jpg"

Edited by linus
Link to comment
Share on other sites

Hi Mat, had a same problem with irrmeshes some time ago - so I guess you are running fireryblaze's script NOT from inside a dir "\Irrlicht"?

Then, the texture paths inside the .irrmesh will not be found:

<texture name="Texture1" value="...\Irrlicht\Meshes\hightechwall06.jpg" />

@fireryblaze: Think this is because of paths written relative to IrrEdit. Don't know if this can be changed in IrrEdit, for my problem I simply re-edit the .irrmeshes with paths relative to the script, in this case ".\Meshes\hightechwall06.jpg"

It's running from:

"C:\Downloads\Irrlicht 5.0\Irrlicht\Warehouse Script.exe"

exactly where I extracted it, so it should work. I have full rights in that directory blah blah blah... It's weird. All other versions work as intended, it's only the latest one that is causing the problems.

Link to comment
Share on other sites

"C:\Downloads\Irrlicht 5.0\Irrlicht\Warehouse Script.exe"

Looks ok, but still think textures are at wrong place. What does the console say when you run the warehouse.au3 - it should say

Resizing window (800 600)

Loaded texture: D:/Irrlicht 5.0/Irrlicht 5.0/Irrlicht/Meshes/hightechwall06.jpg

Loaded texture: D:/Irrlicht 5.0/Irrlicht 5.0/Irrlicht/Meshes/hightechwall03.jpg

Loaded texture: D:/Irrlicht 5.0/Irrlicht 5.0/Irrlicht/Meshes/hightechfloor01.jpg

Loaded texture: D:/Irrlicht 5.0/Irrlicht 5.0/Irrlicht/Meshes/hightechfloor02.jpg

Loaded texture: D:/Irrlicht 5.0/Irrlicht 5.0/Irrlicht/Meshes/hightechwall02.jpg

Loaded texture: D:/Irrlicht 5.0/Irrlicht 5.0/Irrlicht/Meshes/hightechwall01.jpg

Loaded texture: D:/Irrlicht 5.0/Irrlicht 5.0/Irrlicht/Meshes/hightechwall05.jpg

Loaded mesh: Meshes\1.irrmesh

If not "Loaded", then textures are at wrong place. If "Loaded", it's something different.

Link to comment
Share on other sites

It very well could be the dir I tried cleaning it up a bit, guess that kinda fluffed it... Thanks for the input linus I will update it later tonight using a more umm "Relative" Path.

The odd thing is the gun loads/ zumlin loads/ even the crosshair loads. Did you try redownloading it?

Also is anyone else having this problem?

Edited by fireryblaze
Link to comment
Share on other sites

Looks ok, but still think textures are at wrong place. What does the console say when you run the warehouse.au3 - it should say

Resizing window (800 600)

Loaded texture: D:/Irrlicht 5.0/Irrlicht 5.0/Irrlicht/Meshes/hightechwall06.jpg

Loaded texture: D:/Irrlicht 5.0/Irrlicht 5.0/Irrlicht/Meshes/hightechwall03.jpg

Loaded texture: D:/Irrlicht 5.0/Irrlicht 5.0/Irrlicht/Meshes/hightechfloor01.jpg

Loaded texture: D:/Irrlicht 5.0/Irrlicht 5.0/Irrlicht/Meshes/hightechfloor02.jpg

Loaded texture: D:/Irrlicht 5.0/Irrlicht 5.0/Irrlicht/Meshes/hightechwall02.jpg

Loaded texture: D:/Irrlicht 5.0/Irrlicht 5.0/Irrlicht/Meshes/hightechwall01.jpg

Loaded texture: D:/Irrlicht 5.0/Irrlicht 5.0/Irrlicht/Meshes/hightechwall05.jpg

Loaded mesh: Meshes\1.irrmesh

If not "Loaded", then textures are at wrong place. If "Loaded", it's something different.

Irrlicht Engine version 1.7.1
Microsoft Windows Vista Personal Service Pack 2 (Build 6002)
Using renderer: OpenGL 1.4.0
Intel 945G: Intel
OpenGL driver version is 1.2 or better.
GLSL not available.
Resizing window (800 600)
Could not open file of texture: ...\Irrlicht\Meshes\hightechwall06.jpg
Could not open file of texture: ...\Irrlicht\Meshes\hightechwall03.jpg
Could not open file of texture: ...\Irrlicht\Meshes\hightechwall06.jpg
Could not open file of texture: ...\Irrlicht\Meshes\hightechwall06.jpg
Could not open file of texture: ...\Irrlicht\Meshes\hightechfloor01.jpg
Could not open file of texture: ...\Irrlicht\Meshes\hightechfloor02.jpg
Could not open file of texture: ...\Irrlicht\Meshes\hightechwall06.jpg
Could not open file of texture: ...\Irrlicht\Meshes\hightechwall06.jpg
Could not open file of texture: ...\Irrlicht\Meshes\hightechwall06.jpg
Could not open file of texture: ...\Irrlicht\Meshes\hightechwall02.jpg
Could not open file of texture: ...\Irrlicht\Meshes\hightechfloor02.jpg
Could not open file of texture: ...\Irrlicht\Meshes\hightechwall06.jpg
Could not open file of texture: ...\Irrlicht\Meshes\hightechwall06.jpg
Could not open file of texture: ...\Irrlicht\Meshes\hightechwall06.jpg
Could not open file of texture: ...\Irrlicht\Meshes\hightechwall06.jpg
Could not open file of texture: ...\Irrlicht\Meshes\hightechwall06.jpg
Could not open file of texture: ...\Irrlicht\Meshes\hightechwall06.jpg
Could not open file of texture: ...\Irrlicht\Meshes\hightechwall06.jpg
Could not open file of texture: ...\Irrlicht\Meshes\hightechwall06.jpg
Could not open file of texture: ...\Irrlicht\Meshes\hightechwall06.jpg
Could not open file of texture: ...\Irrlicht\Meshes\hightechwall06.jpg
Could not open file of texture: ...\Irrlicht\Meshes\hightechfloor01.jpg
Could not open file of texture: ...\Irrlicht\Meshes\hightechfloor01.jpg
Could not open file of texture: ...\Irrlicht\Meshes\hightechfloor01.jpg
Could not open file of texture: ...\Irrlicht\Meshes\hightechfloor01.jpg
Could not open file of texture: ...\Irrlicht\Meshes\hightechfloor01.jpg
Could not open file of texture: ...\Irrlicht\Meshes\hightechfloor01.jpg
Could not open file of texture: ...\Irrlicht\Meshes\hightechfloor01.jpg
Could not open file of texture: ...\Irrlicht\Meshes\hightechfloor01.jpg
Could not open file of texture: ...\Irrlicht\Meshes\hightechfloor01.jpg
Could not open file of texture: ...\Irrlicht\Meshes\hightechfloor01.jpg
Could not open file of texture: ...\Irrlicht\Meshes\hightechfloor01.jpg
Could not open file of texture: ...\Irrlicht\Meshes\hightechfloor01.jpg
Could not open file of texture: ...\Irrlicht\Meshes\hightechfloor01.jpg
Could not open file of texture: ...\Irrlicht\Meshes\hightechfloor01.jpg
Could not open file of texture: ...\Irrlicht\Meshes\hightechfloor01.jpg
Could not open file of texture: ...\Irrlicht\Meshes\hightechfloor01.jpg
Could not open file of texture: ...\Irrlicht\Meshes\hightechwall06.jpg
Could not open file of texture: ...\Irrlicht\Meshes\hightechwall06.jpg
Could not open file of texture: ...\Irrlicht\Meshes\hightechwall01.jpg
Could not open file of texture: ...\Irrlicht\Meshes\hightechwall01.jpg
Could not open file of texture: ...\Irrlicht\Meshes\hightechwall01.jpg
Could not open file of texture: ...\Irrlicht\Meshes\hightechwall01.jpg
Could not open file of texture: ...\Irrlicht\Meshes\hightechwall01.jpg
Could not open file of texture: ...\Irrlicht\Meshes\hightechwall01.jpg
Could not open file of texture: ...\Irrlicht\Meshes\hightechwall01.jpg
Could not open file of texture: ...\Irrlicht\Meshes\hightechwall01.jpg
Could not open file of texture: ...\Irrlicht\Meshes\hightechwall06.jpg
Could not open file of texture: ...\Irrlicht\Meshes\hightechwall06.jpg
Could not open file of texture: ...\Irrlicht\Meshes\hightechwall03.jpg
Could not open file of texture: ...\Irrlicht\Meshes\hightechwall03.jpg
Could not open file of texture: ...\Irrlicht\Meshes\hightechwall02.jpg
Could not open file of texture: ...\Irrlicht\Meshes\hightechwall01.jpg
Could not open file of texture: ...\Irrlicht\Meshes\hightechwall06.jpg

Ahh... That would be the problem.

I think that the 3 dots should be 1. I will see.

Link to comment
Share on other sites

Ok V5.1 is up with corrected directories.

They look like

<texture name="Texture1" value=".\Meshes\hightechwall06.jpg" />

Hope this fixes the problem

Fixed :) What about object collision with the monster? And when I release the mouse he stops being blown away instantly, which isn't nice... But apart from that... Fantastic ;)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...