Jump to content

Au3Irrlicht 2.0


JRowe
 Share

Recommended Posts

How would you restrict movement on the maps, so gravity applies.

Hi Epdmk,

have a look into examples 12_Example_Collision.au3 and, moreover, 49_Example_Loaded_Scene_Collision.au3. They show briefly (and well documented!) how this is done. Example 49 allows you to fall into eternity when leaving the map - think this is what you need?!

I'm interested to know if anyone has developed a working game with this, or even be able to run around the map.

With autoIt version of the wrapper? I think no because quiet new and not complete. As you may have read, the wrapper itself comes from freeBasic and is mature and used for several years. Also not all features of this original wrapper are "translated" yet, you should find right now a hole bunch of needed features to write some nice apps/games (just have a look in working examples what can be done right now ...).

Don't know if you are an experienced (3D) game programmer, but if new to 3D (as me), the already available stuff will give you everything to work yourself into concepts of this.

Besides, your feedback will help to make this project "round". And: why not become the first to implement a nice small cool game with au3irr2 :blink:

What do you mean with "running on a map" - arent examples not working for you? There are several where you run around a map ...

Edited by linus
Link to comment
Share on other sites

I mean where gravity applies, so I'm not flying around lol

In examples 12_Example_Collision.au3 and 49_Example_Loaded_Scene_Collision.au3 you cannot fly - but always falling back to ground. By definition, this is gravity?

Whenever I add a collision animator and run the script, the game just crashes.. why?

Also you describe very accurate all possible needed things to reproduce your problem, may I ask for some more - e.g. example code?
Link to comment
Share on other sites

#include <au3Irrlicht2.au3>
HotKeySet("{ESC}", "_exit")
Func _exit()
_IrrStop()
Exit
EndFunc

_IrrStart($IRR_EDT_OPENGL, 600, 400, $IRR_BITS_PER_PIXEL_32, $IRR_WINDOWED, $IRR_SHADOWS, $IRR_IGNORE_EVENTS, $IRR_VERTICAL_SYNC_ON)
_IrrSetWindowCaption( "Example 12: Collision" )
_IrrAddZipFile( "./media/map-20kdm2.pk3", $IRR_IGNORE_CASE, $IRR_IGNORE_PATHS )
$BSPMesh = _IrrGetMesh( "20kdm2.bsp" )
$BSPNode = _IrrAddMeshToSceneAsOcttree( $BSPMesh )
$Camera = _IrrAddFPSCamera()
$CameraNode = $Camera
_IrrSetNodePosition($CameraNode, 1750, 149, 1369 )
_IrrSetNodeRotation($CameraNode, 4, -461.63, 0 )

$MapCollision = _IrrGetCollisionGroupFromComplexMesh( $BSPMesh, $BSPNode )

_IrrAddCollisionAnimator($MapCollision, $CameraNode, 30.0,30.0,30.0, 0.0,-9.8,0.0, 0.0,50.0,0.0 )

_IrrHideMouse()

WHILE _IrrRunning()
        _IrrBeginScene( 240, 255, 255 )
        _IrrDrawScene()
        _IrrEndScene()
WEND

_IrrStop()

Link to comment
Share on other sites

Yes, I'm using the latest versions but for me it just pops up with a microsoft error report asking to send it or not. And what mails lol

** Edit: found the problem, thanks.

Edited by Epdmk
Link to comment
Share on other sites

lol, yes ...

OK, strange thing or simple reason. Can you please anyway download this version again and rebuild your directory? And: error with ANY example script or just this one? If not only this one - which ones? What does error message say? You know, it's easier to reproduce the more info is there. Feel free to write more than one sentence - lol ...

** Edit: found the problem, thanks.

May I ask WHAT the problem was? Maybe relevant also for others ... Edited by linus
Link to comment
Share on other sites

Simple, my .dll files were all updates but my au3Irrlicht2 was outdated lol. Is there an example to draw items to the FPS camera, like weapons.

Two sentences - you are getting better, lol again

Maybe I am missing the third one so still guessing :blink:

There is an example to attach things to your player node: 21_Example_CarryingObjects.au3

IF you mean instead to draw 2D overlays onto your your current screen: 78_Example_2D_Overlaid_HUD.au3

Link to comment
Share on other sites

Yeah I saw that, I managed to draw a sprite to the map now. How would I go about making him run around the map randomly?

Epdmk.

How much time do you think yourself before posting? Work yourself through the examples (several use random numbers). Have a look into \documentation inside your wrapper dir. Type RANDOM into the au3 help. Open a separate topic where you can "chat", instead of spamming here. Come back when having serious problems/questions about au3irrlicht2. May I cite you one (last) time: lol.

Link to comment
Share on other sites

Yeah I saw that, I managed to draw a sprite to the map now. How would I go about making him run around the map randomly?

Did you try to use IrrAddFlyStraightAnimator to go to specific location

Start point as your curent position, end point as your random position

