Jump to content

Rick

Members
  • Posts

    7,936
  • Joined

  • Last visited

Posts posted by Rick

  1. Yes, I believe if the same model is dragged into the editor, it in instanced which means they share certain aspects, material being one of them. In code I believe the Copy() method you can specify if you want the material to be shared or not, but as far as I recall in the editor the only way was to make a totally different model (not prefab but model). I did at one point suggest to give us a way to specify when dragging models into the scene if they should be instanced or copied without material sharing. The reason for the way it is would be it's less resources to share that information.

  2. 2 minutes ago, Slastraf said:

    Yes I can share it, but with the seed you don't need to store it in a db because it will generate the same output every time.
    I will put it on in a bit. I want to add texture generation and make it more readable / stable. Its missing physics and textures basically. The player is moved by raycasts.

    Can you elaborate on the same output every time? Is each terrain tile the same? If not how would very terrain tile always be the same between runs if you can have infinite  amount of them?

  3. Very nice. Are you able or willing to share the code for this? I always wanted something like this but couldn't get it to work. I want to store the data as it's being made in sqlite db so it's persistent.

  4. In LE4 I'm doing the below code but it's drawing the numbers all strange. I remember this being a common thing back in the day but can't recall the solution. It's like the screen isn't getting cleared or something. I'm using the FPS template and have this in the FPSGun.lua script.

     

    function Script:PostRender(context)
    	context:SetBlendMode(Blend.Alpha)
    
    	context:DrawText(tonumber(string.format("%.3f", self.offset.x)), 10, 100)
    	context:DrawText(tonumber(string.format("%.3f", self.offset.y)), 10, 120)
    	context:DrawText(tonumber(string.format("%.3f", self.offset.z)), 10, 140)	
    
    	context:SetBlendMode(Blend.Solid)
    end

     

    image.png.e4ff5a8f9f971eddd309e21aba1421c4.png

    • Confused 1
  5. If I recall brushes get collapsed unless it has a script attached to it. I assume the script above is NOT on the brush in question so the brush got collapsed which results in not being able to get an instance of the brush (which must be causing LE to just close). Put an empty script on the brush called Box and try this again.

  6. What is actually causing the little pause? Is it the creation of the flat mesh itself? Is it manipulating the terrain mesh in 1 iteration? Off the top of my head I would copy the flat terrain mesh, which should be instant and I don't think cause a pause, and then as you're manipulating the vertices of the terrain that would have to be done over multiple frames so there is no noticeable pause. I think I did something like this back in the day and it was easiest to do in lua because of coroutines running over multiple frames. I was able to manipulate a handful of terrain vertices every loop before I'd yield out of the coroutine to give cycles back to the game so it didn't cause a noticeable pause.

    • Like 1
  7. Honestly it would be better to have a separate table for all the different ammo type counts. Ammo and weapons are different things so it makes sense to store them differently. I'd then fill out this ammo table with each ammo type and just set their counts to 0 to start with.

    • Thanks 1
  8. "Ideal" is sort of misleading. Easy would be more the word. Leaving it up to the client creates lots of cheating possibilities. This again depends on the game as well. If it's a slower paced game you can run the movement on the server and have it send position information to the clients and just smoothly move the clients based on the server positions. A turn based or RTS could do something like this. There is latency from the command from client to server then getting information back but often these kinds of games can mask that in various ways. In some games the character will do a little animation acknowledging the command like "Yes, sir" with a little solute, then start moving. That time is meant to mask the delay of this communication. If you're doing an RPG of sorts you can get away with having the client do all the movement and just send the positions to the server and have the server validate certain things like are they moving to fast (speed hack), did they move through walls, etc. If you're doing a fast paced shooter than that's the hardest networked movement to get right and there are many topics online about that.

  9. 8 hours ago, gamecreator said:

    I was just theorizing about how to make sure that a pathfinding character on a host ends up correctly in the same position for a client.  Actual network code would come later.

    And yes, I call GoToPoint only once (when I hit the spacebar).  Ignore that it's possible to hit space multiple times in that code.

    To me it sounds like you're talking about 2 issues really. The first one being GoToPoint() with high speeds isn't doing what you think it should be doing. It clearly has some kind of smoothing curve movement which means it can overshoot the points by a lot causing some issues. Then you're worried the client will do the same. Network movement code can be a pain to work with honestly and it all depends on your game style. 

  10. The above code doesn't seem to be networked and that seems to be the issue you're having right? So you have other code for that? In that code do you keep calling GoToPoint() in a loop? I seem to recall, and this is a long time ago so if I'm wrong I'm sorry, you shouldn't be calling GoToPoint() in a loop. Instead call it once, then check if you're at the next point and once you hit it, call GoToPoint() again, then same thing. 

  11. It's always interesting to see conventions used.They must have had the 8 character filename limitation, or someone wanted to hold it over (I've seen this even today by older programmers lol). Interesting that they put Class in every classes name. Not something you see much of these days with modern IDE's. They use inheritance over composition which is different from today's thoughts on game development thanks to the idea of entity programming. Browsing the code I'm shocked they didn't abuse the hell out of macros. That was a pretty common thing back in the day. Pretty much each method fits on 1 screen which is good, but some files are thousands of lines of code which suggest they could refactor things more. Good commenting. 

    • Like 2
  12. Josh you might want to look at these Online Services. A fair amount of companies are doing it and it gives developers a way to have a lot of online features via web api calls that are common for a lot of games. It's basically your own web api on top of Azure/Amazon that helps manage user Id's, inventories, achievements, etc. Might be a good extra income source. 

    • Like 1
  13. It doesn't use normal maps at all it seems. It just compresses the highly detailed model data (triangles), seemingly in real-time (or every few frames probably) depending on the camera distance. The closer you are the less compressed the model data would be meaning it's more detailed (more triangles). The farther away the model is from the camera the more compression the model data would get so it's less detailed (less triangles) since the eye won't notice? Basically dynamic "real-time" LOD like you noted.  Since the idea of a normal map is to fake detail, and the idea here is to change detail, seems there wouldn't be much need for a normal map? Yeah, the biggest thing would be disk space, but since that's cheap and getting cheaper by the day it's probably OK.

     

    After watching more, perhaps they are compressing not every model but the final scene of the detailed models. So once you have your entire detailed screen, it then compresses that before sending to the renderer. However, my concern there would be memory of those detailed models loaded. I wonder if this would result in less unique models available on screen. PS5 has 16 gig, but that demo scene might be reusing a lot of the same assets to get around any kind of limit with what you can have loaded at once. Or maybe it's not a big issue.

  14. UE 5 demo dropped. It talks about Nanite technology. Seems the idea is your models can be ultra detailed, no funny business like normal maps or anything just straight up source model with millions of polygons from your modelling package, just very detailed models, and this technology will automatically adjust the level of detail in real-time, sort of like tessellation, by streaming data from the model as needed. They say it's sort of like mipmaps. Just curious on Josh's take on something like this. It would be pretty cool to be able to set an overall frame polycount budget and have a system like this automatically deal with the details of how much data from the highly detailed source models that are visible to be rendered in real-time.

     

    From a long term perspective what's interesting is if that frame polycount budget was dynamic based on something from the gfx card in question, then most all computers could run most all games made this way as the models would be highly adjusted based on the power of the gfx card. On the other side, as gfx card technology gets better your game from "10 years ago" would automatically look better without any changes from the devs as the polycount budget number would become higher since the engine detects the gfx card can handle more details!

     

    Curious on opinions about this idea of streaming in highly detailed models and applying compression algo's to them in real-time to determine the level of detail to send to the renderer.

    • Like 3
×
×
  • Create New...