Jump to content

Canardia

Developers
  • Posts

    4,127
  • Joined

  • Last visited

Everything posted by Canardia

  1. When using vec3, the coordinates should be noted with small letters (x,y,z), like GLSL does, and also NASA. When using Vec3, the coordinates should be noted with capital letters (X,Y,Z), like in the C/C++ headers, or Panda3D (although it's a pure C++ API, so it uses getX() and setX() instead). I find it a bit confusing, and hard to port code between LUA and C/C++, when LUA uses Vec3.x, and not vec3.x or Vec3.X.
  2. For the airplane: function Initialize() for model,entity in pairs(entitytable) do local target = model:GetTarget(0) if target~=nil then AppLog("TARGET 0 FOUND") pos = model:GetPosition() pos.y = pos.y + 0.02 pos.z = pos.z - 1.67 target:SetPosition(pos) rot = EntityRotation(model) target:SetRotation(rot) CreateJointHinge(model,target,Vec3(-1,0,-1.67),Vec3(0,0,-1.67)) end end end For the propeller: function UpdatePhysics(model) local entity,model for model,entity in pairs(entitytable) do if entity.active~=0 then model:AddTorque( Vec3( 0, 0, 100 ) ) end end end
  3. I tried to add a propeller to the rear of the airplane, but no matter how I joint it, it always rotates the airplane too, when I turn the propeller (model is the airplane, target is the propeller), and I try to turn the target around its Z axis: CreateJointHinge(model,target,Vec3(-1,0,-1.67),Vec3(0,0,-1.67)) A similar code works fine in C++, and I can turn the target around its Y axis: CreateJointHinge(model,target,Vec3(-1,3,0),Vec3(0,3,0)) Btw, a documentation how joints should be used would be also nice, so far I've been only guessing
  4. It would be logical to have model:SetRotation() and model:GetRotation(), since there is also model:GetPosition() and model:SetPosition(): pos = model:GetPosition() target:SetPosition(pos) rot = model:GetRotation() target:SetRotation(rot)
  5. Ah, that was it! It doesn't really matter in which order the 2 models are spawned, since both need to be loaded first. I need to make a delayed initialize, so around 5 seconds after the scene is loaded, I need to call my custom Initialize() function for all models: function Initialize() for model,entity in pairs(entitytable) do local target = model:GetTarget(0) if target~=nil then AppLog("TARGET 0 FOUND") end end end I don't know if there is somekind of function which would inform me that all models are loaded, or do I really have to wait for a random amount of time before I can call this Initialize for all models. Actually I have one idea how to make this automatic: I could create a SceneReady model, which I manually place at the end of the sbx file, and it would have an script which sets a global flag that now the whole scene is loaded. Then the UpdatePhysics() function of each Model checks for that flag, and calls the Initialize() function once. Or I could have a frame counter, which is raised by 1 each time the UpdateWorld() is called. The FrameCounter would be a model too, and only if it has the value 2, then the Initialize function would be called from each Model's UpdatePhysics() function.
  6. I think you have multiple physics bodies, if you don't create one with phygen, but create one by code on top of the fixed physics body which Editor creates if you didn't create your own physics body with phygen.
  7. When I add this to my Spawn function, it doesn't find the target: function Spawn(model) local entity=base_Spawn(model) local target = model:GetTarget(0) if target~=nil then AppLog("TARGET 0 FOUND") end end It's correctly targetted in the sbx file: Model { path="fuselage.gmf" position=-2.82523990,10.4962835,-4.36183310 rotation=-1.15659511,0.360873282,-0.258110493 scale=1.00000000,1.00000000,1.00000000 id=503696184 target0=503749016 "class"="Model" "collisiontype"="1" "friction"="0.00999999978,0.00999999978" "intensity"="1" "mass"="1.0000000000000000" "name"="fuselage_1" "reloadafterscript"="1" } Model { path="propeller.gmf" position=-2.84715009,9.77161789,-6.75078249 rotation=0.000000000,0.000000000,-0.585468173 scale=1.00000000,1.00000000,1.00000000 id=503749016 "class"="Model" "collisiontype"="1" "friction"="0.500000000,0.500000000" "gravity"="0" "intensity"="1" "mass"="1.0000000000000000" "name"="propeller_2" "reloadafterscript"="1" }
  8. You don't need to create a physics body with LUA, just make a phy file with phygen for it.
  9. Print("HELLO") didn't work for me, but AppLog("HELLO") works fine.
  10. I would build the submarine of seperate components, and then join them together with physics joints. That way you can have many identical compartments repeating through the submarine, and just add some pipes, desks, shelves and other stuff to each compartment. That makes you also able to break the submarine apart, or only parts of it. And when the submarine turns, pitches or rolls, the player would see the angle, even when he is inside the ship. I think that would bring a great immersion and make it feel more real.
  11. For almost a year Max3D lead the charts, but the single fact that LE has now realtime scripting, brought it 1 more point, totalling in 14 points and beating all other engines on the market: http://siipi.com/public/mika.nsf/0/2AAC3EECC888AC57C22575F7004ADC16 Some people might need a low-end engine, but this very same chart provides that information also: You just look which engine has low-end support and is ranked highest. The same way you can find the best engine for your needs, if you have similar special needs as low-end support. Anyway, congratulations Josh, for getting number 1 with your engine And I think this was just the beginning of a new era, called Social Game Development. I can foresee that LE gets even more points in future, broadening up the gap to other engines.
  12. You served us well for many years, beating all competition, and it shows in your old age and scars of development. To bring back the freshness and speed of the old days, with a modern and powerfully multitalented browser, we say:Welcome SeaMonkey 2.0!Why?Here are some reasons why SeaMonkey is better than Firefox:1) Uses only 56MB on google.com, while Firefox uses 82MB2) Faster than Firefox 3.5.5. Firefox 2.0 was always faster, and SeaMonkey is based on that.3) Firefox 3 introduced frequent crashing, especially when you close and reopen it quickly, but also randomly when you open it.4) Firefox 3 hangs up quite often, taking all CPU load, even on simple web pages with only one instance running.5) SeaMonkey has also e-mail, graphical HTML editor, and IRC built-in. Still it uses less memory than Firefox.6) Firefox takes sometimes 10-20 seconds to open certain Ajax based chats on forums.7) SeaMonkey runs on Windows, Mac, Linux (just like Firefox).8) It has less security holes, and is less attacked (since most attackers focus on IE and Firefox).9) Firefox takes over 30 seconds on first time to open when I start my PC. SeaMonkey takes 7 seconds.10) It has collapsible toolbars, like Netscape had. It has collapsible and resizable sidebars, just like Notes 8 has!11) It has profile switching! This is very useful for web developers, as they don't need to use different browsers for each user, or close all browser windows to switch a user.12) It has theme switching.13) It has a site navigation bar.14) It scores 93/100 on Acid3 test (same as Firefox 3.5.5, but IE8 gets only 20/100, and IE9 gets 32/100): http://acid3.acidtests.org15) It has no home button (yes, that's a benefit, read on...). I was at first confused and thought, that cannot be, it's a useful button! But then I thought about it more, what is it actually? It's just a clickable item in the browser. So I figured, I can just as well put my new home button as first link in my bookmarks sidebar (F9, not Ctrl-B like in Firefox). Then I have all clickable sites in the same place, and don't need to move far distances with the mouse to the home button. Play it in your mind, how you navigate to the links and to a home button near the navigation buttons. It suddenly feels very unpleasant to have to use links in different locations. It feels like I have to switch to a different thinking routine, and that's stressing.16) It has probably a lot more benefits over Firefox, but I just started using it an hour ago :)17) Pressing Ctrl-U gives you a adhoc-realtime source display of a web page. You can update the source by refreshing the window. You can't do that with any other browser.It's not so far fetched for (ex-)Firefox lovers, as Mozilla features them side by side, although you might notice that they say that the all-in-one Mozilla suite is no more, so what to choose? (the choices are alphabetically sorted, to avoid any bias):http://www.mozilla.org/projects/browsers.html Source
  13. Canardia

    Coroutines

    The way how coroutines work sounds like a simple function call to me. It stops the execution of the calling function, and continues when the called function returns.
  14. Theoretically when you add this code block to the fpscontroller.lua, after the line fw=GetGlobalObject("framewerk"), it should make it runnable from outside Editor, but for some reason it crashes. Maybe Josh could check why?: if fw==nil then --Register abstract path RegisterAbstractPath("") --Set graphics mode if Graphics(1024,768)==0 then Notify("Failed to set graphics mode.",1) return end --Create framewerk object and set it to a global object so other scripts can access it fw=CreateFramewerk() if fw==nil then Notify("Failed to initialize engine.",1) return end SetGlobalObject("framewerk",fw) fw.main.camera.position.y=20 scene=LoadScene("abstract::tunnels.sbx") end If you change it to load train.sbx, then it doesn't crash, but the player doesn't collide with the terrain. I tried scene:SetType(1), but there is no such command.
  15. Those lines need to be added to gamelib, so you don't have to write any additional lines in your game code.
  16. Does that mean no Demo coming soon?
  17. I've been checking the website of Project Metal daily, and it says the demo is coming soon: http://projectmetal.co.uk
  18. LE uses OpenGL 2.1 at the moment, that's much better than DX 11 (which only Win7, and no hardware cards yet support), and it runs even on XP (and Mac, Linux, and all other systems).
  19. There was a LUA GUI made by TylerH in LE 2.3 Beta 2. It's not included in the final LE 2.3, so I guess it will be published later.
  20. I've been experiencing a distinquished behaviour of the community for some time. It's like when someone advances in his work, suddenly everyone else advances too. Yeah, I know in history also similar or identical inventions have been made around the world at the same time without that the inventors were connected or cooperating anyhow with eachother. There has been made also tests with apes, who learned that a banana was served in a certain spot, and new apes would go to that spot without never having being in contact with the previous apes who learned it. I don't call it supernatural, but there must be somekind of impulse and sharing of knowledge, over the remaining 7 dimensions we know of today. Sure, the tools, libraries, code snippets, demos and the entity packs which LE 2.3 now supports will play a big role too in this evolution. Soon everyone will get a lot of fully working and exchangable models with their own logic shared via this site. There has been a lot of people asking about real games made with LE. I think when the first one comes, suddenly a lot will come at the same time or shortly after. Especially with this new social development site. Of course there has been a few dozen playable games already published with LE, but no real games, like Crysis, which go fully commercial and AAA with every little tweak and trick and most polished arts possible.
  21. Exactly, and if I find it easy to learn new things, you should find it even easier
  22. I had computers even before I had the C64 and Amiga. Anyway, just try it in a real game, you'll be surprised how well the human adaption engine works
  23. You get used to it very quickly, like in 5 minutes, and after that WASD feels much easier and more natural than cursor keys. I also used cursor keys for years, but one day I tried WASD keys and I was amazed how much better it is, I could now also access the number keys much faster to switch weapons and cast spells (in WoW). Also the E key for activating things, and F key to pick up things are next to your movement keys now. Some modern laptops, like from ASUS come also with pre-marked WASD keys.
×
×
  • Create New...