The other way is random angle on main node and node child as your main pointer to the new location, that way you can automaticly get the turning on the correct side of your main node and travel distance shud b distance from your main nude and his child. (easy to calculate or to set new travel distance :blink:)

TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

 
Link to comment
Share on other sites

I have just uploaded a new release (au3irr2.0.2) to the project page:

http://code.google.com/p/au3irrlicht2/

- Includes now everything needed to do some 3D with autoIt

(means: additional download of the freeBasic wrapper is no longer needed, cut-down version of Frank Dodd's original wrapper is included)

- 81 Examples at all

- Example launcher (examples now in sub-dir to keep the root dir clean)

- Completed + fixed structure

- of course again an updated UDF

I have changed the _irrStart function for new example structure. This allows to run au3irr2-scripts with .dll's in a separate dir (either .\bin or .\..). Hope this is useful, see comments in UDF for more info.

2jRowe: Hope changes are welcome - I think this structure is better for future work + maintenance of the UDF. All files needed for this project are added to the google sources, as Frank Dodd agreed with providing also a sub-set of his wrapper.

Hope everything is working as expected.

Link to comment
Share on other sites

Wanted to say great work linus and jRowe!!!

You guys are helping to make AutoIt everything I hoped it would be when I first started learning it :blink:

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

Absolutely, and I'll update the first post right now as well. At some point, I'll take a look at the second post and figure out how best to make use of that space. Linus, huge round of applause. I've gotten caught up in creating a new job for myself, and let some things languish. This is great!

Link to comment
Share on other sites

  • 2 weeks later...

Thats awesome work !!

But when I try the use IrrEdit Examle maps(animation.irrmesh) Says that:

rrlicht Engine version 1.7.1
Microsoft Windows Vista Professional Service Pack 1 (Build 6001)
Using renderer: OpenGL 3.3.10061
ATI Radeon HD 4800 Series         : ATI Technologies Inc.
OpenGL driver version is 1.2 or better.
GLSL version: 3.3
Found unknown element in irrlicht scene file: mesh
Found unknown element in irrlicht scene file: boundingBox
Found unknown element in irrlicht scene file: buffer
Found unknown element in irrlicht scene file: boundingBox
Found unknown element in irrlicht scene file: material
Found unknown element in irrlicht scene file: enum
Found unknown element in irrlicht scene file: color
Found unknown element in irrlicht scene file: color
Found unknown element in irrlicht scene file: color
Found unknown element in irrlicht scene file: color
Found unknown element in irrlicht scene file: float
Found unknown element in irrlicht scene file: float
Found unknown element in irrlicht scene file: float
Found unknown element in irrlicht scene file: texture
Found unknown element in irrlicht scene file: texture
Found unknown element in irrlicht scene file: texture
Found unknown element in irrlicht scene file: texture
Found unknown element in irrlicht scene file: bool
Found unknown element in irrlicht scene file: bool
Found unknown element in irrlicht scene file: bool
Found unknown element in irrlicht scene file: bool
Found unknown element in irrlicht scene file: int
Found unknown element in irrlicht scene file: bool
Found unknown element in irrlicht scene file: bool
Found unknown element in irrlicht scene file: bool
Found unknown element in irrlicht scene file: bool
Found unknown element in irrlicht scene file: bool
Found unknown element in irrlicht scene file: bool
Found unknown element in irrlicht scene file: bool
Found unknown element in irrlicht scene file: bool
Found unknown element in irrlicht scene file: bool
Found unknown element in irrlicht scene file: bool
Found unknown element in irrlicht scene file: bool
Found unknown element in irrlicht scene file: bool
Found unknown element in irrlicht scene file: bool
Found unknown element in irrlicht scene file: bool
Found unknown element in irrlicht scene file: bool
Found unknown element in irrlicht scene file: bool
Found unknown element in irrlicht scene file: enum
Found unknown element in irrlicht scene file: enum
Found unknown element in irrlicht scene file: enum
Found unknown element in irrlicht scene file: enum
Found unknown element in irrlicht scene file: vertices
Found unknown element in irrlicht scene file: indices
Found unknown element in irrlicht scene file: buffer
Found unknown element in irrlicht scene file: boundingBox
Found unknown element in irrlicht scene file: material
Found unknown element in irrlicht scene file: enum
Found unknown element in irrlicht scene file: color
Found unknown element in irrlicht scene file: color
Found unknown element in irrlicht scene file: color
Found unknown element in irrlicht scene file: color
Found unknown element in irrlicht scene file: float
Found unknown element in irrlicht scene file: float
Found unknown element in irrlicht scene file: float
Found unknown element in irrlicht scene file: texture
Found unknown element in irrlicht scene file: texture
Found unknown element in irrlicht scene file: texture
Found unknown element in irrlicht scene file: texture
Found unknown element in irrlicht scene file: bool
Found unknown element in irrlicht scene file: bool
Found unknown element in irrlicht scene file: bool
Found unknown element in irrlicht scene file: bool
Found unknown element in irrlicht scene file: int
Found unknown element in irrlicht scene file: bool
Found unknown element in irrlicht scene file: bool
Found unknown element in irrlicht scene file: bool
Found unknown element in irrlicht scene file: bool
Found unknown element in irrlicht scene file: bool
Found unknown element in irrlicht scene file: bool
Found unknown element in irrlicht scene file: bool
Found unknown element in irrlicht scene file: bool
Found unknown element in irrlicht scene file: bool
Found unknown element in irrlicht scene file: bool
Found unknown element in irrlicht scene file: bool
Found unknown element in irrlicht scene file: bool
Found unknown element in irrlicht scene file: bool
Found unknown element in irrlicht scene file: bool
Found unknown element in irrlicht scene file: bool
Found unknown element in irrlicht scene file: bool
Found unknown element in irrlicht scene file: enum
Found unknown element in irrlicht scene file: enum
Found unknown element in irrlicht scene file: enum
Found unknown element in irrlicht scene file: enum
Found unknown element in irrlicht scene file: vertices
Found unknown element in irrlicht scene file: indices
!>14:43:00 AutoIT3.exe ended.rc:-1073741819
>Exit code: -1073741819    Time: 3.101

and its the code:

#include "au3Irrlicht2.au3"
opt("MustDeclareVars", True)
HotKeySet("{ESC}", "exit1")
Func exit1()
    _IrrStop()
    Exit
EndFunc ; _exit
DIM $SelectorGround,$SelectorBox,$CombinedCollision,$CollisionAnimator,$Camera,$CameraNode,$NodeGround,$NodeBox
_IrrStart( $IRR_EDT_DIRECT3D9, 1024,768, 32, $IRR_WINDOWED,$IRR_SHADOWS, $IRR_IGNORE_EVENTS, $IRR_VERTICAL_SYNC_ON )
_IrrSetWindowCaption( "Test" )
_IrrLoadScene( "../irrEdit/scenes/animation.irr" )
;//Camera
$Camera = _IrrAddFPSCamera()
$CameraNode = $Camera
_IrrSetNodePosition( $CameraNode, 200, 100, 0 )
_IrrSetNodeRotation( $CameraNode, 0, -90, 0 )
;//Node
$NodeGround = _IrrGetSceneNodeFromName( "Ground" )
$NodeBox = _IrrGetSceneNodeFromName( "Pillar" )
;//Collision
$SelectorGround = _IrrGetCollisionGroupFromBox( $NodeGround )
$SelectorBox = _IrrGetCollisionGroupFromBox( $NodeBox )
$CombinedCollision = _IrrCreateCombinedCollisionGroup ()
_IrrAddCollisionGroupToCombination ( $CombinedCollision, $SelectorGround )
_IrrAddCollisionGroupToCombination ( $CombinedCollision, $SelectorBox )
$CollisionAnimator = _IrrAddCollisionAnimator($CombinedCollision, $CameraNode,0.0,30.0,30.0,0.0,-3.0,0.0,0.0,50.0,0.0 )
_IrrHideMouse()
WHILE _IrrRunning()
    _IrrBeginScene( 200, 200, 255 )
    _IrrDrawScene()
    _IrrEndScene()
WEND
_IrrStop()

Please help me.

And one more question.

If I try the use doom III maps(*.pk3) I cant see something or some part of map.

Edited by BiliyomKi
An AutoIT user.
Link to comment
Share on other sites

Problem Solved :blink: The new code:

#include "au3Irrlicht2.au3"
HotKeySet("{ESC}", "exit1")

_IrrStart()
_IrrLoadScene( "../irrEdit/scenes/animation.irr" )
$Camera = _IrrAddFPSCamera()
_IrrHideMouse()

Func exit1()
    _IrrStop()
    Exit
EndFunc

WHILE _IrrRunning()
    _IrrBeginScene(0,0,0)
    _IrrDrawScene()
    _IrrEndScene()
WEND
Edited by BiliyomKi
An AutoIT user.
Link to comment
Share on other sites

Problem Solved :blink:

Hello BiliyomKi - nice, people fixing problems on themselves are the best :P Nevertheless, I tried your first code without this error messages - instead a complete crash. Strange ... maybe different behaviour between Vista and XP?

Reason for crash is that the node names (Ground + pillar) were not in my animation.irr. Replacing with "valid" node names the irrlicht scene loads fine. Explains also why your second code is working: there are simply no invalid node names used.

Thanks by the way for pointing out the ability to create + load complete (animated) scenes from irrEdit!

If I try the use doom III maps(*.pk3) I cant see something or some part of map.

Don't know very much about .pk3's, maybe somebody else can give more info? In the meantime: I played with this some time ago, and had some problems, too. One nice map ("Springfield" from the Simpsons as pk3 ;) ) was simply too big for the irrLicht engine. Another problem were maps referencing ressources (bitmaps) from an original quake installation.

Maybe you can try first if the map is ok for irrLicht itself by opening in irrEdit:

- extract the pk3 (it's a .zip in real)

- copy the included \textures to your irrEdit\textures

- load the \map\something as static mesh.

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...