Jump to content

Josh

Staff
  • Posts

    24,625
  • Joined

  • Last visited

Everything posted by Josh

  1. Messages with zero delay are sent immediately.
  2. Josh

    2.3 Sync

    Try this: fw.main.camera:SetMatrix(object.cameraPivot.mat)
  3. It looks like the filter needs to be moved to the end of the line, or added in the water shader as well.
  4. Not free, but good: http://www.soundrangers.com
  5. Josh

    GetLuaState()

    This command has been added to the DLL. It is experimental. It will return the lua state used in the engine. You might be able to import the lua library and perform commands on this variable. I don't know if it is okay to access one lua state with a separately intialized instance of Lua. If it isn't, then eventually we will expose the whole Lua command set through the engine DLL.
  6. Josh

    2.3 Sync

    entity.matis a member where the matrix can be accessed. Rick, I need more information from you. I don't know if you are running something in the editor, a scripted app, a C++ program, etc.
  7. Josh

    12-17-2009

    Attacked? Did I chase you with a sharpened stick?
  8. I think NVidia pursues these kind of things to raise their stock price. There is no way they are making a profit with this product, but it gives them something to show off and reinforces the idea that they are the leader innovating new technology. Cuda, PhysX, 3D vision, all of these projects lose money but they make NVidia look better to technically ignorant stockholders. When you see these grand web pages on NVidia's site talking about some new technology, it isn't aimed at the consumer. They are courting stockholders and potential stock buyers. After thinking about it, I really believe the decision to pursue these things was based on the desire to raise stock price even though it lowers profits. It's not really a good or bad thing, but it would be a mistake to get suckered into technology the proprietor themself doesn't even believe in.
  9. We already have mostly procedural environments. You can distribute grass and trees based on certain parameters. You don't have to paint every spot of ground because you have parameters for the different layers. You can generate the terrain in L3DT and get a procedural heightmap. The dream is an infinite world with easy tools to procedurally generate most of it, then go in and adjust the things you specifically need by hand. That's pretty close to what we have now. But the whole streamed infinite world is a developmental nightmare, especially for an open-ended engine not locked to a simple racing genre. So let's make the most of the mature technology we have now, and everything we develop in the current engine might someday be useful in a version 3.
  10. Josh

    2.3 Sync

    I don't have any such errors with those objects, and Lua is much less prone to hardware differences than graphics are.
  11. The Lua command DoFile() simply executes all the code in the specified file. Require() only executes the code if it has not yet been run in the lua state. With a multi-state system this is not much of an issue, but in a single-state system it has a few ramifications. Let's consider the light_directional.lua class script. Pretend we want to make a change in the class.lua script and have this change seen by re-saving the light_directional script. We make our changes to class.lua and save it. Then we re-save the light_directional script. The changes in class.lua will not be apparent, because the light_directional script calls Require(), not DoFile()! The lua state sees that class.lua has already been run, so it doesn't bother re-running it. There is a way around this. Simply open the integrated script editor and type in "DoFile("Scripts/class.lua")". The script will be re-run. Then you can save light_directional.lua and the changes in class.lua will be apparent. Re-running a script will re-create any tables that were created in that script, and any values added to them will be lost. So if you were to run a script like core.lua, where the class and object tables are created, the results will be unpredictable. Hopefully this helped you to understand better how scripts in the engine work. Remember, you can always save and reload the scene if you think you did something bad to the lua state. Live programming is by its very nature a touchy matter, so if you are doing "heavy" coding you might want to stick to the standalone script editor until you have something stable.
  12. Josh

    12-17-2009

    Well, the single-state lua update is out and I am ready to start making tutorials again. Someone in the forum pointed out the game Fuel to me. This is an offroad racing game with a nearly infinite world. The data is streamed off the hard drive, basically like its treating the drive as if it were extended RAM. The game got bad reviews, but I think it's great. I went driving for at least 30 minutes and covered mountains, desert, redwood forests, and ravines. I'm in love with the terrain engine. If only they had used that to make S.T.A.L.K.E.R... There's much to do with our existing technology before I start inventing new technology again, but the possibilities are intriguing.
  13. Josh

    2.3 Sync

    Ah, you are right. I uploaded your fix to the server. You can probably guess what happened. I used to call the Refresh() function Update(), but then changed it because I didn't want it called each frame.
  14. Well, for terrain at least it makes sense. I bought Fuel. What an amazing game. Can you imagine if they had made an FPS with that?
  15. Josh

    2.3 Sync

    What would commented-out code you add to template.lua have to do with the waterplane script?
  16. Josh

    2.3 Sync

    Yes. The environment_atmosphere script uses it.
  17. I played this game on the PS3. When the car hits that ramp and knocks over the tower, the ramp has an animation that makes it "fall" on a pivot, but the tower is completely solid. Unless I remember wrong. I actually bought this game and studied it a bit because someone was interested in having us design something similar, but it didn't work out.
  18. Josh

    2.3 Sync

    Just add this code and uncomment as needed: --[[ function object:Update() end ]]-- --[[ function object:UpdatePhysics() end ]]-- --[[ function object:Render() end ]]--
  19. Motorstorm is just a generic racing game. That movie is mostly prerendered CG.
  20. The only version sold now is 2.3. Keep in mind you still have to design gameplay yourself. The engine takes care of the technical foundation and lets you make the game.
  21. The problem is Fuel is only a racing game. A game with weapons or more complicated interactions is a lot more complex. I definitely like their design, though.
  22. Josh

    2.3 Sync

    All the old class functions are supported. Update() and UpdatePhysics() work a little differently now. They will be called once per model, when the world that model is in is updated or has a physics step. This was found to be the best approach. So it's a per-instance function; You don't have to loop through all the instances of a class or anything like that. There are also a few functions the engine will automatically call at certain points if they exist in the lua state: UpdateWorldHook( world ) --when the world is updated UpdatePhysicsHook( world ) --called for each physics step FlipHook() --can be used for drawing These are global functions not attached to a model. You can set up your own Lua hook system inside these functions, make them general functions for updating various things, or don't use them at all. You will notice the road_node script includes the "hooks" script, and calls AddHook() to add the road updating function. Now this is a hook system written entirely in lua. If you look in loop.lua, you can see this declares the UpdateWorldHook() function and uses the Lua hook system to call any Lua hooks the user added, including the road update function we added. Note that when the road class is freed (all instances of the model are freed) the lua hook is removed. It's actually not as complicated as it sounds, and it allows updating during the game loop on both a global and per-entity basis. One additional object method was added, Render(). This will only be called right before a model is rendered. This is useful for things like flickering lights, where you have a constant update but you don't want to clog up the engine performing a bunch of updates on objects that aren't even onscreen.
  23. Josh

    2.3 Sync

    Copy the template.lua script: require("scripts/class") local class=CreateClass(...)
  24. Wow, Fuel is awesome. I downloaded the demo. Can you travel across the whole world in the full game?
×
×
  • Create New...