Jump to content

coldfire

Members
  • Posts

    23
  • Joined

  • Last visited

Posts posted by coldfire

  1. 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.

  2. Damn, looks like almost all of you have jobs in the computer field, lol. I can't be too jealous though. I got my A+ Certification and my mother and I already have a computer repair shop, but we have unfortunately not opened our doors yet. We were supposed to open last summer, but things have been on the back burner. She's on her way back from Florida on Tuesday so hopefully we can finally get the ball rolling. My current boss/owner of the rubber lining company I currently work for happens to be my step father, so it's not like I'm hanging out him out to dry, lol.

     

    I can't wait. Ever since I was little, I wanted to make a career out of PC building and repair. Oh and not to mention I'll have so much more time for game development, lol.

     

    Very interesting jobs I see here. I have friends that are naysayers, but I'd say I love Foxconn. I've always used Asus myself, but the last 3 PCs I've put together for my friends I've used Foxconn and they have had nothing but good luck with em. For that reason, I've decided to give them a go for my next mobo. The price tags are generally nice too, lol.

  3. I'm actually quite surprised that there hasn't already been a topic on this, but thought it would be interesting to see what people do for jobs/careers as many of us are not full-time developers. To start it off, I'll elaborate on my job as I think some people would find it interesting. I'm about sick of it, lol, but that's mostly because of how busy we've been becoming lately. Always sucks when work gets in the way of hobbies.

     

    I work for a company called J.B. Equipment. We are mainly a rubber lining company which is increasingly becoming a lost art here in the states. We reline semi trailers that carry different fluids--usually hydrochloric acid and other extremely nasty liquids, but we have also had are share of food grade tankers, also. We also fabricate tanks for many different uses. We also have a lot of business with large steel mills such as US Steel, and NUCOR Steel. In many cases, we will do the repairs on site which requires anywhere from a week to a month of 7 day weeks, working anywhere from 12-16 hours daily. That is notably my least favorite part of the job, lol.

     

    I think the most interesting things that we do would be work for aerospace companies such as Northstar Aerospace. We have actually made large 60 foot long tanks which are lined with PVC which are used to dip aircraft wings to ionize them. That in turn leaves the wings nice and strong, and at the same time, makes them exponentially lighter to allow them to not drop out of the air like a rock, lol. We have also done work on equipment that is used for manufacturing helicopter turbines. Depending on the day, half the time, I am a delivery driver and am lucky enough to see the insides of some of these places. No words can describe the awe of walking into a building and seeing helicopter rotors being assembled and tested.

     

    A lot of the stuff we do in the steel mills is pretty interesting, too, but unfortunately due to homeland security restrictions, I can't really go into details, lol. Believe it or not, that can get you pinned for treason :(

     

    Well, thats about all I can think of to share. Feel free to add to this post. Even if you don't think it's interesting, its very possible that others will :)

     

    I apologize for any typos. I have just gotten back from a 23 hour drive, and I can't be bothered to proof it, lol.

     

    Randy

  4. there are several examples in the lua forum... but here is a quick and dirty script to rotate the model:

     

    require("scripts/class")
    local class=CreateClass(...)
    
    function class:CreateObject(model)
           local object=self.super:CreateObject(model)
    
    function object:Update()
    	object.model:Turn(Vec3(0,1,0))
    end
    end 

     

    this assumes that you have downloaded at least the oldest version of 2.30, since there was a change from multi-state to single-state lua and inherent scripts have changed since LE 2.3 was first released

     

    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

  5. 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.

  6. I know this issue seems to be resolved now, but just for general programming practice, in your class declaration, you should move the

    TTexture texture;

    into the private or protected areas, because right now, the SetTexture function is not needed:

     

    TTexture TestTexture = LoadTexture( "abstract::testsprite.dds" );
    Sprite TestSprite;
    TestSprite.texture = TestTexture;

     

    At the moment, that's valid. But in OOP, we don't like code like that. By moving the texture into the private or protected areas, you now must use the SetTexture function, which is a better way of doing it, because it's almost impossible to change the value by accident.

     

     

    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. Can you show the code usage? What you pass in to SetTexture() might not be valid. It could be you don't have the texture in your path and it's not loading correctly so it would fail anytime you try to use it. Step through your code and make sure your texture object is not null.

     

    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. 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

  12. Use the Kill function. Example:

     

    function Kill(model)
    local entity
    entity=entitytable[model]
    if entity~=nil then
    	if entity.tire[0]~=nil then entity.tire[0]:Free() end
    	if entity.tire[1]~=nil then entity.tire[1]:Free() end
    	if entity.tire[2]~=nil then entity.tire[2]:Free() end
    	if entity.tire[3]~=nil then entity.tire[3]:Free() end
    end
    end
    

     

    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.

  13. 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?

  14. Should be able to do it via Lua Scripting easily enough. In the Spawn function you'd just have it load models and position them. As long as the mass is set to 0 then you won't have to create joints or anything.

     

     

    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.

  15. 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

  16. I love the new changes and I am impatiently waiting my download of 2.3(slow internet :D). 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...