-
Posts
2,157 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Downloads
Everything posted by Marleys Ghost
-
Not sure I follow 2.28 was an update to 2.27 ... or 2.2x ... and was not charged for.
-
Who in their right mind would do such a thing?
-
The old ProcessScene was pretty basic. You will have to parse the waterplane entity for it attributes, then setup the water in your code. As mentioned before on this thread, "the only things it won't do in C++ is the waterplane and skybox as far as I know. The Tutorial is old. From 2.26 on I wrote my own process scene function. Now in 2.3 only a few things would need parsing seperately from the LoadScene command."
-
mass = 1 ... Real weight equivalent ?
Marleys Ghost replied to Andy Gilbert's topic in General Discussion
Heavy water is mildly toxic if ingested ..dangerous when ingested in in large amounts .. -
mass = 1 ... Real weight equivalent ?
Marleys Ghost replied to Andy Gilbert's topic in General Discussion
About 2.2 lbs in "old" money -
See Here
-
Which is why I said "Copy the scripts folder to the Project directory" and "I made it so the code points to the SDK folder so nothing, other than the scripts folder needs to be moved to the app dir."
-
Well for now forget 2.28 ... has it ever worked for you in 2.3? has it just stopped working in 2.3? what have you tried so far in 2.3? did you install 2.3 over 2.28 or to a new directory? all I can do is speculate when all I have to go on is "It just does not work. "
-
Did it ever work for you? has it just stopped working? what have you tried so far?
-
No problems here either just set a 128x128 terrain left the default settings and even without a texture its obvious its "sculpting". I am not sure if there is anymore information you can give to help recreate your problem?
-
The old ProcessScene.cpp had that problem with later versions. I did a quick and dirty fix by removing: //Remove children from scene root child_count=CountChildren(scene); for( i=1; i<=child_count; i++ ) { entity=GetChild(scene,1); if (EntityHidden(entity)) { FreeEntity(entity); } else { EntityParent(entity,NULL); } } //Free scene root FreeEntity(scene); Thats was before I wrote my own ProcessScene Function. But the tutorials are "old" and had issues with later versions of the SDK.
-
Setup a new project with LEWizard Copy the scripts folder to the Project directory Create a simple scene, flat terrain, Directional light and barrels save in the maps folder in the SDK folder. #include "engine.h" int main(int argc, char** argv) { TWorld world; TCamera cam; Initialize(); RegisterAbstractPath("PATH TO YOUR SDK FOLDER"); //Create a graphics context Graphics(800,600); //Create a world world=CreateWorld(); if (!world) { MessageBoxA(0,"Error","Failed to create world.",0); goto exitapp; } //Create render buffers TBuffer gbuffer=CreateBuffer(800,600,BUFFER_COLOR|BUFFER_DEPTH|BUFFER_NORMAL); TBuffer lightbuffer=CreateBuffer(800,600,BUFFER_COLOR|BUFFER_DEPTH); //Create a camera cam=CreateCamera(); CreateListener(cam); SetGlobalObject("world_main",world); SetGlobalObject ("camera_main",cam); TListener listener= CreateListener(cam); SetGlobalObject("listener", listener); //Load the scene TEntity scene; scene =LoadScene("abstract::simple.sbx"); //Texture quality settings TFilter(1); AFilter(4); //Create the spectator TBody spectator=CreateBodySphere(); SetBodyMass(spectator,1); SetBodyGravityMode(spectator,0); SetBodyDamping(spectator,1.0); SetBodyElasticity(spectator,0.0); SetBodyBuoyancyMode(spectator,0); EntityType(spectator,2); PositionEntity(spectator,Vec3(0,2,-4)); float mx=0.0,my=0.0; float move=0.0, strafe=0.0; TVec3 camrotation; HideMouse(); MoveMouse(GraphicsWidth()/2,GraphicsHeight()/2); Collisions(1, 1, 1); Collisions(1, 2, 1); Collisions(1, 3, 1); Collisions(2, 2, 1); Collisions(2, 3, 1); Collisions(3, 3, 1); //================================================================ //Main loop //================================================================ while(!KeyHit(KEY_ESCAPE)) { //Camera looking mx=Curve(MouseX()-GraphicsWidth()/2,mx,3); my=Curve(MouseY()-GraphicsHeight()/2,my,3); MoveMouse(GraphicsWidth()/2,GraphicsHeight()/2); camrotation=EntityRotation(cam); camrotation.X+=my * 0.1; camrotation.Y-=mx * 0.1; RotateEntity(cam,camrotation); //Camera movement move=KeyDown(KEY_W)-KeyDown(KEY_S); strafe=KeyDown(KEY_D)-KeyDown(KEY_A); TVec3 force = Vec3(strafe*10.0,0,move*10.0); force=TFormVector(force,cam,0); AddBodyForce(spectator,force); UpdateAppTime(); UpdateWorld(AppSpeed()); //Position the camera where the spectator body is PositionEntity(cam,EntityPosition(spectator)); //Render the main world SetBuffer(gbuffer); RenderWorld(); //Render lighting SetBuffer(BackBuffer()); RenderLights(gbuffer); Flip(); } exitapp: return Terminate(); } You need to update the oildrum.lua file with this: --Add collision noise function Collision(model,entity,position,normal,force,speed) local entity=entitytable[model] local time,i if fw~=nil then listener = fw.listener else listener=GetGlobalObject("listener") end if EntityDistance(listener,model)<30 then if speed>hitthreshhold then time=AppTime() if time-lasthitnoisetime>hitnoisedelay then --Check how many impact noises are already active local countsources=0 for i=0,2 do if hitnoise[i]~=nil then countsources=countsources+hitnoise[i]:ActiveSources() end end --Only emit a sound if there are fewer than the allowed max sources if countsources<maxhitsources then i=math.random(0,2) if hitnoise[i]~=nil then entity.model:EmitSound(hitnoise[i],30,1.0,0) end end lasthitnoisetime=time+math.random(0,hitnoisetimevariation) end end end end I made it so the code points to the SDK folder so nothing, other than the scripts folder needs to be moved to the app dir. This is only a very basic outline based on the code you supplied.
-
Great, am glad you managed to sort it out
-
Have a read through this Thread it may help.
-
mass = 1 ... Real weight equivalent ?
Marleys Ghost replied to Andy Gilbert's topic in General Discussion
So are we agreed? SetBodyMass(1) = 1kg? -
I get lights, sounds, emitters, coronas, models etc.. Don't get a direct skybox parsing or so far waterplane. All in C++ Waterplane works as well in Bmax.
-
Now with 2.3 I simply LoadScene .. the only things it won't do in C++ is the waterplane and skybox as far as I know. The Tutorial is old. From 2.26 on I wrote my own process scene function. Now in 2.3 only a few things would need parsing seperately from the LoadScene command.
-
mass = 1 ... Real weight equivalent ?
Marleys Ghost replied to Andy Gilbert's topic in General Discussion
wow it's turned into the Fizzsicks thread lol ... what equation are you using for Velocity? -
..camerazoom<->foreground world relationship..
Marleys Ghost replied to Naughty Alien's topic in Programming
I use SetZoom with framewerk this sets the camera zoom for all 3 worlds at the same time. Have not noticed any probs with it so far. -
I think the answer is somewhere in this Thread
-
mass = 1 ... Real weight equivalent ?
Marleys Ghost replied to Andy Gilbert's topic in General Discussion
I don't know if it uses a particular SI or CGS unit for its value system, most just seem to call it "a unit" and deifne it to "whatever" such as 1.0 = Kg or 0.001 = g -
Hi Pixel, its looking good, the birds where a nice touch, I have slated "wildlife" AI attempts for Lua hopefully to employ some form of "boid" function. Nice job I don't think the Gallery has a Youtube embedding function, maybe thats why we also get the showcase?
-
mass = 1 ... Real weight equivalent ?
Marleys Ghost replied to Andy Gilbert's topic in General Discussion
Without knowing how Newton uses this I get the feeling its arbitary .. SetBodyMass has a float value so you could make a distinction yourself 1.0 = Kg or 0.001 = g .. it will make no difference to say two oil drums with differing mass values dropped from the same height in the editor. But would have effect on say collisions between two oil drums with differing mass values. As for equations in real life, you'd have to know just how newton works, and if it uses those at all I should imagine it is optimized for games not the lab. -
mass = 1 ... Real weight equivalent ?
Marleys Ghost replied to Andy Gilbert's topic in General Discussion
A better demonstration of "regardless of size or shape or weight,will free fall with the same acceleration in a vacuum." than my paper "crunching" .