Jump to content

Rick

Members
  • Posts

    7,936
  • Joined

  • Last visited

Everything posted by Rick

  1. Rick

    Chat example

    From my understanding the network card can only send x number of bytes in a packet even though you can put more in there. It'll break it out if it's to large into multiple packets and that is a performance hit if it has to do that.
  2. hmm, I thought you could create a texture to be semi-transparent without having to go into the transparency world. Currently, just trying to get something simple here with a semi-transparent texture of standing water.
  3. How does the water get the transparency to it? When I just use one of the water dds files there is no transparency.
  4. Actually I figured it out. I was using 0 for the Y. If I use 0.01 then it works!
  5. Ah, interesting! I'll take a look at this. Thanks!
  6. Rick

    Texture scaling

    The on things that has always mystified me was texture coords. I don't understand how they work
  7. So in materials/water I see a water.mat and it has: texture0="abstract::water01DOT3.dds" texture1="abstract::wobbleDOT3.dds" texture7="abstract::caustics.dds" castshadows=0 shader="abstract::mesh_diffuse.vert","abstract::water.frag" //depthmask=0 But I don't see any of those dds files.
  8. Via code, how can I scale the texture on a plane? Something like how the terrain just has just 1 scale value to scale the terrain textures would be ideal. I've created a water object and it's pretty simple but cool (I think anyway), but when I scale it the texture scales with it. I'd like to give that control as a property but not sure how to scale the material that's on the plane.
  9. Is there a water texture and shader that comes with LE? If so where would the texture be and how do you use the shader?
  10. That's why I'm not thinking it's a lua error. I think it's an editor error.
  11. I have a decent start on it. I just can't figure out why when I scale the plane it turns black and any material I had on it doesn't show because it's all black. But it's very cool to just drag in a water plane, place it where it makes sense and have it waving. I need better water textures and probably a better shader. I'm just using the leaf sway shader. The cool thing about this is that you can have multiples of these at any height and any size. So I could have puddles even if I wanted to. Plus give that freedom I can make a weather object and link all the puddles/body of waters to the weather object so when it's "raining" it can move the plane up to a certain level to simulate the water rising and when it's dry move it down a certain level over a given interval to simulate drying up.
  12. But I'm not saving anything, so it shouldn't be trying to run the lua file until I save it. If I have a perfectly running lua file, and then I start editing it, I get the error even without saving it. That shouldn't happen.
  13. Seriously, this error is driving me insane.
  14. Looks like we can just change it to any of the 3. Would be cool to get a bunch of new skins for us to choose from.
  15. Rick

    Chat example

    You certainly can. If you don't send packets until the lag is "good" you might not end up sending packets at all. I don't think that approach would work well at all. Maybe I'm just spoiled with RakNet where you just send packets and don't have to worry about it, but I'm guessing LE's implementation is pretty much the same. The problem is you don't want to hold up certain packets to wait to fill it. Like I wouldn't want to hold up a position or rotation packet myself. So I'm not so sure if that's a general rule. From what I was reading and studying things like WoW packets, it seems they send them at given intervals and whenever and don't wait for any certain size or when the lag is low. Lag generally is what it is. Unless something major happens and you hit a big spike, but from my understanding things will get caught up. Again, maybe I was spoiled by RakNet and it handled this for you. Maybe this will be different. Will work on it.
  16. Rick

    Chat example

    Yeah on the server I was going to store the peers/ip addresses in a table. As far as the multiple packets, is this network api on a separate thread? Ideally you send packets instantly when you need to send them. No need to lump them together and then send. Why would lumping multiple messages together matter? I should be able to send 20 different packets all with their own messages in 1 cycle of the loop. This is how RakNet worked anyway. I guess I assumed this is how it works in LE also.
  17. Rick

    Chat example

    When using the stream I'm not so sure if it really matters to pack multiple messages together. I 100% agree on the byte for the message id though. I assume the steam read functions work in the same order as writing the message? So on the client if I write: WriteInt() WriteString() WriteFloat() I wold do: ReadInt() ReadString() ReadFloat() on the packet and it would be correct?
  18. So I'm actually looking at making my own water. So Josh uses a surface and adds verts for water? Would it matter if I used a plane or surface for water? Why would he use a surface instead of a plane?
  19. So what would be the main difference between these 2? If I wanted to be able to paint a texture on 1 side and have it not seen on the other what would be the best way to do that?
  20. Rick

    Chat example

    So here is my initial idea for my network objects. I realize this isn't perfect in that you have 2 different sandbox files for client vs server, but I have a few ideas on that. This is a first draft and very raw and unconfigurable at the moment. Network Object Network Log In Object Network Chat Object So you would open up 2 Editors. Drop the Network Object into both scenes. For the server configure a setting to mark it as Server. Do the same for client but mark it as Client. The client also has settings for what server to connect to. Then you drag the Network Log In Object in your client scene. This will bring up a GUI that has a textbox for username & password and a button that says Connect. You make the target of this the Network Object and make this the Network Objects target also for 2 way co. When you press connect, it'll send a message to the client Network Object to connect to the server you configured for it, and then once it's connected it'll send a login message passing username & password. The server Network Object will receive this login message and for now return success to the client's Network Object. The client's Network Object will forward the message to the Network Log In Object and display failure/success. Then you drag the Network Chat Object onto the client (& server if you wish to play god). Make the Network Object it's target and it the Network Object target for 2 way communication. This creates a chat gui. When you press enter it'll send a chat message to the Network Object to send to the server's Network Object. The server's Network Object will broadcast this out to everyone but the one who sent it. It hits the client Network Object which forward it to the Network Chat Object to display. Later things like channels and an easy way to make a custom GUI will be added. The Network Object will also be used for character communication as well.
  21. I'll give that a go when I get home. I guess I could just send messages too.
  22. I assume the target we set is the model in the editor. Is there a way to get the lua object of that model so I can call object methods from it? For example from one script that has a target: GetLuaObject(GetTarget(0)):MyFunction() Where MyFunction() was defined in the lua class around that target?
  23. Rick

    Chat example

    That would be great if you could. I have the design of the network object mapped out and would like to start testing.
  24. I guess I could actually give this a try myself. I'll see if I can get this working tonight.
×
×
  • Create New...