1. Post #361
    My Blog
    Spencer Sharkey's Avatar
    July 2009
    1,934 Posts
    Because this thread is so dead - watch me make another map.
    http://www.twitch.tv/spencersharkey

    The last map I made sucked when i looked at it in detail :(
    Reply With Quote Edit / Delete Windows 7 United States Show Events

  2. Post #362
    taste the salty dong
    Remscar's Avatar
    September 2009
    1,813 Posts
    Because this thread is so dead - watch me make another map.
    http://www.twitch.tv/spencersharkey

    The last map I made sucked when i looked at it in detail :(
    Because GM13 srcds is de-
    Oh god, why haven't i been coding!?
    Reply With Quote Edit / Delete Windows 7 United States Show Events Funny Funny x 1Agree Agree x 1 (list)

  3. Post #363

    We had a 8v8 Last Team Standing playtest match.
    It was incredibly fun.

    /v/ was the majority of the players, and they absolutely love the gamemode. (which is a good thing, because they're a hard crowd to appeal to)
    Reply With Quote Edit / Delete Windows 7 Lithuania Show Events Winner Winner x 9Informative Informative x 2 (list)

  4. Post #364
    werewolf0020's Avatar
    October 2009
    5,353 Posts
    dat BF3 music
    Reply With Quote Edit / Delete Windows 8 Venezuela Show Events Friendly Friendly x 1Agree Agree x 1 (list)

  5. Post #365
    dat BF3 music
    I had to manually mix the win/lose music by using tracks from the BF3 OST, because DICE uses their own audio format and because I haven't found a package extractor for their archive format. :<
    Reply With Quote Edit / Delete Windows 7 Lithuania Show Events Friendly Friendly x 2Agree Agree x 1 (list)

  6. Post #366
    Gold Member
    Splambob's Avatar
    January 2005
    1,180 Posts
    Pretty underwhelming compared to the cool stuff in here so far but I'm redoing Holopad because the old code was a mess and I ran into a few roadblocks with it. New approach is keeping all elements in separate frames and using better OOP principles, and dear god this is working better. Faster progress too because I still have the old code and a new class diagram to look at. 0 to this, super quick;



    (don't suppose anyone would like to take this concept art for a breen-statue NPC? )
    Reply With Quote Edit / Delete Windows 7 Show Events Winner Winner x 4Artistic Artistic x 2 (list)

  7. Post #367
    taste the salty dong
    Remscar's Avatar
    September 2009
    1,813 Posts
    Found some very odd results when messing with the MYSQLOO module. It's hard to explain what exactly is happening, or atleast logically. Essentially this is what i have noticed:

    Using normal query (callback functions)
    -Long delay before the queries are called (nearly 1 second per 10 queries)
    -Once the queries are called, they are called EXTREMELY FAST

    Using wait query (Query2 function, using the query:wait())
    -Instantly starts the queries
    -Each query takes about a tenth of a second (coincidence?)

    Total time seems to always seems to come close to each other.
    From what i understand about threading, for the normal queries, the data could be getting queried and retrieved during that strange delay period, and then afterwards once the thread rejoins it is running the callback functions, which takes no time at all, which explains the next to zero execution time. Since they are threaded, and possibly ran all at once since they are all made instantaneously, they may all be loaded onto one thread to be ran, and then their callbacks are run when the thread finishes.

    Here are the code files:
    SQL WRAPPER (has the SQL interface): http://puu.sh/JpyD (Mysql Connection info works, feel free to use it when testing)
    TEST CODE: http://puu.sh/Jpz0

    Simply go into your console
    lua_openscript sqlwrapper.lua (ONLY ONCE)
    lua_openscript sqltest.lua (EVERYTIME YOU TEST)

    Here are the results i get: (query:wait() version runs first)
    Code:
    Running script sqltest.lua...
    ===============================================
    Elapsed Time [1]: 0.10799999999972 TOTAL: 0.10799999999972
    Elapsed Time [2]: 0.10599999999977 TOTAL: 0.21499999999969
    Elapsed Time [3]: 0.10600000000022 TOTAL: 0.32099999999991
    Elapsed Time [4]: 0.10300000000007 TOTAL: 0.42499999999973
    Elapsed Time [5]: 0.10800000000017 TOTAL: 0.5329999999999
    Elapsed Time [6]: 0.10599999999977 TOTAL: 0.63899999999967
    Elapsed Time [7]: 0.10699999999997 TOTAL: 0.74599999999964
    Elapsed Time [8]: 0.10300000000007 TOTAL: 0.84899999999971
    Elapsed Time [9]: 0.10699999999997 TOTAL: 0.95599999999968
    Elapsed Time [10]: 0.10399999999981 TOTAL: 1.0609999999997
    Total Elapsed time: 1.0609999999997
    ===============================================
    Elapsed Time [1]: 0.94200000000001 TOTAL: 0.94200000000001
    Elapsed Time [2]: 0 TOTAL: 0.94200000000001
    Elapsed Time [3]: 0 TOTAL: 0.94200000000001
    Elapsed Time [4]: 0 TOTAL: 0.94200000000001
    Elapsed Time [5]: 0 TOTAL: 0.94200000000001
    Elapsed Time [6]: 0 TOTAL: 0.94200000000001
    Elapsed Time [7]: 0.0010000000002037 TOTAL: 0.94300000000021
    Elapsed Time [8]: 0 TOTAL: 0.94300000000021
    Elapsed Time [9]: 0.052999999999884 TOTAL: 0.99600000000009
    Elapsed Time [10]: 0.047999999999774 TOTAL: 1.0439999999999
    Reply With Quote Edit / Delete Windows 7 United States Show Events Informative Informative x 2 (list)

  8. Post #368
    Nexus435's Avatar
    July 2010
    1,451 Posts
    Found some very odd results when messing with the MYSQLOO module. It's hard to explain what exactly is happening, or atleast logically. Essentially this is what i have noticed:

    Using normal query (callback functions)
    -Long delay before the queries are called (nearly 1 second per 10 queries)
    -Once the queries are called, they are called EXTREMELY FAST

    Using wait query (Query2 function, using the query:wait())
    -Instantly starts the queries
    -Each query takes about a tenth of a second (coincidence?)

    Total time seems to always seems to come close to each other.
    From what i understand about threading, for the normal queries, the data could be getting queried and retrieved during that strange delay period, and then afterwards once the thread rejoins it is running the callback functions, which takes no time at all, which explains the next to zero execution time. Since they are threaded, and possibly ran all at once since they are all made instantaneously, they may all be loaded onto one thread to be ran, and then their callbacks are run when the thread finishes.

    Here are the code files:
    SQL WRAPPER (has the SQL interface): http://puu.sh/JpyD (Mysql Connection info works, feel free to use it when testing)
    TEST CODE: http://puu.sh/Jpz0

    Simply go into your console
    lua_openscript sqlwrapper.lua (ONLY ONCE)
    lua_openscript sqltest.lua (EVERYTIME YOU TEST)

    Here are the results i get: (query:wait() version runs first)
    Code:
    Running script sqltest.lua...
    ===============================================
    Elapsed Time [1]: 0.10799999999972 TOTAL: 0.10799999999972
    Elapsed Time [2]: 0.10599999999977 TOTAL: 0.21499999999969
    Elapsed Time [3]: 0.10600000000022 TOTAL: 0.32099999999991
    Elapsed Time [4]: 0.10300000000007 TOTAL: 0.42499999999973
    Elapsed Time [5]: 0.10800000000017 TOTAL: 0.5329999999999
    Elapsed Time [6]: 0.10599999999977 TOTAL: 0.63899999999967
    Elapsed Time [7]: 0.10699999999997 TOTAL: 0.74599999999964
    Elapsed Time [8]: 0.10300000000007 TOTAL: 0.84899999999971
    Elapsed Time [9]: 0.10699999999997 TOTAL: 0.95599999999968
    Elapsed Time [10]: 0.10399999999981 TOTAL: 1.0609999999997
    Total Elapsed time: 1.0609999999997
    ===============================================
    Elapsed Time [1]: 0.94200000000001 TOTAL: 0.94200000000001
    Elapsed Time [2]: 0 TOTAL: 0.94200000000001
    Elapsed Time [3]: 0 TOTAL: 0.94200000000001
    Elapsed Time [4]: 0 TOTAL: 0.94200000000001
    Elapsed Time [5]: 0 TOTAL: 0.94200000000001
    Elapsed Time [6]: 0 TOTAL: 0.94200000000001
    Elapsed Time [7]: 0.0010000000002037 TOTAL: 0.94300000000021
    Elapsed Time [8]: 0 TOTAL: 0.94300000000021
    Elapsed Time [9]: 0.052999999999884 TOTAL: 0.99600000000009
    Elapsed Time [10]: 0.047999999999774 TOTAL: 1.0439999999999
    In my experience, using wait() drops the ticrate insanely.
    Reply With Quote Edit / Delete Windows 7 United States Show Events

  9. Post #369
    taste the salty dong
    Remscar's Avatar
    September 2009
    1,813 Posts
    In my experience, using wait() drops the ticrate insanely.
    In both cases my game lagged, but this may have been due to a listen server.
    Reply With Quote Edit / Delete Windows 7 United States Show Events

  10. Post #370
    My Blog
    Spencer Sharkey's Avatar
    July 2009
    1,934 Posts


    Well lets see...
    I used World Machine to make a 4096^2 world:


    It exports a 4096^2 heightmap in png format. I used Python and a couple of libraries to read the png and convert it to chunks. Each chunk is 32^2 tiles and in total there are 4096 chunks.

    The chunks are simply binary shorts stored in files. Each chunk is 8KB of data. In total there are 32MB of world data. Of course this isn't really that bad considering networking is progressive as the clients move across the massive world.

    In the first image, the sublime text file is showing the python code I used to turn the png into binary chunk files. The window on the top left is a pygame display I whipped up in that script to show the chunks and their average height ( it's just eye candy ;) )

    Since Gmod13 lets us read binary data now, I was easily able to make a chunk parser in-game and have a chunk rendered...


    I'm getting somewhere :)
    Reply With Quote Edit / Delete Windows 7 United States Show Events Winner Winner x 13Informative Informative x 1Lua King Lua King x 1 (list)

  11. Post #371
    zzaacckk's Avatar
    June 2009
    2,126 Posts
    In both cases my game lagged, but this may have been due to a listen server.
    You shouldn't execute the wait() function unless the server is empty.
    Reply With Quote Edit / Delete Windows 7 United States Show Events Dumb Dumb x 3Funny Funny x 1 (list)

  12. Post #372
    taste the salty dong
    Remscar's Avatar
    September 2009
    1,813 Posts
    You shouldn't execute the wait() function unless the server is empty.
    You don't even understand what the wait() function does, much less its purpose.
    Reply With Quote Edit / Delete Windows 7 United States Show Events Funny Funny x 2Disagree Disagree x 1Zing Zing x 1Agree Agree x 1 (list)

  13. Post #373
    Gold Member
    FoohyAB's Avatar
    July 2009
    928 Posts
    Garry, any leads to that problem with ComputeLighting/GetLightColor?
    Reply With Quote Edit / Delete Windows 7 United States Show Events

  14. Post #374
    garry's Avatar
    September 2001
    12,193 Posts
    I think it's like you say - it's building a cache when you move an entity by it. I'll try to find the function in the next few days after SVN is updated.
    Reply With Quote Edit / Delete Windows 7 Show Events Friendly Friendly x 7Winner Winner x 1 (list)

  15. Post #375
    My Blog
    Spencer Sharkey's Avatar
    July 2009
    1,934 Posts
    Does computelighting take into effect light from dynamic lights and whatnot?
    Reply With Quote Edit / Delete United States Show Events

  16. Post #376
    garry's Avatar
    September 2001
    12,193 Posts
    No - I can add another function to query dyanmic lighting
    Reply With Quote Edit / Delete Windows 7 Show Events Winner Winner x 6Friendly Friendly x 1 (list)

  17. Post #377
    I love Lemon Punch
    Sakarias88's Avatar
    January 2006
    1,259 Posts
    I've been working on engine sounds and other details on SCars.
    Have tried to mix several engine sounds before at different RPMs because it's how most racing games do it to get a good engine sound.
    Each time I've tried it I've failed.
    Have always sounded weird or choppy.

    Think this was my third try and this time I actually succeed.
    Sounds a lot better than just pitching a single sound.

    Also got a model from TDM which allowed me to change the steering wheel, rpm gage and the speedometer through poseparams.
    Sometimes it's the details that matters after all.

    Reply With Quote Edit / Delete Windows 7 Sweden Show Events Lua King x 16Artistic x 5Winner x 4Funny x 2Useful x 1 (list)

  18. Post #378
    Gold Member
    vexx21322's Avatar
    December 2008
    10,348 Posts
    I've been working on engine sounds and other details on SCars.
    Have tried to mix several engine sounds before at different RPMs because it's how most racing games do it to get a good engine sound.
    Each time I've tried it I've failed.
    Have always sounded weird or choppy.

    Think this was my third try and this time I actually succeed.
    Sounds a lot better than just pitching a single sound.

    Also got a model from TDM which allowed me to change the steering wheel, rpm gage and the speedometer through poseparams.
    Sometimes it's the details that matters after all.

    The engine sounds have always bothered me, but now they sound fantastic.
    Great work.
    Reply With Quote Edit / Delete Windows 7 United States Show Events Agree Agree x 5Friendly Friendly x 1 (list)

  19. Post #379
    JustSoFaded's Avatar
    December 2011
    432 Posts
    No - I can add another function to query dyanmic lighting
    Just curious, while you are here.



    What is this j _ _ o vtable? And why does it contain all of CLuaInterface's virtual functions?
    Reply With Quote Edit / Delete Windows 7 United States Show Events Lua King Lua King x 1Optimistic Optimistic x 1Funny Funny x 1 (list)

  20. Post #380
    My Blog
    Spencer Sharkey's Avatar
    July 2009
    1,934 Posts
    No - I can add another function to query dyanmic lighting
    Id love you even more. <3
    Reply With Quote Edit / Delete United States Show Events Friendly Friendly x 2 (list)

  21. Post #381
    danielga's Avatar
    July 2007
    271 Posts
    What is this j _ _ o vtable? And why does it contain all of CLuaInterface's virtual functions?
    I'd say it's an initial attempt at obfuscation. It's not like someone in their perfect mind would name a class with such thing.
    Reply With Quote Edit / Delete Windows 7 Portugal Show Events

  22. Post #382
    JustSoFaded's Avatar
    December 2011
    432 Posts
    I'd say it's an initial attempt at obfuscation. It's not like someone in their perfect mind would name a class with such thing.
    That's what I had assumed, and then I started thinking it was related to GAC. Can you confirm or explain, Garry?
    Reply With Quote Edit / Delete Windows 7 United States Show Events

  23. Post #383
    beasty's Avatar
    July 2010
    1,042 Posts
    I've been working on engine sounds and other details on SCars.
    Have tried to mix several engine sounds before at different RPMs because it's how most racing games do it to get a good engine sound.
    Each time I've tried it I've failed.
    Have always sounded weird or choppy.

    Think this was my third try and this time I actually succeed.
    Sounds a lot better than just pitching a single sound.

    Also got a model from TDM which allowed me to change the steering wheel, rpm gage and the speedometer through poseparams.
    Sometimes it's the details that matters after all.


    That's really amazing. That dodge viper oh my god! Well done.
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events

  24. Post #384
    danielga's Avatar
    July 2007
    271 Posts
    That's what I had assumed, and then I started thinking it was related to GAC. Can you confirm or explain, Garry?
    You can forget about that question if it is indeed related to the anti-cheat. He wants to keep the whole anti-cheat thing super-secret.
    Reply With Quote Edit / Delete Windows 7 Portugal Show Events

  25. Post #385
    JustSoFaded's Avatar
    December 2011
    432 Posts
    You can forget about that question if it is indeed related to the anti-cheat. He wants to keep the whole anti-cheat thing super-secret.
    Well, I can't see any other reason for him to randomly make the CLuaInteface disappear, and then create this identical class j__o containing the exact same functions.
    Reply With Quote Edit / Delete Windows 7 United States Show Events Agree Agree x 2 (list)

  26. Post #386
    Gold Member
    Mr. Quiggles's Avatar
    July 2010
    179 Posts
    After some down time due to life (mainly due to my father and how his perception/comprehension deemed my words as false, when they had a far deeper meaning, taking away my main laptop, and since he's a stubborn/hardheaded fat & candy-assgot, I'm not even bothering arguing), I got some work done with the Minecraft-esque addon.

    In Minecraft, not all blocks are perfect cubes. Liquids (lava and water), farm land, stairs, end portal frame, portals, doors, signs, rails, seeds, pressure plates, pistons, vines, ladders, saplings, tall grass, etc. etc., blah and blah, and of course half slabs. To easily add support for new blocks, such as adding slopes and what-not's, why not have a value / function to render out the vertices of a block, instead of having predefined vertices during chunk mesh rendering. Plus with a separate function to render out the block, it'll be better to call specific checks, such as rendering a portion of a side, such as if there's a block like farm land near the side that's being rendered.

    Of course, due to the possibly-QQful aside/anecdote/whatever and the lack of a good computer to show it off, I can't really show that in action. Plus with the lack of documentation with meshes, it'll be a while to actually show it. I am using a MacBook (Yes, they are bad, but surprisingly good frame rate on high video settings, which is really weird because it gets higher frame rate than lowest graphic settings.

    I apologize for the, once again, large wall of QQ and blog-esque post. Just pissed. Oh, and also contemplating about deep, philosophical shit.

    Edited:

    I almost forgot. I was working on adding the Clock Town music to play in the LoZ addon, but I didn't really continue with it, since 'net.WriteTable()' breaking and all. I'm updating the Workshop version to support this. Alas, the rain on Day 2 prevents the song from playing.

    Edited:

    If only 'util.AddNetworkString()' worked faster. Running this addon under Singleplayer makes it where I have to delay the two 'net' streams to send the world data (seed, chunk sizes, render distance) and the initial chunk data (position, blocks). On a dedicated server, it wouldn't really matter as you can easily delay when a player initializes by not joining as soon as the server gets up. But, there's an issue with map changes, which I highly doubt since this project is now not aiming for "what could I do with adding this to any game mode and what practical purpose this will serve?".

    Edited:

    Hm... So the issue wasn't due to 'util.AddNetworkString()', but it was because I forgot to add '[ufDOS]' before streaming. Anyways, a new issue has occurred:

    It's streaming too many chunks at one time. This issue didn't happen with datastream. Ironic, isn't it?

    Edited:

    Gee... Once again, apologizing for a blog-esque post, and I get ratings I don't usually get.
    Reply With Quote Edit / Delete Windows 7 United States Show Events Friendly Friendly x 3Winner Winner x 2Informative Informative x 1 (list)

  27. Post #387
    My Blog
    Spencer Sharkey's Avatar
    July 2009
    1,934 Posts
    @Quiggles hope all goes well with the situation! You do great work.

    In other news, I made the good ol' bombard spell into a RTD possibility on the Sassilization Deathrun server...


    bombarddd
    Reply With Quote Edit / Delete Windows 7 United States Show Events Winner Winner x 8Funny Funny x 3Lua King Lua King x 1 (list)

  28. Post #388
    garry's Avatar
    September 2001
    12,193 Posts
    Garry, any leads to that problem with ComputeLighting/GetLightColor?
    Looking at the code.. try setting lightcache_maxmiss to 9999999999 - let me know if it makes a difference
    Reply With Quote Edit / Delete Windows 7 Show Events Funny Funny x 2Lua King Lua King x 1 (list)

  29. Post #389
    Gold Member
    Mr. Quiggles's Avatar
    July 2010
    179 Posts
    I added, to the 'Stream' module thing, stream queuing, plus adding the callback functions to the table. It's nothing neat, it's just a delay by how long and uses a 'timer.Simple()'. Nothing fancy. It was just an alternative to delaying everything, but that entire error was due to string mismatches. I'm starting to get sick of that.

    While I was contemplating on how the hell will I get data values, the ones that tell apart birch logs from oak, and different wool colors, since it'll be costly to add that into a table for chunks and block data, why not use floats?

    For example, wool's ID in Minecraft is '35'. Black wool is '35:15'. In the instance of storing the block data, it would be '35.15'.
    The block ID can be obtained by using 'math.floor()', while the data value can be obtained by '35.15 - math.floor(35.15)' I'm sure there's a much easier alternative to grab the decimal number. In theory, this would allow an infinite amount of block combinations under one block. Perfect to keep shit organized! There's still the issue with memory, and since I don't know how to easily store bytes like the C# interpretation, I guess I'll have to deal with the RAM usage.

    Too bad that the mechanic mentioned above won't see light for a while. Still working on meshes, which I'm probably going at a completely wrong angle at it.

    [offtopic]

    @Quiggles hope all goes well with the situation! You do great work.
    Thanks. My father is a bit... anal, about me and 'electronic devices/entertainment'. Just can't wait until I move out. As long as I have this horrible-yet-lasting MacBook, I should be able to push content still. That, or I could sell it and buy another Asus G53 or something and keep it hidden like Anne Frank, minus the attic. Oh look, more blog-esque posts that can be comprehended as QQ. Gee...
    In other news, I made the good ol' bombard spell into a RTD possibility on the Sassilization Deathrun server...
    -video-
    bombarddd
    What does that remind me of... It's screaming Divine Intervention for some reason.
    Reply With Quote Edit / Delete Windows 7 United States Show Events

  30. Post #390
    SHADERS
    Legend286's Avatar
    October 2008
    9,932 Posts
    I added, to the 'Stream' module thing, stream queuing, plus adding the callback functions to the table. It's nothing neat, it's just a delay by how long and uses a 'timer.Simple()'. Nothing fancy. It was just an alternative to delaying everything, but that entire error was due to string mismatches. I'm starting to get sick of that.

    While I was contemplating on how the hell will I get data values, the ones that tell apart birch logs from oak, and different wool colors, since it'll be costly to add that into a table for chunks and block data, why not use floats?

    For example, wool's ID in Minecraft is '35'. Black wool is '35:15'. In the instance of storing the block data, it would be '35.15'.
    The block ID can be obtained by using 'math.floor()', while the data value can be obtained by '35.15 - math.floor(35.15)' I'm sure there's a much easier alternative to grab the decimal number. In theory, this would allow an infinite amount of block combinations under one block. Perfect to keep shit organized! There's still the issue with memory, and since I don't know how to easily store bytes like the C# interpretation, I guess I'll have to deal with the RAM usage.

    Too bad that the mechanic mentioned above won't see light for a while. Still working on meshes, which I'm probably going at a completely wrong angle at it.

    [offtopic]


    Thanks. My father is a bit... anal, about me and 'electronic devices/entertainment'. Just can't wait until I move out. As long as I have this horrible-yet-lasting MacBook, I should be able to push content still. That, or I could sell it and buy another Asus G53 or something and keep it hidden like Anne Frank, minus the attic. Oh look, more blog-esque posts that can be comprehended as QQ. Gee...

    What does that remind me of... It's screaming Divine Intervention for some reason.
    If gmod has math.Frac you could use that to only return the decimal.

    Oh, it doesn't. But maybe you could just add it yourself to make it easier for finding the decimal in the future.
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events

  31. Post #391
    My Blog
    Spencer Sharkey's Avatar
    July 2009
    1,934 Posts
    If you need some guidance or help with meshes feel free to post with what you need to know - I kinda got it down (and I think a few others do too!)
    Reply With Quote Edit / Delete Windows 7 United States Show Events Friendly Friendly x 1 (list)

  32. Post #392
    Gold Member
    vexx21322's Avatar
    December 2008
    10,348 Posts
    If gmod has math.Frac you could use that to only return the decimal.

    Oh, it doesn't. But maybe you could just add it yourself to make it easier for finding the decimal in the future.
    Wouldn't it just be (n - math.Floor(n)) ?
    Reply With Quote Edit / Delete Windows 7 United States Show Events Agree Agree x 1 (list)

  33. Post #393
    Get your own DarkRP Server!
    FPtje's Avatar
    January 2006
    5,304 Posts
    Wouldn't it just be (n - math.Floor(n)) ?
    or n % 1
    Reply With Quote Edit / Delete Windows 7 Netherlands Show Events Lua King x 4Agree x 3Lua Helper x 1Informative x 1Zing x 1 (list)

  34. Post #394
    Gold Member
    FoohyAB's Avatar
    July 2009
    928 Posts
    Looking at the code.. try setting lightcache_maxmiss to 9999999999 - let me know if it makes a difference
    It seemed to remove the cache issue, but another issue popped up: https://dl.dropbox.com/u/1179448/Mis...006-39-03.webm

    Actually that's just the same issue but magnified by like a bazillion.

    Edited:

    Setting it to 0 isn't much better either.
    Reply With Quote Edit / Delete Windows 7 United States Show Events Informative Informative x 2 (list)

  35. Post #395
    Gold Member
    vexx21322's Avatar
    December 2008
    10,348 Posts
    or n % 1
    I can never think about optimising like this.
    Reply With Quote Edit / Delete Windows 7 United States Show Events Agree Agree x 1Friendly Friendly x 1 (list)

  36. Post #396
    Get your own DarkRP Server!
    FPtje's Avatar
    January 2006
    5,304 Posts
    I can never think about optimising like this.
    It doesn't really matter. Both n % 1 and n - floor(n) are calculated in O(1) time.
    Reply With Quote Edit / Delete Windows 7 Netherlands Show Events Funny Funny x 4Useful Useful x 1 (list)

  37. Post #397
    Gold Member
    Mr. Quiggles's Avatar
    July 2010
    179 Posts
    or n % 1
    Gah. Forgot that I can use % in Garry's Mod.

    Edited:

    Last night (or earlier this morning), while trying to get meshes working, I thought of an easy way to prevent something like "zombe's ore finder" in Minecraft. Instead of streaming out the blocks, why not stream out the vertices? With that, there will be no need to calculate the vertices twice, once for client and once for server, and there will be no way to truly have an ore finder.

    Alas, there's a complication. There can be a shit ton of vertices in a 32^3 world, versus sending out a constant 32^3 amount of numbers into the world. For a flat world, there will be 4 vertices for each face, so about 1024 vertices. Sure, 1024 is smaller than 32^3 (or 32768), but vertices are Vectors, more data than numbers.

    I'll give sending the vertices idea a try. When the previously mentioned idea about rendering vertices based on a block, it will/should prevent any mismatches if the client's values are modified somehow.

    Edited:

    Added block definitions/whatevers. Here's block 0; air!

    Code:
    local Air = {
    	ID = 0,
    	Data = 0,
    	Name = "Air",
    	Texture = nil,
    	Material = nil,
    	Hardness = nil,
    	Light = nil,
    	Opaque = false,
    	Solid = false,
    	Vertices = { 
    		Left = function( X, Y, Z, Table)
    			return;
    		end,
    		Right = function( X, Y, Z, Table)
    			return;
    		end,
    		Back = function( X, Y, Z, Table)
    			return;
    		end,
    		Front = function( X, Y, Z, Table)
    			return;
    		end,
    		Bottom = function( X, Y, Z, Table)
    			return;
    		end,
    		Top = function( X, Y, Z, Table)
    			return;
    		end,
    	},
    }
    
    Uforzyx.Modules["World Handler"].Functions.AddBlock( Air );
    The texture, material, hardness, and light aren't being used right now. Opaque the main value for rendering the sides. If the neighboring block is not opaque, then it'll render the corresponding side. While most examples on how to make a simple voxel engine uses Solid as the variable to render a side, there's a lot of caveats, such as ice is opaque, while it's solid, yet you can see through it. Same with glass, farm land, doors, fences, and other blocks.

    The vertices functions, like Left and Right, are what renders that corresponding side. The 'Table' argument is not needed, as that's only used to store the vertices into a table. This is mainly for the Entity.PhysicsFromMesh function. Calling this function without 'Table' would use 'mesh.Position' and such to render the side.

    There's something missing from this little explanation... Oh well. I'll find it soon.

    Edited:

    Uh oh...

    I made progress though. I think I resolved it too. It being the problem, not the mesh that's creating the error.

    Edited:

    And I can see why to not use the mesh library: I can't really remove meshes that easily... Back to "IMesh"'s
    Reply With Quote Edit / Delete Windows 7 United States Show Events Dumb Dumb x 1Funny Funny x 1Disagree Disagree x 1 (list)

  38. Post #398
    My Blog
    Spencer Sharkey's Avatar
    July 2009
    1,934 Posts
    Well I'm on a roadtrip of what seems to be around the entire state of Pennsylvania... so I was able to crank out some cool things for the Sassilization Deathrun again. I added new RTD effects :>

    -Bombard (typical bombard effect, you freeze - cloud forms above you and arrows fall down on to you)
    -Decimate (get set on fire)
    -Heal (heals you obviously)
    -Paralyze (freezes you for 10 seconds)
    -Blast (explodes you)
    -Gravitate (sends you flying up into the air at 300 velocity)
    -Vanish (invisible for the rest of the round)
    -Treason (swaps your team)
    -Strike (lightning strike comes down and takes 50hp away)

    All these come with the original sass RTS sound effect...

    I wish I could get some content but it's kinda hard on a laptop :(
    Reply With Quote Edit / Delete Windows 7 United States Show Events

  39. Post #399
    infinitywrai's Avatar
    December 2007
    539 Posts
    So isn't that kind of expected? Or am I crazy?

    Speaking of this, how come props aren't lit per triangle yet? Most modern games and I think CS:GO have lighting like that. In GMod either props, players, and viewmodels are always uniformly lit, which is unrealistic in many cases.
    Reply With Quote Edit / Delete Windows 7 United States Show Events Agree Agree x 1 (list)

  40. Post #400
    Gold Member
    noobcake's Avatar
    November 2006
    3,624 Posts
    i coded in a lite gore system for my mod and it's fucking impossible to not mess around with, it's just so much fun



    pictured here is me using the whipfist to grab a combine soldier's upper body and rip it free from his legs

    Reply With Quote Edit / Delete Windows XP United States Show Events Winner Winner x 1 (list)