Jump to content

coldfire

Members
  • Posts

    23
  • Joined

  • Last visited

Everything posted by coldfire

  1. I haven't had much luck so far, but figured I'd show the technique I was using before: http://freespace.virgin.net/hugo.elias/graphics/x_water.htm It's kinda hacky for a dynamic water system but could also be used for some pretty cool effects. @Dozz: That's probably the coolest realtime water I have ever seen!
  2. I have had experience with dynamic water in an experimental project before. The effect was quite nice, but it was basically only for colliding ripples based on a smoothing algorithm. I got a little time available today, so I will see if I can port it over to LE without much difficulty. Edit: I do fear the performance on larger meshes, but we will see.
  3. Yup, i was using the multi-state system before, so this was completely new to me, lol. Thank you so much for the snippet. Its just what I needed. I didn't realize it was inside the class:CreateObject(model) function. Thanks a ton! Randy
  4. Well, its been quite some time since I've messed with LUA-based entities and I've noticed quite a lot has changed. I am curious if you would set it up like: function class:Update(model) Or if there was a different way of doing it. If its not too much to ask, I'm sure a simple example of rotating the model would show me exactly what I need to know. I've searched through several other script to find an example with no luck. Thanks in advance.
  5. I've worked on computer hardware since I was around 10. I'm 27 now working on getting money together for my A+ certification, and while I've "heard" of laptops with expandable gfx cards, I've never actually seen one before. Here is a link I found that has some information you should find valuable: Upgrading mobile gfx cards
  6. Yep thats actually what I plan on. I noticed I have a tendency to put all variables in public at first and just set members, then I'll go back after I'm satisfied with it functionality and then move it to the private area and make a function in public . Thanks for the heads up though.
  7. Cool, I'm glad its set up that way. I also plan on adding a isVisible boolean along with a SpriteManager class that will eventually handle all the drawing itself. I was afraid the route I was going would consume extra resources. I'm attempting to recreate a 2d tower defense game that I recently programmed in DarkBasic Pro before I attempt a 3D version(in both DBP and LW) so I wanted to make sure I wasn't gonna kill it by having lotsa sprites. Thank you very much for the info.
  8. As it is right now, it works fine. The issue I'm having is that say I want to make a 2d game that has many of the same enemy on the screen at once. With my class, I would be loading the same texture every time I created a sprite, right? And if so, couldn't I take care of that redundancy using pointers instead?
  9. Thanks for the quick reply. In my main code I define as such: TTexture TestTexture = LoadTexture( "abstract::testsprite.dds" ); Sprite TestSprite; TestSprite.SetTexture(TestTexture); Then, before the flip I call TestSprite.Draw()
  10. Hello, I started tinkering with a class to use for a sprite manger, and I'm almost certain I'm doing it wrong. The class loads an image which I think should be a pointer so I may assign the same texture to multiple sprites without using more video memory. The problem is no matter how I set it up with pointers, I would get errors. Then again, I don't use pointers very often at all either. I think my code is copying the image as opposed to referencing it. class Sprite { private: int x, y, width, height; public: TTexture texture; Sprite() { Position(0,0); Size(-1,-1); }; void SetTexture(TTexture tex) { texture = tex; }; void Draw() { DrawImage(texture, x, y, width, height); }; void Position(int xpos, int ypos) { x = xpos; y = ypos; }; void Size(int w, int h) { width = w; height = h; } protected: }; Thanks in advance on any advice. Coldfire
  11. In its current state, water is an infinite plane only. Elsewhere on the forums, I have heard of the possibility of resizeable water planes in the future. That could be a ways off though.
  12. Awesome that did the trick. Still getting used to lua and thought that was only needed for adding new properties thanks for the help Marley.
  13. I have just recently started using the new single state setup and after loading a model in the editor, I create a script for the model and place 'require("scripts/class")' in it and the properties still do not show up. I have also tried dofile("scripts/class") with no success. Is there something else that needs to be added now with the new system? I've already taken a look at some of the include scripts, but they all seem to use the require method and they work fine. Thanks in advance. Randy
  14. Hmm... didn't know you could do that. I got it working the other way, but cleaner code is always welcome. Thank you all.
  15. Ah, thanks again Rick. I was trying to mess with that before, but as you can tell from my leftover lines at the end, I thought the function was Cleanup(), lol. Thank you very much. Edit: Awesome... worked like a charm.
  16. Alright, finally making some progress. Now I am having a different problem, however. dofile ("Scripts/base.lua") function Spawn(model) local entity=base_Spawn(model) local RootPosition = entity.model:GetPosition(1) entity.chunk = {} entity.chunk[0] = CreateCube() entity.chunk[0]:SetPosition(RootPosition,1) function entity:Update() RootPosition = entity.model:GetPosition(1) entity.chunk[0]:SetPosition(RootPosition,1) end end function Update(world) if world==world_main then local model,entity for model,entity in pairs(entitytable) do if model.world==world then entity:Update() end end end end function Cleanup(world) end The code creates a cube and places it at the position of the point entity and also repositions at update() in the event that it is moved. The problem I am having is that when I delete the entity, the cube still stays. How would I go about cleaning it up after delete?
  17. Hmm... I didnt think about making it as a model seperate from the entity... I've been trying to replace the entity, and I think thats where most of my problems were coming from. One way to find out though Thanks for the idea niosop.
  18. Hello, I've been working on converting an old project of mine to Leadwerks. The project was a procedural building generator. My question is, is it possible to create a point entity that at spawn, generates a model of its own? I figure it may be possible to use the point entity and attach limbs to it, but unfortunately every which way I've tried to accomplish this I have failed with countless engine crashes. Thanks for any advice. Randy
  19. Ah, that makes sense. Haven't heard anything about it recently. Thanks Lumooja.
  20. I love the new changes and I am impatiently waiting my download of 2.3(slow internet ). Thank you so much, Josh. Also I've been trying to find some info on the Lua GUI and haven't been able to find much info on it... I have been kinda of blind lately though. Anyways, I was just curious as to what controls it contains. If I'm not mistaken, you said it was not going to be full featured but give a base on which other controls can be made... is this correct?
×
×
  • Create New...