-
Posts
801 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Downloads
Everything posted by Naughty Alien
-
Hello Leadwerks World
Naughty Alien commented on Chris Vossen's blog entry in Chris Vossen's Development Blog
.. welcome on board, and have a good coding time and a lot of successful particles -
Character Animation Control
Naughty Alien commented on Naughty Alien's blog entry in Naughty Alien's Blog
..full version will introduce very easy logic setup for all controls, switching, speed of animation casted over to controller, automatic animation play when character moves over certain obstacles (like you are running and small wall appear, then system will automatically play animation of jumping over with adjustment of controller), cut scene manager with auto sync with sound, etc.. -
-softparticles -physcs responsive particles -trail particles -fillrate control (auto-manual) ..that would be good for a start to have in default setup..
-
..after pathfind library and animation library, im planing to push out very easy to use controller library..but after that, im wondering what else would be required most?? Reason for listed 3 libs is because most of requests i have received and questions on forum, are related to this 3 libs, so i would like to know, what would be most required lib after this 3 ??
-
..Aily, which version you running ??
-
Any good tips or techniques on how to texture stones?
Naughty Alien replied to paramecij's topic in Game Artwork
..Photoshop CS4 can load/paint OBJ, so you can turn it all around and paint on any way you want..and later export back with corresponding textures.. -
..well..i believe there is..instead of checking whole structure, each NPC has its own cycle where is performed basic check over 'idle state'. If NPC 'idle state' is intruded by other NPC at that time driven by TBrain, whole lookup cycle is skipped on side of intruded NPC, because TBrain know its already intruded and performing all operations over intruded NPC. While it doesnt look much, in actual crowd simulation it shows massive speed gain simply because less individual lookups are performed, more AI is involved. There are several advantages over various NPC types behaviour with such system as it is independent from NPC structure itself. Also, some NPC's can be determined as a 'STATIC' in terms of AI, and they will not update even itself, until TBrain set them to do so (example is guards standing at entrance, reacting only if certain characters approach them, controlled by TBrain).
-
..i do it in such way that, I have one 'central' class called TBrain..this class knows everything about every NPC out there..one of known features is also 'idle state' of each NPC, therefore, TBrain will approach ONLY NPC outside of its own 'idle state'. For NPC what are considered in 'idle state' , they will be left to update itself so AI doesnt spending any time on them. Soon as NPC goes outside of 'idle state' (reporting to TBrain), TBrain will check TBehaviour member of NPC class and based on that, determine what to do with given NPC. On that way, system is rather fast, and whole structure update itself only when it have to. It works on massive number of NPC's (crowd simulation) very very well..recently i read, similar approach is used over Left4dead actually..
-
Character Animation Control
Naughty Alien commented on Naughty Alien's blog entry in Naughty Alien's Blog
..character is Heru, main character from my game Hidden Dawn..character u saw is actually LOD2 level, and because its going to be used in one of my games, I couldnt share it, not that im stingy Next library is controller control library, what will be blended with existing one. After that, everything will be ready for AI tutorials. -
Character Animation Control
Naughty Alien commented on Naughty Alien's blog entry in Naughty Alien's Blog
hey MG, thanks man..later ill show how this library can automatically make character play certain animations during crossing over specific obstacles..like, you running, then small wall is in front of your character and once close enough suddenly, character plays jump over wall animation and continue running as it was before wall.. .. many features available.. -
This time, I have decided to introduce character animation control. There are several reasons for that. A lot of people asked me to give some example, and at same time, such library will be essential for following AI tutorials, so having said that, I have decided to introduce AI library, so it will be avoided confusion with corresponding command set in AI tutorials. I would like to also make note that all libraries I have released and Im planning to release, are a lite version of fully fledged feature set in game engine Im planning to sell, after my game is out, so all this is some sort of 'advert' what full version can do, in order to make people more interested about system. Now, lets go back to topic. During game development, one of important roles are game character animations. From programmer standpoint, control of animations must be very simple, much as possible, with same rules applicable to both, gameplay character, as well as NPC's. Even more, it is important to have ability to have character easy 'switchable' between player control or some other system (cut scene manager, AI control, scripted event). So, how is it done in this library?? Very simple. First of all, during design, you will notice that there are always certain animation 'groups'. Animation inside those groups, should fall under same control scheme. Of course, it is entirely possible to have different control scheme for each animation group, but it is NOT advisable. So what are those 'animation groups' ?? Let me explain on provided example. Lets assume that our character has 2 main pose(im not sure is this proper word). In short, lets say that our character can move in normal way (standing up pose) and crouch pose. Each of this poses I call a 'group' . Animations within each group use (should use, but its not necessary), same command set. For example, when character walk while in stand up pose, we use KEY_UP so character animating in WALK animation. When we switch to CROUCH (let say hit button C as usual in games), then SAME command (KEY_UP) will make character animating in WALK animation BUT in crouch pose. Also, while character doesnt move at all, it should be in 'STOP' animation. That animation plays main idle and if player doesnt do anything, system should play some of side idles, if available and after it plays, go back to main idle (like, Lara Croft, bored and play various animations if player doesnt do a thing)..Library giving ability for creation of infinite number of groups and infinite number of animations within groups, so its up to designer/programmer to utilize system properly Library command set is rather simple, and yet powerful, so lets see command set. 'CREATE ANIMATION FOR CHARACTER CHARACTER:Tanimation CHARACTER = TAnimation.Create("MyCharacter.gmf",IdleTriggerTime:Int=20000) MyCharacter.gmf Its animated character we want to control. IdleTriggerTime:Int=20000 This is time representing how long will be played main idle, before plays one of randomly choosen side idles, if any. So it is time what system will wait player, before switch to one of 'boring' animations. Its exposed in milliseconds, so default value is 20000 what is 20 seconds. 'ADD ANIMATION GROUP('S) CHARACTER.extract_sequence("ANIMATION GROUP NAME", "ANIMATION COMMAND NAME", firstFrame:Int, lastFrame:Int,playType:Int=CONTINOUS_LOOP, idleType:Int=MAIN_IDLE, transition:Float=0.0, speed:Float=1.0) This command will extract animation stored in given frame range, under ANIMATION COMMAND NAME and inside ANIMATION GROUP NAME. ANIMATION GROUP NAME Thisis name of specific animation group, what will contain specific animations. ANIMATION COMMAND NAME This is name of specific animation, what will be used to play specific animation, during gameplay. firstFrame First Frame of animation lastFrame Last Frame of animation playType It is flag representing way animation is played. It should be left in default value (CONTINOUS_LOOP), as other modes are used for internal processing as well as for some other libraries im about to introduce later, during AI lessons. Just for info, available flags are: -CONTINOUS_LOOP -ONE_LOOP_THEN_IDLE -ONE_LOOP_THEN_STOP But as i said, you SHOULD let it be default value only, as others are used for other things, we will see, later. idleType This flag tells to system what kind of animation is one to be loaded and therefore, how it will be treated. If animation is MAIN IDLE then flag is MAIN_IDLE. If animation is idle for 'bored' animation, then flag should be SIDE_IDLE. SIDE_IDLE animations are attached to MAIN_IDLE and after idleTriggerTime is elapsed, one of SIDE_IDLE animations will be played and then go back to MAIN_IDLE. If animation is not any kind of IDLE animations, then it should be flagged as NOT_IDLE. This flag will be our, walk, run, jump, die, etc, animations we control. So possible flags for animation types are: -MAIN_IDLE -SIDE_IDLE -NOT_IDLE transition This is value representing transition smoothnes between animations. speed This value representing animation speed. Default value is 1.0. 'INITIALIZE ANIMATION SETUP WE WANT TO START WITH CHARACTER.enable_initial_animation("ANIMATION GROUP NAME", "ANIMATION COMMAND NAME") This command will basically set choosen animation group as default one and play animation from that group with ANIMATION COMMAND NAME when program starts. Usually used to setup main idle play before game starts. In order to play some animation in runtime, we use command CHARACTER.play("ANIMATION COMMAND NAME") This command has to be called just once and system will play it, long as it is not called any other animation. During runtime, we want to switch from one animation group, to another. In order to do that, we use this command: CHARACTER.enable_animation_group("ANIMATION GROUP I WANT TO MAKE ACTIVE") CHARACTER.play("INITIAL ANIMATION NAME I WANT FROM JUST SELECTED ANIMATION GROUP") And thats pretty much all. If you wanna free from memory all stuff, during switching levels and what not, just do this: CHARACTER.Free() CHARACTER=Null ..and you are freeeeeee... I hope you guys will have some nice use of this library. Stay tuned as MUCH more comming.. NOTE: Inside zip file is EXE. you can run it in order to see how it works. EXE contain all shaders, dll's, etc so dont put it together with shader folder of yours. Character seen in EXE example, I cant share, but source code of example is kindly provided, so you just play with your own characters. Also, library consider that all animations are stored along ONE frame line, so keep that in mind. Installation is simple..just copy e1.mod folder in to your Bmax mod folder and you are good to go.. Library available here: http://www.leadwerks...ion-libraryzip/
-
that will be covered in one of tutorials Im writing, but unfortunatelly slowly, due obligations i have at this very moment..so if you can wait and in main time do some other stuff, then it will be ok B)
-
glow:Double lum:Double flicker_delay:Double color:TVec3 light_intensity:Double light:TLight 'Somewhere in your main loop '------------------------------------- glow = Cos(MilliSecs()) * flicker_delay lum = (Abs(glow * Sin(glow)) * 255) * Rnd(.1, .8) EntityColor (light, Vec4((color.x + lum), (color.y + (lum / 2)), (color.z + lum), light_intensity)) I hope this helps..
-
yup..or even better , just create desired position Vec3 as a part of class you are using it at and it will be even faster (Globals will at some point start slowing ya down, if too many used)..so, to my experience, everything im using in code is contained withing class itself and there is no temporary variables..so its all working much much faster..
-
..here is TVec3 function.. Function Vec3:TVec3( x#=0.0,y#=0.0/0.0,z#=0.0/0.0 ) Local t:TVec3=New TVec3 If IsNan(y) y=x If IsNan(z) z=y t.x=x t.y=y t.z=z Return t EndFunction ..here is corresponding TVec3 Class... Type TVec3 {value} Field x#,y#,z# {attribute} Method Copy:TVec3() Return Vec3( x,y,z ) End Method Method ToString$() Return "Vec3("+x+","+y+","+z+")" End Method Method ToVec4:TVec4() Return Vec4( x,y,z,1 ) End Method Method ToField$() Return x+","+y+","+z End Method Method FromField:TVec3( t$ ) Local bits$[]=t.Split( "," ) If bits.length<>3 Throw "Format error" x=bits[0].ToFloat() y=bits[1].ToFloat() z=bits[2].ToFloat() Return Self End Method Method Pointer:Float Ptr() Return Varptr x EndMethod Method Length#() Return Sqr( x*x+y*y+z*z ) End Method Method Dot#( v:TVec3 ) Return x*v.x+y*v.y+z*v.z End Method Method Inverse:TVec3() Return Vec3( -x,-y,-z ) End Method Method Reciprocal:TVec3() Return Vec3( 1/x,1/y,1/z ) End Method Method Normalize:TVec3() Local t#=Sqr( x*x+y*y+z*z ) If t=0.0 Return vec3(0.0,0.0,0.0) Return Vec3( x/t,y/t,z/t ) End Method Method Scale:TVec3( scale# ) Return Vec3( x*scale,y*scale,z*scale ) End Method Method DistanceTo#( v:TVec3 ) Local dx#=x-v.x,dy#=y-v.y,dz#=z-v.z Return Sqr( dx*dx+dy*dy+dz*dz ) End Method Method Plus:TVec3( v:TVec3 ) Return Vec3( x+v.x,y+v.y,z+v.z ) End Method Method Minus:TVec3( v:TVec3 ) Return Vec3( x-v.x,y-v.y,z-v.z ) End Method Method Times:TVec3( v:TVec3 ) Return Vec3( x*v.x,y*v.y,z*v.z ) End Method Method DividedBy:TVec3( v:TVec3 ) Return Vec3( x/v.x,y/v.y,z/v.z ) End Method Method Cross:TVec3( v:TVec3 ) Return Vec3( y*v.z-z*v.y,z*v.x-x*v.z,x*v.y-y*v.x ) End Method Method Blend:TVec3( v:TVec3,Alpha# ) Local beta#=1-Alpha Return Vec3( x*beta+v.x*Alpha,y*beta+v.y*Alpha,z*beta+v.z*Alpha ) End Method Method ToQuat:TQuat() Local c1#=Cos(-z/2) Local s1#=Sin(-z/2) Local c2#=Cos(-x/2) Local s2#=Sin(-x/2) Local c3#=Cos( y/2) Local s3#=Sin( y/2) Local c1_c2#=c1*c2 Local s1_s2#=s1*s2 Local t:TQuat=New TQuat t.x=c1*s2*c3 - s1*c2*s3; t.y=c1_c2*s3 + s1_s2*c3; t.z=s1*c2*c3 + c1*s2*s3; t.w=c1_c2*c3 - s1_s2*s3; Return t EndMethod Function FromQuat:TVec3(quat:TQuat) Return quat.toeuler() EndFunction Method Compare:Int(o:Object) Local t:TVec3=TVec3(o) If x<t.x Return -1 If y<t.y Return -1 If z<t.z Return -1 If x>t.x Return 1 If y>t.y Return 1 If z>t.z Return 1 Return 0 EndMethod EndType ..I hope it helps ..
-
@Paul ..good one..nuff said ..
-
..then i have to conclude that you havent seen well written Java or BMax code..
-
..thank you guys for your time and effort in testing it..I apreciate it because its first hand information, from all around world, and I wanna be sure that things are working..as for your questions Red, here it goes buddy.. 1) Im using BMax so i had to create wrapper based on STEAM SDK. Once you do it its literally insertion of few lines of code into game code, not much work at all. 2) yes, Steam SDK is all you need, and eventual additional info, you can easy get from Steam folks..process is easy and nice. 3) Basically, it was quite fast, long as you provide workable demo (few bugs here and there is fine, they are not complaining), so Steam folks can see what is game about and how it suppose to look like...soon after that, you will receive confirmation, and process starts. In my case it took about 2 weeks from the moment of submission first version of demo (buggy one). You also have to have web site and all that support things before they push game out. Steam WILL NOT advertise your game too, so beware of that, because advertisment is something you have to do yourself or pay for it to Steam..either way, its on developer/publisher back.. I hope it helps.
-
LUA is very nice, and unfortunatelly, scripting language too, what is a major disadvantage, from my standpoint..also, as pixel said, for anyone who has slight idea about C++, LUA is not a good way to go..dont get me wrong, Im NOT saying that you cant finish game with LUA or anything like that..im not even saying that LUA is slow or anything performance wise..all im saying is that, from self investment standpoint, for along run, you stand better if you take C++ route (I say C++ because it was mentioned here, but when LE is in case, Im favorizing BMax all the way)...
-
..its just up..not yet completely functional ...give me few dayssss... I would like to know is there any issue with access and speed, and generally, how you guys likes web site design..
-
..hi guys, here is one of last things STEAM required to be done before , first commercial game using LE2.x as a renderer, to my knowledge, is out..now just rest of the crappy paperwork..here is website of game, so, I just wanted to know is it working and can you access it without any issues...if there are any issues, please let me know, Ill appreciate that a lot..it will be some small add ons but basically this is how is it going to look like...any comments are welcome.. Linky: http://hoodwinkgame.com/the-game
-
..while this licensing questions are here, im wondering, is it possible to sell tools for actual game creation, to existing LE user base?? Is that violation of EULA??
-
..try to control character independently from controller...that means also, do not parent character to controller..if character is not parented to controller, basically you can treat it as you already mention..like a character without controller...instead, try to update character transformations based on controller, and when you want to do things such as one you asking for, simply disable character update cycle and expose it to something else (in this case, pushing it down to ground).
-
..when your structure grows, and your classes are nested inside each other, parented entities you using/accessing in different classes are a nightmare to deal with considering all transformations applied to child if parent is modified on any way..this easy came in to picture with animation, particularly cut scene animations where same character/camera acting as a gamplay driven as well as cut scene character/camera...if your 3rd perspective camera is attached to that particular character and at same time involved in to cut scene, where camera/characters are utilized by external keyframing data,you will have entire set of variables as an offset from original state where whole process started..just one of the examples...if you using custom made math lib for specific purpose, things getting even worse..
-
Let say these are your game components. MyPivot:TPivot=CreatePivot() MyCamera:TCamera=CreateCamera() ' Or any camera you use MyTarget:TMesh=CreateCube() MyPivot is used for moving trough space, MyCamera is, well camera , and MyTarget is entity you want your camera to look at. So, in that case, you will do next in your main loop 'Move trough space If KeyDown(KEY_W) MoveEntity(MyPivot, Vec3(0,0,1)) If KeyDown(KEY_S) MoveEntity(MyPivot, Vec3(0,0,-1)) If KeyDown(KEY_A) MoveEntity(MyPivot, Vec3(-1,0,0)) If KeyDown(KEY_D) MoveEntity(MyPivot, Vec3(1,0,0)) 'Now align camera to corresponding position PositionEntity(MyCamera,EntityPosition(MyPivot),1) 'And Finally lets turn camera to requested target PointEntity(MyCamera,MyTarget) ..and you are good to go..there are more advanced techniques to do this, but this is good enough to get you up and running..and one small tip...ALWAYS avoid parenting...ALWAYS..I hope it helps..