kaotkbliss Posted June 2, 2011 Posted June 2, 2011 Couldn't you use _IrrSetNodeRotation if the texture was applied to an object? 010101000110100001101001011100110010000001101001011100110010000 001101101011110010010000001110011011010010110011100100001 My Android cat and mouse gamehttps://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek We're gonna need another Timmy!
bogQ Posted June 2, 2011 Posted June 2, 2011 (edited) I did so that i can rotate it, cube as the object that is, _IrrSetCameraFOV is there to geave it 2D look instead of 3D camera perspective on 3d world, the op is interested in 2D creations, I wish that Frank update anytime soon, im waiting for setLoopMode command eagerly, and wud like to get createTextureAnimator in some near future . Edited June 2, 2011 by bogQ TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) 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.
matwachich Posted June 2, 2011 Posted June 2, 2011 Thanks. I'ts what my eyes need. but i don't know if this methode of rendering 2d object rotated is suitable for a 2d game engin. Anyway, i will try.
bogQ Posted June 3, 2011 Posted June 3, 2011 The end result that you will get if you manage to pull it off is 3D game under 2D perspective, good side of it is that you can use animated meshes instead of only pictures, particles, in-engine GUI, and almost everything that goes with this 3D engine. I dono for others but i allwayes like to see ss of the work that someone is creating. Inform us when you are done with test, or at least drom some screenshot from your old game if your translating it, or from your new game if your creating it when your ready TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) 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.
matwachich Posted June 3, 2011 Posted June 3, 2011 Here is my current engin http://code.google.com/p/g-engin/ I'm frome the french autoit community, so the doc is in french. but if someone can understand... I manage to translate it someday, but not now. With this engin based on GDI+, i get at max 180fps, and with about 20-25 animated sprites i get just 25fps. For more performances, i want to make an engin that uses the graphic card (hardware) the best for me is to use Native OpenGL functions, i know how to draw, rotate and scale primitives, but i can't load textures with autoit So, i turned myself to IrrLicht, loading 2d textures is very simple, but rotating them is impossible!
bogQ Posted June 3, 2011 Posted June 3, 2011 (edited) Try this for sizeexpandcollapse popup#include "au3Irrlicht2.au3" Global $a = 0 Global $aVector3df[3] $aVector3df[2] = 3000 $aVector3df[0] = 0 _IrrStart($IRR_EDT_DIRECT3D9,1024,512,$IRR_BITS_PER_PIXEL_32, $IRR_WINDOWED, $IRR_SHADOWS, $IRR_CAPTURE_EVENTS, $IRR_VERTICAL_SYNC_ON ) local $Sky = _IrrAddMeshToScene( _IrrGetMesh( "emtynode.3ds" ) ) _IrrSetNodeMaterialTexture( $Sky, _IrrGetTexture("avion\bg-blue.jpg"), 0) _IrrSetNodeMaterialFlag( $Sky, $IRR_EMF_LIGHTING, $IRR_OFF ) _IrrSetNodeScale($Sky, 12,12,12) _IrrSetNodePosition($Sky, 0, 0, -12 ) $b = 0 For $x = 1 to 300 local $nodeTest = _IrrAddMeshToScene( _IrrGetMesh( "emtynode.3ds" ) ) _IrrSetNodeMaterialTexture( $nodeTest, _IrrGetTexture("avion\meteorite_large2.png"), 0) _IrrSetNodeMaterialFlag( $nodeTest, $IRR_EMF_LIGHTING, $IRR_OFF ) _IrrSetNodeMaterialType($nodeTest, $IRR_EMT_TRANSPARENT_ALPHA_CHANNEL) _IrrAddRotationAnimator($nodeTest, 0,0,Random(0.5,1)) $b += 0.01 _IrrSetNodePosition($nodeTest, 100, 0, 0 ) _IrrAddFlyStraightAnimator($nodeTest, -100,Random(-50,50,1),$b,100,Random(-50,50,1),$b, Random(12000,15000,1), $IRR_LOOP) _IrrSetNodeScale($nodeTest, 0.3, 0.3, 1) Next $sb = _IrrGetTexture("avion\bg-blue.jpg") local $camera = _IrrAddCamera($aVector3df[0],$aVector3df[1],$aVector3df[2], 0,0,0 ) _IrrSetCameraFOV($Camera, 0.03) $text = _IrrAddStaticText( "", 8, 8, 600, 600, $IRR_GUI_NO_BORDER, $IRR_GUI_NO_WRAP) $behind = _IrrGetTexture("avion\balle.png") WHILE _IrrRunning() _IrrBeginScene(255, 255, 255) _IrrGUISetText($text, "FPS: "&_IrrGetFPS()) _IrrDrawScene() _IrrDraw2DImageElement($behind,0, 0,0,0,40,20,$IRR_IGNORE_ALPHA) _IrrDrawGUI() _IrrEndScene() WEND _IrrStop()around 300 of them (on my comp limit is around 3000 of them to get around 30 FPS, and i have 10 eyars old comp)i assume you know how to put needed files from that avion example folder to needed path or to change path in scriptI attached needed "emtynode.3ds" to this postcant rotate it, yea right , well you can rotate nude, effect is the identical i know that i did not pay attention to global local in this post and refiling declared variables redeclaring them, forgeave me for sloppy code if your reading thisemtynode.rar Edited June 3, 2011 by bogQ TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) 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.
matwachich Posted June 3, 2011 Posted June 3, 2011 (edited) ABSOLUTLUY GREAT! I will study your example! Edit: After looking at your script, i see that you load many images from avion_example, but i see only the asteroide (many of them!!) rotating and moving on the screen? Edited June 3, 2011 by matwachich
bogQ Posted June 3, 2011 Posted June 3, 2011 (edited) I loaded only 2 imgs. one for background and the other for asteroide as textyre and added that textures on 3DS object, named node , and repeat identical code 300 times with random on fly animator, rotation speed animator, and distance.The third img is only so that you can see black fonts for FPS textThat whas the point, for you to see how easy is to rotate them and to move them.I maby duplicated some code in that example (forgot to delite some lines like "$sb =" line) but im not gona eddit it now, its too late 4 that. Edited June 3, 2011 by bogQ TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) 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.
matwachich Posted June 3, 2011 Posted June 3, 2011 (edited) Understood I got to modify this line in order to see the bg _IrrSetNodePosition($Sky, 0, 0, -12 ) => _IrrSetNodePosition($Sky, 0, 0, 0 ) What i Want now, is to be able to position precisely some mesh on the screen? i tried this but... local $myNode = _IrrAddMeshToScene( _IrrGetMesh( "emtynode.3ds" ) ) _IrrSetNodeMaterialTexture( $myNode, _IrrGetTexture("avion\bg-meteorite_large2.png"), 0) _IrrSetNodeMaterialFlag( $myNode, $IRR_EMF_LIGHTING, $IRR_OFF ) _IrrSetNodeScale($myNode, 0.3, 0.3, 1) ; --- WHILE _IrrRunning() _IrrBeginScene(255, 255, 255) ; --- $m = MouseGetPos() _IrrSetNodePosition($myNode, $m[0], $m[1], 2) Edit: I know now that the position 0,0 is the middle of the screen! Edited June 3, 2011 by matwachich
matwachich Posted June 3, 2011 Posted June 3, 2011 I'm thinking that this is not really the best methode to do what i want. - I haven't got any precise control on the position of the objects on the screen
bogQ Posted June 3, 2011 Posted June 3, 2011 (edited) Look at the list of commands in udf help file and youl see that you have _IrrGetNodePosition _IrrGetNodeAbsolutePosition _IrrGetDistanceBetweenNodes and alot of other commands can b used to detect or determen the impact or distance or pos, or to controll them, you only need to b creativ. Eather way its your choice to use what you think its the best for you. Edited June 3, 2011 by bogQ TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) 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.
matwachich Posted June 3, 2011 Posted June 3, 2011 Thanks! The best for me will be OpenGL if just i knew how to load images!
Alex070188 Posted June 5, 2011 Posted June 5, 2011 Greetings to everything, I from Russia, ask strongly is not becomes angry for written, I work through the translator, help to make please management of the character that it is impossible, I will not understand as to do. Thanks expandcollapse popup#include "..\au3Irrlicht2.au3" HotKeySet("{ESC}", "_Exit") Func _Exit() _IrrStop() Exit EndFunc DIM $BSPMesh DIM $BSPNode DIM $Camera DIM $MapCollision DIM $MD2Mesh DIM $MeshTexture DIM $SceneNode DIM $BSPMesh DIM $BSPNode _IrrStart( $IRR_EDT_OPENGL, 800, 600, $IRR_BITS_PER_PIXEL_32, _ $IRR_WINDOWED, $IRR_SHADOWS, $IRR_IGNORE_EVENTS, $IRR_VERTICAL_SYNC_ON ) _IrrSetWindowCaption( "Example 12: Collision" ) $MD2Mesh = _IrrGetMesh( "../media/zumlin.md2" ) $MeshTexture = _IrrGetTexture( "../media/zumlin.pcx" ) $SceneNode = _IrrAddMeshToScene( $MD2Mesh ) _IrrSetNodeMaterialTexture( $SceneNode, $MeshTexture, 0 ) _IrrSetNodeMaterialFlag( $SceneNode, $IRR_EMF_LIGHTING, $IRR_OFF ) _IrrPlayNodeMD2Animation( $SceneNode, $IRR_EMAT_STAND) _IrrSetNodeScale( $SceneNode, 1.25, 1.25, 1.25 ) _IrrSetNodeRotation( $SceneNode, 0, 90, 0 ) _IrrSetNodePosition( $SceneNode, 1500, 100, 1300 ) _IrrAddZipFile( "../media/map-20kdm2.pk3", $IRR_IGNORE_CASE, $IRR_IGNORE_PATHS ) $BSPMesh = _IrrGetMesh( "20kdm2.bsp" ) $BSPNode = _IrrAddMeshToSceneAsOcttree( $BSPMesh ) $Camera = _IrrAddFPSCamera() _IrrSetNodePosition( $Camera, 1550, 110, 1369 ) $MapCollision = _IrrGetCollisionGroupFromComplexMesh( $BSPMesh, $BSPNode ) _IrrAddCollisionAnimator($MapCollision, _ $Camera, _ 30.0,30.0,30.0, _ 0.0,-10.0,0.0, _ 0.0,50.0,0.0 ) _IrrHideMouse() WHILE _IrrRunning() _IrrBeginScene( 240, 255, 255 ) $a_vector3df = _IrrGetNodePosition($Camera) _IrrSetNodePosition( $SceneNode, _ $a_vector3df[0], _ $a_vector3df[1] - 20, _ $a_vector3df[2] - 40) _IrrDrawScene() _IrrEndScene() WEND _IrrStop()
bogQ Posted June 5, 2011 Posted June 5, 2011 Heare is the link from BiliyomKi example on moving around it's hard to explain if i don't fully understand questionIf i remamber correctly its nice working example So you gota use diffrent camera, and instead adding char to camera you add camera to char, and use eather circle calculation or emty node as the pointer for moving your char around. Hi BiliyomKi & bogQ, was mainly a remark because posted V2 will not work for others when refering to non-existing ressources. If any mesh can be used, why not ;FOR 'Third Person Shooter' LOOK $FrontNode = _IrrAddMeshToScene( _IrrGetMesh("../media/wedge.obj")) $BackNode = _IrrAddMeshToScene( _IrrGetMesh("../media/wedge.obj")) then everything is working at once. BTW: much nicer movement in V2 - looking forward to V3 TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) 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.
Alex070188 Posted June 5, 2011 Posted June 5, 2011 (edited) Everything, has understood, thanks huge Edited June 5, 2011 by Alex070188
Alex070188 Posted June 6, 2011 Posted June 6, 2011 Whether and probably to pretend from eyes, it is simple if to turn the mouse for example in left that the character will be concerning a window about the right
bogQ Posted June 6, 2011 Posted June 6, 2011 (edited) Try to type on english + on your natural language It's hard to understand you like this, and if you type on russian language maybe someone can use "google translate" to understand you better or someone who understand your language can jump in and help Or add question on some other language if you know some other Edited June 6, 2011 by bogQ TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) 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.
Alex070188 Posted June 6, 2011 Posted June 6, 2011 Excuse me, here translated by Google, in the last tank top I was asking, you can make the character appearance of the eyes, as in Counter Strick?
bogQ Posted June 6, 2011 Posted June 6, 2011 (edited) You can, heare you can locate one example from fireryblaze for you to play withImg from the example creator Edited June 6, 2011 by bogQ TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) 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.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now