• What are you working on? v67 - March 2017
    3,527 replies, posted
Going to try making a browser CS:GO surf / kz run replay viewer based on my map viewer, as a quick hobby project. Here's a demo of a kz map export: [url]https://metapyziks.github.io/GOKZReplayViewer/maps/kz_reach_v2/[/url] [img]https://files.facepunch.com/ziks/2017/October/27/kz_reach_v2.png[/img]
[QUOTE=Ziks;52827923]Going to try making a browser CS:GO surf / kz run replay viewer based on my map viewer, as a quick hobby project. Here's a demo of a kz map export: [url]https://metapyziks.github.io/BotMimicReplayViewer/maps/kz_reach_v2/[/url] [img]https://files.facepunch.com/ziks/2017/October/27/kz_reach_v2.png[/img][/QUOTE] This one doesn't properly stop propagation of keyboard events either :s:
I actually did a BHOP replay renderer based on the tf2 map renderer somebody made ages ago (which doesn't support half the shit you do) I went a bit over-the-top trying to support way to many custom maps and stranded the project there. Looks Great
[QUOTE=DrDevil;52826684]Your best bet is to become very knowledgeable in a niche area and offer consultation.[/QUOTE] Psyonix (Studio that made Rocket League) did this when it came to Unreal Engine 3: [URL="https://youtu.be/Om0j9SLBDPQ?t=10m"]https://youtu.be/Om0j9SLBDPQ?t=10m[/URL]
[QUOTE=Tamschi;52827946]This one doesn't properly stop propagation of keyboard events either :s:[/QUOTE] Ah sorry I'd forgotten about that, I'll try fixing it tonight. [editline]27th October 2017[/editline] Should be fixed now, you might need to clear your cache.
[QUOTE=Ziks;52828031]Ah sorry I'd forgotten about that, I'll try fixing it tonight. [editline]27th October 2017[/editline] Should be fixed now, you might need to clear your cache.[/QUOTE] It works perfectly now, thanks! I was about to suggest Gmod-like up/down movement, but considering [I]Ctrl+W[/I] closes the tab and seemingly can't be stopped, that seems like a bad idea. Minecraft's flying controls ([I]shift[/I] instead of [I]ctrl[/I] to move downwards) may work, if you don't need a sprint button. Otherwise I'd try [I]caps-lock[/I] if possible.
[cpp] static const int test_vector_2_len = /* party like it's */ 1987; static const char *test_vector_2 = "[Intro]\n\n[Verse 1]\nWe're no strangers to love\nYou know the rules and so do I\nA full commitment's what I'm thinking of\nYou wouldn't get this from any other guy\n\n[Pre-Chorus]\nI just wanna tell you how I'm feeling\nGotta make you understand\n\n[Chorus]\nNever gonna give you up\nNever gonna let you down\nNever gonna run around and desert you\nNever gonna make you cry\nNever gonna say goodbye\nNever gonna tell a lie and hurt you\n\n[Verse 2]\nWe've known each other for so long\nYour heart's been aching but you're too shy to say it\nInside we both know what's been going on\nWe know the game and we're gonna play it\n\n[Pre-Chorus]\nAnd if you ask me how I'm feeling\nDon't tell me you're too blind to see\n\n[Chorus]\nNever gonna give you up\nNever gonna let you down\nNever gonna run around and desert you\nNever gonna make you cry\nNever gonna say goodbye\nNever gonna tell a lie and hurt you\nNever gonna give you up\nNever gonna let you down\nNever gonna run around and desert you\nNever gonna make you cry\nNever gonna say goodbye\nNever gonna tell a lie and hurt you\n\n[Bridge]\n(Ooh give you up)\n(Ooh give you up)\n(Ooh) never gonna give, never gonna give\n(give you up)\n(Ooh) never gonna give, never gonna give\n(give you up)\n\n[Verse 3]\nWe've known each other for so long\nYour heart's been aching but you're too shy to say it\nInside we both know what's been going on\nWe know the game and we're gonna play it\n\n[Pre-Chorus]\nI just wanna tell you how I'm feeling\nGotta make you understand\n\n[Chorus]\nNever gonna give you up\nNever gonna let you down\nNever gonna run around and desert you\nNever gonna make you cry\nNever gonna say goodbye\nNever gonna tell a lie and hurt you\nNever gonna give you up\nNever gonna let you down\nNever gonna run around and desert you\nNever gonna make you cry\nNever gonna say goodbye\nNever gonna tell a lie and hurt you\nNever gonna give you up\nNever gonna let you down\nNever gonna run around and desert you\nNever gonna make you cry\nNever gonna saay goodbye\nNever gonna tell a lie and hurt you...\n"; [/cpp] Some magnificent bastard at work. I checked and the length of the string is actually 1987. [quote]"Never Gonna Give You Up" is a single by Rick Astley, released in 1987[/quote] We have a bit of a tradition of using this song as test data for our RTL designs, it's pretty noticeable in a memory window. Nothing like getting rickrolled by a piece of hardware in simulation.
Basic demo playback test: [url]https://metapyziks.github.io/GOKZReplayViewer/[/url]
[QUOTE=r0b0tsquid;52829074]rick roll[/QUOTE] Why no sizeof? Edit: Nevermind I see now.
[QUOTE=Battlefrog;52828020]Psyonix (Studio that made Rocket League) did this when it came to Unreal Engine 3: [URL="https://youtu.be/Om0j9SLBDPQ?t=10m"]https://youtu.be/Om0j9SLBDPQ?t=10m[/URL][/QUOTE] Thanks for that link!
[QUOTE=Ziks;52829094]Basic demo playback test: [url]https://metapyziks.github.io/GOKZReplayViewer/[/url][/QUOTE] 60fps on my G5 Plus, nice!
Y'all know PHP right? And you also probably know Lua. Well, have you ever thought about combining the two into a web-oriented language? No, because no one in the right mind would. Luckily I'm not in the right mind. [IMG]https://image.prntscr.com/image/3oireypQRQW44fH6LXEHzQ.png[/IMG] I present to you, lua for web - "why would you do this" edition. In all seriousness, it currently outputs HTML to a static output file, and am currently working on a fast cgi implementation.
There's this tiny little function in the standard library added in C++14 that is super useful in some cases. You wouldn't ever want it to happen outside of programming, but std::exchange is useful for implementing move operators. You can this: resource = std::exchange(other.resource, nullptr); which will do resource = other.resource and other.resource = std::move(nullptr).
Spent some time refactoring LuaForWeb to also allow for third party plugins to be loaded, in this screenshot you can see a simple function that writes to the output buffer (which writes text to the respective location the script is being executed on). I'm currently also perfecting the library system, but that will take some more tweaks before it's ready. [IMG]https://image.prntscr.com/image/4jKqhVZmQgWAVBISydMgiA.png[/IMG] As you can see there's an entire Sdk library available so you can implement really anything you want (that doesn't mean you should...) ranging from a simple plugin, to your own executable to process LuaForWeb files.
[QUOTE=riekelt;52830791]Y'all know PHP right? And you also probably know Lua. Well, have you ever thought about combining the two into a web-oriented language? No, because no one in the right mind would. Luckily I'm not in the right mind. [IMG]https://image.prntscr.com/image/3oireypQRQW44fH6LXEHzQ.png[/IMG] I present to you, lua for web - "why would you do this" edition. In all seriousness, it currently outputs HTML to a static output file, and am currently working on a fast cgi implementation.[/QUOTE] cool stuff. i made somethin kinda like this a [URL="https://facepunch.com/showthread.php?t=1550856&p=51815839&viewfull=1#post51815839"]while back[/URL] [t]https://i.imgur.com/tSQWS0z.png[/t] stopped working on it because i realised i disliked lua and also i lost the project files ¯\_(ツ)_/¯
[QUOTE=riekelt;52833457]Spent some time refactoring LuaForWeb to also allow for third party plugins to be loaded, in this screenshot you can see a simple function that writes to the output buffer (which writes text to the respective location the script is being executed on). I'm currently also perfecting the library system, but that will take some more tweaks before it's ready. [IMG]https://image.prntscr.com/image/4jKqhVZmQgWAVBISydMgiA.png[/IMG] As you can see there's an entire Sdk library available so you can implement really anything you want (that doesn't mean you should...) ranging from a simple plugin, to your own executable to process LuaForWeb files.[/QUOTE] Amazing! How are you marshaling the arguments from lua to C# functions (and back)? I have something that does it transparently here, you can recycle the whole repo if you want. [url]https://github.com/cartman300/Lua.NET[/url]
Did some more work on the replay viewer demo: [img]https://files.facepunch.com/ziks/2017/October/29/chrome_2017-10-29_22-27-47.png[/img] [url=https://metapyziks.github.io/GOKZReplayViewer/?replay=replays/kz_exps_cursedjourney/0_SKZ_NRM_NUB.replay#t175509]Clicky[/url]
What SVN client do you guys use? Looking for something less intrusive than Tortoise.
[QUOTE=Ziks;52834711]Did some more work on the replay viewer demo: [img]https://files.facepunch.com/ziks/2017/October/29/chrome_2017-10-29_22-27-47.png[/img] [url=https://metapyziks.github.io/GOKZReplayViewer/?replay=replays/kz_exps_cursedjourney/0_SKZ_NRM_NUB.replay#t175509]Clicky[/url][/QUOTE] Framerate seems almost directly tied to window size; get ~7FPS on fullscreen on chrome (1920x1080), jumping to 20FPS on half size. Could be chrome's renderer?
[QUOTE=Instant Mix;52836476]Framerate seems almost directly tied to window size; get ~7FPS on fullscreen on chrome (1920x1080), jumping to 20FPS on half size. Could be chrome's renderer?[/QUOTE] Works fine on my version of chrome : Versie 61.0.3163.100 (Officiële build) (64-bits) 59-60 FPS constantly.
[code]package IO import org.khronos.webgl.DataView class Reader(val view: DataView, val decoder: Decoder, val littleEndian: Boolean, var position: Int = 0) { fun string(bytes: Int): String { val code = ByteArray(bytes) for (i in 0..(bytes - 1)) code[i] = u8() return decoder.toString(code) } fun i8() = view::getInt8 sized 1 fun u8() = view::getUint8 sized 1 fun u16() = view::getUint16 sized 2 fun u32() = view::getUint32 sized 4 fun f32() = view::getFloat32 sized 4 private infix fun <TResult> ((Int) -> TResult).sized(byteCount: Int) = this(position) before { position += byteCount } private infix fun <TResult> ((Int, Boolean) -> TResult).sized(byteCount: Int) = this(position, littleEndian) before { position += byteCount } private inline infix fun <TResult> TResult.before(after: () -> Unit): TResult { after() return this } }[/code] I'm not sure this is the intended use of infix functions, but it's pretty useful :chem101:
[QUOTE=Instant Mix;52836476]Framerate seems almost directly tied to window size; get ~7FPS on fullscreen on chrome (1920x1080), jumping to 20FPS on half size. Could be chrome's renderer?[/QUOTE] Make sure you have hardware acceleration on: chrome://gpu
[QUOTE=Sam Za Nemesis;52836680]The best way to use SVN is not to use it, the best way I can describe SVN in 2017 is that it's the IE6 of source control[/QUOTE] Tell that to the company I work at lol
[QUOTE=Sam Za Nemesis;52836680]The best way to use SVN is not to use it, the best way I can describe SVN in 2017 is that it's the IE6 of source control[/QUOTE] The only people I've ever seen use SVN are students still in the discovery process and students who think git is "too complicated". For game development it makes sense to use Git over something like SVN. The newest "Large File Storage" support in Git makes the old issues go away.
[vid]https://my.mixtape.moe/sjkyux.webm[/vid] [url=https://www.shadertoy.com/view/MljczK]Wanted to make something with hearts[/url], don't know why.
[QUOTE=Ziks;52834711]Did some more work on the replay viewer demo: [img]https://files.facepunch.com/ziks/2017/October/29/chrome_2017-10-29_22-27-47.png[/img] [url=https://metapyziks.github.io/GOKZReplayViewer/?replay=replays/kz_exps_cursedjourney/0_SKZ_NRM_NUB.replay#t175509]Clicky[/url][/QUOTE] Works great on my phone, it's also really relevant to the game I'm making right now. Cool!
[QUOTE=Ott;52835554]What SVN client do you guys use? Looking for something less intrusive than Tortoise.[/QUOTE] I've heard great things about git-svn. On that note, importing RCS repositories to Git is not fun, and people who still use RCS today should go rethink [i]every single on of[/i] their life decisions.
[QUOTE=AtomiCal;52836831]The only people I've ever seen use SVN are students still in the discovery process and students who think git is "too complicated". For game development it makes sense to use Git over something like SVN. The newest "Large File Storage" support in Git makes the old issues go away.[/QUOTE] [QUOTE=ace13;52837043]I've heard great things about git-svn. On that note, importing RCS repositories to Git is not fun, and people who still use RCS today should go rethink [i]every single on of[/i] their life decisions.[/QUOTE] Usually I use GitHub's desktop GUI :v:
SourceTree is far better than Github GUI IMO.
[QUOTE=ace13;52837043]I've heard great things about git-svn. On that note, importing RCS repositories to Git is not fun, and people who still use RCS today should go rethink [i]every single on of[/i] their life decisions.[/QUOTE] i pity the guy here who did the actual work in moving us from SVN to git, but somehow he seemed to pull it off [QUOTE='[aL`H]solokiller`og;52837479']SourceTree is far better than Github GUI IMO.[/QUOTE] I like sourcetree, but I've started using gitkraken. at first I didn't like how it really pushed the "modern" aesthetic and it seemed to almost obfuscate functionality, but gitkraken handles stashes better, auto-fetches from the remote much more frequently, and has handled larger repositories better. I've also found its conflict-resolution tools to be much better than sourcetree's. Also, sourcetree has been super buggy and crashy for me as of late. [editline]30th October 2017[/editline] [QUOTE=WTF Nuke;52830902]There's this tiny little function in the standard library added in C++14 that is super useful in some cases. You wouldn't ever want it to happen outside of programming, but std::exchange is useful for implementing move operators. You can this: resource = std::exchange(other.resource, nullptr); which will do resource = other.resource and other.resource = std::move(nullptr).[/QUOTE] also, things like this are why I'm pretty sure I'll never truly know C++ in full. I constantly discover new things, like this. [editline]30th October 2017[/editline] godbolt is like a drug, I get on it at work to see how changing a few things in a method affects what it compiles down to and suddenly i've burnt two hours looking at assembly its probably not all bad, though. i never got the chance to take a course vaguely covering assembly and how to read it, and i've already learnt a few things about assembly easily along with learning a few small techniques to improve my code. like how std::transform almost always optimizes really, really well!
Sorry, you need to Log In to post a reply to this thread.