|
Post by lhc29 on Apr 29, 2015 19:26:23 GMT
hello, i just found 3DRad engine and i'm interested. but so far i have some questions. 1) i read that scripts are run 75 times per second. is it independent of graphics framerate? or does it change with graphics fps? can i assume the interval of physics frame is always 1/75 sec? 2) is there any built-in function in angelscript? such as sqrt, tan, pow etc. ? can angelscript include any h file like C language? 3) do the spin parameters of rigidbody refer to spin rates in world axis system or in the axis system of itself? thanks in advance for your answers.
|
|
|
Post by mikehense on Apr 29, 2015 22:05:55 GMT
insightful questions... don't know if i really have an any answers, but...
1 - the idea of scripts running at a certain rate seems a lil counter-intuitive to me... i mean, the two things i take into consideration are the rendering rate (frame rate) and the game engine main loop, which i can't really say corresponds to the rate that scripts are run... if there is even such a thing... the scripts are dependent on the parser, which would seem to be more closely tied the the engine... and i have no idea how that is being controlled as far as speed is concerned...
2 - yes... there are quite a few built in functions, but i'm sure most come from some runtime library, and aren't directly exposed to 3DRAD... for example, the math functions we use, are interfaces to the c runtime library which is added to the script engine... the RAD math functions we use are most likely interfaces to that... as are others...
3 - 3DRAD cannot <include> files like is done in c... everything has to be included in the project before the parser starts executing... there is no compilation, despite the implications... 3DRAD project are "compiled" to assembly of files and resources that the RAD player can use...
4 - i cannot answer this one... i just don't know...
hope this helps a lil...
--Mike
|
|
|
Post by Power Supersport on Apr 30, 2015 5:28:24 GMT
First of all, welcome to the forum! I will try to answer to your questions as simple as I can... 1 - depends on what the script does... actually a normal script does not affect the framerate... 2 - built-in functions are available in the Script Reference As in your case, there are "Math functions" : - There is iFloatSqrt() as in your case sqrt, - There is iFloatSin() and iFloatCos()... if you want to find the tangent value, simply use iFloatSin() / iFloatCos(); Unfortunately script can't include libraries or external scripts... 3 - depends on what function you use... If you use iObjectOrientation() the spin is world-axis relative. If you use iObjectSpin() it's parent relative...
|
|
|
Post by lhc29 on Apr 30, 2015 8:33:40 GMT
thanks for your replies. regarding question 1, what i am really concerned about is "how can i get the interval of a physics frame", as i want to do some time-related calculation. if a script runs precisely 75 times per sec, then i know the interval. but if graphics framerate does affect the frequency of a script, how can i know the interval? and does a script run at the same frequency of the 3DRAD physics system?
what i hope to be true is that the 3DRAD physics system and scripts are in sync, and they all run at 75 fps, while the graphics can be at much lower framerate, such as 20~30 fps.
|
|
|
Post by Power Supersport on Apr 30, 2015 10:12:21 GMT
Script is always cycling 75 times per second... no matter what's the framerate... that's why sometimes you can lose framerate just because script needs to cycle these 75 times successfuly... Personally, I think that they are 60 times per second, but I may be wrong... So... I think that this answers you the question...
|
|
|
Post by lhc29 on May 1, 2015 6:07:20 GMT
thanks. i think, even if the script interval is not constant, i still have a reliable way to get accurate frame interval, that is to use external dll.
now i have other questions: 4) i am using v6.50 now. i notice the coordinates of objects are presented in single float precision. any chance they can be changed to double precision, in future versions of 3DRAD? as single float can't store large values precisely. although the graphics API (DX) only accepts single float, the physics engine can use double float for calculation then reduce to single float only when the values are output to DX. 5) any chance 3DRAD can input/output orietation in matrix format besides quaternion? 6) what are the nearclip and farclip values of a camera? can they be changed?
|
|
|
Post by Power Supersport on May 1, 2015 8:01:07 GMT
You should be very experienced in programming... some of the quesions worth some logic and additional level of thinking... I am sure that if you start to make a game, you will make it easy... just because you know the main stuff... Back to the questions... 4 - I don't make any difference between float and double... I know that double can handle bigger values, but I don't think that there are such big values in Rad... BTW you can try the latest version... 7.22. The problem is that 3D Rad is not supported anymore, so I can't tell you for future versions... 5 - ?! Don't even know what's a matrix... anyway... ... Quaternion contains 4 values... if you succeed to find what they do, you will be very helpful for the community... You can access them by Quaternion(float,float,float,float). 6 - Don't know what you mean with farclip, but what camchase offers is View distance (how far you can see) and Field of view in degrees (How wide you can see)... Your questions were really hard... never though about such a things... Hope that I was helpful...
|
|
|
Post by lhc29 on May 1, 2015 13:54:56 GMT
i have some experience in programming and in some 3D engine, and a little knowledge on most aspects of a PC game, but have never completed a standalone game, mainly because the time required to make an enjoyable game is very long. 3DRAD impressed me by its rendering effects, collision system which can be quickly setup, and the airfoil/tyre/spring/boat physics are much better than arcade games, although they are not so complex as professional aircraft/racecar simulations. these can be a good starting point for making a game or simulation. i want to build up a vehicle (physics) simulation but the foundational work of setting up the system in other game engines seemed much to me. but still, in order to make a good simulation out of 3DRAD, quite a few programming is needed. i mostly use Python language. besides the easy-to-read coding syntax, its built-in functions and the ability to interface with Windows system DLL help me achieve a lot of functionalities quickly. now for me, programming interface is what 3DRAD lacks. for example, in the internal parameters of a rigidbody there are spin rates, but sometime what i need is not just spin rates, but also the acceleration of spin rates. without 3DRAD opening the interface to these values, some functionalities just can't be done. another example, 3DRAD only allows float values in DLL call, and each value is set/get by one function call. this would make DLLcall inefficient if the DLL function performs complicated calculation with a lot of data input/output. so it's not easy to extend the functionalities of 3DRAD with external DLL. i think, for a programmer who does programming in multiple languages and in multiple projects, if a function is complex, writing it in other languages is more preferable than in angelscript. i'm not saying angelscript is a bad choice of script language for 3DRAD, but i would only use a script for simple functions and as a bridge to external DLL, because a script in 3DRAD can't be used anywhere else while a DLL can be used elsewhere. back to the questions. 4) single float values would limit the scale of the 3D world to , say, hundreds of kilometers long. the locations of objects lose precision gradually when they move away from location (0,0,0), at some point, human eye can see the objects jumping about. i hope 3DRAD can be sold to more serious developers so it can be developed further. 5) i guess that, inside the system, matrix of an object is already store somewhere besides quaternion, because in some calculation, matrix values can be used directly. anyway, there are methods to convert between them. for example : www.euclideanspace.com/maths/geometry/rotations/conversions/matrixToQuaternion/ . but if matrix are already stored in 3DRAD system, then the users should not be required to do the calculation again. 6) farclip should be the same as View distance. nearclip is where objects begin to show up, anything closer than nearclip is not drawn. common indoor games have nearclip of , say 0.1 meter, while outdoor games have higher value. the principle is that, farclip can't be too big compared to nearclip, such as 0.1 unit nearclip with 100,000 unit farclip could make objects behind a wall be seen by the player. if 3DRAD is used for simulation in a large open world, such as a flight simulation on earth, nearclip and farclip values would become critical. nearclip/farclip values are properties of a camera in either DX or OPENGL, just that 3DRAD hasn't expose them to the user.
|
|
|
Post by Power Supersport on May 1, 2015 14:07:31 GMT
Honestly to say... most of these things that you asked for... I have never though about them...
Really... just started to use 3D Rad and ... then learned the script system... But I never got myself into such a complex things...
|
|
|
Post by DellyArts on May 2, 2015 8:44:09 GMT
lhc29 if you want to see a driving simulation game made by 3DRad engine, check out my game. It's just a little sample of what can be achieved by 3DRad Banting Setir - Driving Simulation
|
|
|
Post by lhc29 on May 2, 2015 10:17:20 GMT
sorry, i would like to try, but i can't connect to mediafire nor facebook, so can't download it.
|
|
|
Post by Power Supersport on May 2, 2015 10:50:38 GMT
Gonna upload it to another host...
|
|
|
Post by lhc29 on May 2, 2015 13:01:29 GMT
looking forward to it.
meanwhile, i downloaded v7.22 from 3drad homepage. the title of 3drad window says 7.22(sw). does it mean shareware? is it totally free? and in which way is 7.22 better than 6.5?
thanks.
|
|
|
Post by Power Supersport on May 2, 2015 13:35:24 GMT
I don't know what it means...
On my first machine, there was 7.22 (sw), on my new one, it types 7.22 (hw)...
Don't even know what it means...
|
|
|
Post by Power Supersport on May 2, 2015 14:12:13 GMT
I changed the host of the file (Dropbox)... just re-download it from the games page...
In case that even dorpbox doesn't work for you, I'm gonna upload it somewhere else as temporary file...
|
|
|
Post by lhc29 on May 2, 2015 15:39:46 GMT
I don't know what it means... On my first machine, there was 7.22 (sw), on my new one, it types 7.22 (hw)... Don't even know what it means... so i guess sw should mean Nvidia PhysX running in software mode and hw means PhysX in hardware mode (which requires a graphic card that supports PhysX). about dropbox, sorry to tell you, it doesn't work for me either
|
|
|
Post by Power Supersport on May 2, 2015 16:23:40 GMT
Don't worry... Gonna link it in a second...
BTW, YOU ARE COMPLETELY RIGHT ABOUT THIS ! ! ! I didn't even know about it, never even though about...
My old PC had Intel HD Graphics video card, my new one has NVIDIA GeForce... Which means that you are completely right!
You are very clever, man... I think that you will be very helpful to the community...
|
|
|
Post by Power Supersport on May 2, 2015 17:11:01 GMT
|
|
|
Post by DellyArts on May 3, 2015 6:34:49 GMT
Upload that on thepiratebay! lol
|
|
|
Post by Power Supersport on May 3, 2015 7:57:24 GMT
No, no, no... thepiratebay is too pirate site and it's only for torrents....
I hate that site...
By the way, I forgot to ask you before, do you have any problem that I upload your game to another hosts?
|
|