Jump to content

Rick

Members
  • Posts

    7,936
  • Joined

  • Last visited

Everything posted by Rick

  1. Nvm, using os.clock() * 1000 as it works in Lua. Josh you gotta fix AppTime() man. I'm writing up a small bug report because AppTime() is jacked.
  2. Playing with animation speed and it seems like AppTime() may be acting slowly? Below is the portion that controls speed of a given animation local appTime = AppTime() if appTime > v.lastTime + v.speed and v.complete == false then v.frame = v.frame + 1 v.lastTime = appTime end If I change v.speed on my model to 0 it runs just as fast as if it's 30. If I comment out the if check and just inc the frame at machine speed the animation is clearly really fast. So wondering why wouldn't having a v.speed value of 0 produce the same result as not having the if check at all and make it go really fast? To put it another way, the below code "should" basically be equal to not even having the if statement and just increasing the frame by 1 at the speed of the machine it's running. Yet this code below doesn't produce the same speed as just v.frame = v.frame + 1 without any checks. It would seem AppTime() is returning the same value through multiple loop interaction then as it doesn't pass that > check every cycle. local appTime = AppTime() if appTime > v.lastTime + 0 and v.complete == false then v.frame = v.frame + 1 v.lastTime = appTime end So if AppTime() can't be used for this, what would my options in Lua be to get accurate application running time in MS?
  3. As much as I'm for a plugin system, maybe in 3.5 or something Adding it later shouldn't require to much change to the editor. The big thing would be expose everything to the plugins. Give the plugins full control over menus, options, drawing screen etc.
  4. Like via PositionEntity()? I thought calling those commands on bodies causes collision issues?
  5. I tried this in my game but it seems a bit much in this case. It really drowns out the textures. http://dl.dropbox.com/u/1293842/Comic.png
  6. I should give this a try just to see how it works in Lua. Putting it on the GPU would be sweet and pretty much negate any language speed talk I would assume. I'll play around with the 200x200 thing in Lua if I get some time tonight. Should be easy enough to setup the example as just data with no visuals and test the time just so we don't all guess at this kind of stuff and it keeps coming up again and again.
  7. 8x8 is my game requirement. A realistic setting would highly depend on the game itself as you have stated. Normally I would have used C++ or C# for this but Josh had a Lua requirement that I'm sticking to. Just reporting my results so far though, not fighting one way or the other. No one has really done it with LE yet for a RTS or FPS so it's hard to say.
  8. I do aggro with YouGroove that a starter kit game going through some of the things the tutorials go through would probably help new people. Just who is going to do that is the question:)
  9. On a recent side note, I've implemented A* in Lua on a pretty small grid (8x8) and haven't seen any slowdown when it's finding the path. I'm moving about 6 units at a time and it runs smooth at that scale. Not saying it'll work great at higher scales but Lua seems to be working pretty good. It's so flexible, but that can come at a price if you aren't careful.
  10. Rick

    GvB

    @Zio lol I know right. My mike sucks and I feel like I'd be yelling if I talked any louder. My wife might look at me weird.
  11. Rick

    GvB

    Thanks guys. @DaDonik I was sort of thinking that same thing. Might give it a try
  12. Rick

    Android Ahead

    Can't wait to have LE run on my tab
  13. I closed the editor then reopened and then it worked. I have had the editor open all day but that seems odd. Thanks!
  14. Do I was following Aggror's tutorial on getting fonts to work from http://www.leadwerks.com/werkspace/topic/3008-leadwerks-tutorial-font-studio/page__p__27857__hl__setfont__fromsearch__1#entry27857 I swear I've followed it but from the editor my font didn't change. Here is the font dds texture and the ini http://dl.dropbox.com/u/1293842/Comic20.dds http://dl.dropbox.com/u/1293842/Comic20.ini Note I've tried with mipmaps and without in the dds file. I also realize I'm wasting a ton of space but I did make my first one smaller in size but that didn't work either so I followed his tutorial exactly and in it he uses 1024. And in my code right before the main loop I have: myFont = LoadFont("abstract::Comic20") SetFont(myFont) I doesn't error out or anything, the font just is the same old default one. What am I missing?
  15. Rick

    GvB

    This is my game I'm working on GvB (Good vs Bad) which is 100% Lua. I'm hoping to get this running in LE3 on a mobile platform via Josh's request from us to provide such a game. There is sound but my mic is horrible so you probably have to turn it all the way up. This video is already really outdated as it took around 8 hours to upload it. I now have every model playing idle and walk animations and they can all move now as well. I also have some cooldown logic running. Talked with the A* for lua library guy and he's going to fix that bug is his pathfinding tonight so that should be in tomorrow. Next Steps ======== Currently working out the combat system!
  16. Rick

    Font Studio

    Not seeing Font Studio in the store. Does anyone have a link to this? Running a search in google seems to bring up FontLab links.
  17. Annika still exists! And you have a company phone number. That sounds like trouble
  18. Just tried it and got the same result. Very odd. nvm, got it working with Fraps! Thanks
  19. Does anyone have strange behaviors when trying to record (say with CamStudio) from the editor? I have pathfinding code that moves from point to point that works fine normally but when I try to record the unit just goes in 1 direction like it's totally ignoring the points to follow. I'm using PositionEntity() and moving over a list of points so it's not like I'm using MoveEntity() with an EntityDistance() check and because of the lag it might miss that distance check so I'm not sure why it does this.
  20. nvm. Can we not delete our own posts anymore?
  21. Model origin is the middle by the feet. I wanted to use the height of the BB because each model has a different height, I just didn't want to hardcode that per model. And I am doing 1/2 the panel width to the left. So basically I'm doing that you are saying. The only difference being I'm using BB top y value instead of hardcoding. That shouldn't affect the x placement of the 2D image though? This isn't a massive issue, just something that would be nice to always have it look perfect. I've moved on, but might come back later.
  22. Rick

    FlushMouse()

    Shouldn't calling FlushMouse() between MouseHit() calls in the same loop cycle make the subsequent calls work? loop MouseHit(1) FlushMouse() MouseHit(1) -- still doesn't seem to work end
  23. I guess I was asking a question in there too Indirectly it would seem. Based on the camera angle the 2D drawing isn't always centered which is what I'm looking for.
  24. I'm drawing health bars for my units by getting the model AABB and position in 3D space. I then use the y1 value of the AABB in replace of the y value in the position to make a new Vec3 object which I then pass to CameraUnproject. So in my case this should get me a2D point directly above the models head. I then move that point some pixels to the left and that's the X for my rectangle. This works pretty well but I would expect the rectangle to always look pretty much center over the head all the time. In the 2 pictures I've rotated on the left and right side and you can see the health bar sort of slides to one side or the other. for k1,v1 in pairs(v) do aabb = GetEntityAABB(v1.model) pos = v1.model:GetPosition(1) -- replace the y value with the height of the bounding box pos.y = aabb.y1 + .25 result = CameraUnproject(camera, pos) SetColor(COLOR_RED) DrawRect(result.x - 25, result.y, 50, 5) SetColor(COLOR_GREEN) DrawRect(result.x - 25, result.y, 50, 5) end
×
×
  • Create New...