• What are you working on? v67 - March 2017
    3,527 replies, posted
[QUOTE=Radical_ed;52514395]This is going to be finished in some capacity soon as well- eventually going to be a RTS path finding engine for Unity.[/QUOTE] Looks fantastic! Is that flow field pathfinding? I implemented something like that for my course work once, based on the Continuum Crowds paper.
[QUOTE=Radical_ed;52513772][IMG]http://i.imgur.com/qCg8uzE.gif[/IM] [I]soon[/I][/QUOTE] That's juicy as fuck. I really respect game design involving game juice, and you've covered every juicy base besides screen shake. (You should add it :rrerr:)
I'd have that as a screensaver, mesmerising
I got some random idea for an image format that would supposedly have good storage size for pictures which aren't rectangular in size but of arbitrary shapes, so i implemented it. When converting from .png to my format it assumes fully transparent pixels don't belong to the picture and determines the shape by the rest. [URL="http://carp.tk/$/redsnow.png"]Input .png[/URL] [URL="http://carp.tk/$/redsnow_out.png"]Output .png converted back[/URL] Size comparison [thumb]http://carp.tk/$/explorer_2017-07-28_14-21-51.png[/thumb] Size comparison of images which do not contain any transparent pixels [thumb]http://carp.tk/$/explorer_2017-07-28_14-24-27.png[/thumb] [URL="https://github.com/cartman300/ArbitraryPictureFormat"]Source code[/URL] [editline]28th July 2017[/editline] I could probably get it much smaller in size by implementing palettes like png does. Currently it's RGBA even if all channels aren't used.
I swear WPF is designed by sadistic extraterrestrials. Just when I'm about to give up on it, it delights me with some delicious feature I didn't know about, and then 15 minutes later I scream as my feeble mortal eyes burn to behold the verbose XAML vomit that is rapidly erupting from my screen. But at least my UI is pretty. I can't decide whether I love or despise it.
[QUOTE=Berkin;52516324]I swear WPF is designed by sadistic extraterrestrials. Just when I'm about to give up on it, it delights me with some delicious feature I didn't know about, and then 15 minutes later I scream as my feeble mortal eyes burn to behold the verbose XAML vomit that is rapidly erupting from my screen. But at least my UI is pretty. I can't decide whether I love or despise it.[/QUOTE] It's a lot better than WinForms ;)
[QUOTE=Nevec;52514974]Looks fantastic! Is that flow field pathfinding? I implemented something like that for my course work once, based on the Continuum Crowds paper.[/QUOTE] They're not pathing yet, right now they're pretty much boids with an FOV and breaks. They have a few behavioral weights involving their neighbors position around them as well, which is why they're queuing.
[QUOTE=Proclivitas;52516549]It's a lot better than WinForms ;)[/QUOTE] Hmm didn't expect people to like WinForms over WPF. I do a lot of UI heavy work at my job and use both. A lot of our stuff is still WinForms and when you have huge projects it is reallllllllly slow to use WinForms designers. Using WPF the initial climb to productivity is obviously much steeper than WinForms, but I feel that you can move so fast once you've taken the initial investment. Having Blend for designers is also an amazing bonus. Using the WPF designer in VS is very smooth and fast, no lag time. Why do you guys prefer WinForms?
Going through SDL Tutorials for C++ finally. Been putting it off for years, relying on SFML
[QUOTE=proboardslol;52517796]Going through SDL Tutorials for C++ finally. Been putting it off for years, relying on SFML[/QUOTE] why the switch? i used SDL2 for ages and never touched SFML personally but i'm just curious as to why you've decided to learn SDL now
[QUOTE=awcmon;52518012]why the switch? i used SDL2 for ages and never touched SFML personally but i'm just curious as to why you've decided to learn SDL now[/QUOTE] I'm interested in getting into 3D stuff and wanted to start with raycasting. Also, street cred. What sparked it though was "Masters of Doom" was in a recent Humble Book Bundle and listening to it talk about Doom and Wolfenstein 3D was really cool, so I wanted to make a similar game
[QUOTE=awcmon;52518012]why the switch? i used SDL2 for ages and never touched SFML personally but i'm just curious as to why you've decided to learn SDL now[/QUOTE] Probably personal preference, SDL is a C library while SFML is C++
[QUOTE=Berkin;52516324]I swear WPF is designed by sadistic extraterrestrials. Just when I'm about to give up on it, it delights me with some delicious feature I didn't know about, and then 15 minutes later I scream as my feeble mortal eyes burn to behold the verbose XAML vomit that is rapidly erupting from my screen. But at least my UI is pretty. I can't decide whether I love or despise it.[/QUOTE] You know, I feel the same way about WPF a lot of the time. But seeing your design come to fruition using nothing more than WPF and Helix Toolkit (for 3D) is an awesome feeling, and I'd say the end result is worth the pain and suffering. And also the massively bloated Resources.xaml from all of the style modifications :v: [vid]https://my.mixtape.moe/fzpxsl.mp4[/vid] [vid]https://my.mixtape.moe/qmwowu.mp4[/vid]
Improved pelican flight behaviour in my aquatic runner but haven't animated death yet, or added an end game screen: [vid]https://thumbs.gfycat.com/SevereShorttermHog-mobile.mp4[/vid]
I wrote a Nagios plugin for checking memory and swap on a Linux system in Bash, except it's currently a bit shite: [code] MEMTOTAL=$(grep MemTotal /proc/meminfo | sed 's/MemTotal://' | sed 's/kB//' | sed 's/ //g') MEMFREE=$(grep MemFree /proc/meminfo | sed 's/MemFree://' | sed 's/kB//' | sed 's/ //g') MEMAVAILABLE=$(grep MemAvailable /proc/meminfo | sed 's/MemAvailable://' | sed 's/kB//' | sed 's/ //g') MEMUSED=$(echo "$MEMTOTAL - $MEMAVAILABLE" | bc -l) [/code] Currently I'm using too many sed commands to get the memory values as a simple number. Could probably just get the value with awk, or just do a rewrite in Python (avoids having to use bc for other stuff)
[QUOTE=CarLuver69;52518473][...] [i](awesome, love not being able to embed videos)[/i][/QUOTE] It's [vid].
Does anyone have any recommendations for a language/framework for creating GUI application, ideally the final application shouldnt require the user to have any 3rd party VM installed (looking at you mono/java). Was thinking of using GoLang.. This is to build a launcher for a game
[url]https://www.shadertoy.com/view/XsSfW1[/url] [t]http://i.imgur.com/mJbI4Dd.png[/t] Made a ring twister effect for Shadertoy's size coding compo, based off this one I made a while ago [url]https://www.shadertoy.com/view/Xt23z3[/url] [code] void mainImage( out vec4 c, vec2 o ) { vec2 r = iResolution.xy; o = vec2(length(o -= r/2.) / r.y - .3, atan(o.y,o.x)); vec4 s = c.yzwx = .1*cos(1.6*vec4(0,1,2,3) + iTime + o.y + sin(o.y) * sin(iTime)*2.), f = min(o.x-s, c-o.x); c = dot(40.*(s-c), clamp(f*r.y, 0., 1.)) * (s-.1) - f; } [/code] 239 chars not counting cosmetic spaces.
[thumb]http://carp.tk/$/explorer_2017-07-30_04-15-21.png[/thumb] [thumb]http://carp.tk/$/explorer_2017-07-30_04-16-05.png[/thumb] [thumb]http://carp.tk/$/explorer_2017-07-30_04-15-51.png[/thumb] [thumb]http://carp.tk/$/explorer_2017-07-30_04-16-18.png[/thumb] Smaller in size than all the pngs i've tested with so far!
[QUOTE=cartman300;52520883][thumb]http://carp.tk/$/explorer_2017-07-30_04-15-21.png[/thumb] [thumb]http://carp.tk/$/explorer_2017-07-30_04-16-05.png[/thumb] [thumb]http://carp.tk/$/explorer_2017-07-30_04-15-51.png[/thumb] [thumb]http://carp.tk/$/explorer_2017-07-30_04-16-18.png[/thumb] Smaller in size than all the pngs i've tested with so far![/QUOTE] Should compare against webp lossless too.
[QUOTE=helifreak;52520993]Should compare against webp lossless too.[/QUOTE] [img]http://carp.tk/$/explorer_2017-07-30_05-19-55.png[/img] Welp, i got obliterated. Mine actually uses deflate, like png does, except mine tries to structure the data efficiently before even compressing it.
[QUOTE=cartman300;52521019][img]http://carp.tk/$/explorer_2017-07-30_05-19-55.png[/img] Welp, i got obliterated. Mine actually uses deflate, like png does, except mine tries to structure the data efficiently before even compressing it.[/QUOTE] PNG does actually alter the data before compression too, using either the pixel above, below, or both (via paeth prediction). I found that paeth generally results in better compression when using one method per image, although PNG does support swapping per scan line - didn't bother with that in my implementation as it already resulted in smaller images than Photoshop could produce.
I'm not sure what SFML does internally, but their rectangle rendering seems to be extremely slow, as well as intermittently causing framerate jitter (every 10th frame or so takes 2x as long for rendering). I didn't think it would turn out to be as bad as it did Replacing a simple rectangle call, nothing fancy, with a custom vertexarray solution took my frametime from 12 -> 4ms, where a bunch of that is actually processing overhead from other stuff This seems a tad silly, although I do have a nicely specialised case (asteroid rendering) and I guess that SFMLs containers are much more general This is what i had before [cpp] for(int i=0; i<vert_dist.size(); i++) { int cur = i; int next = (i + 1) % vert_dist.size(); float d1 = vert_dist[cur] * scale; float d2 = vert_dist[next] * scale; float a1 = ((float)cur / (vert_dist.size())) * 2 * M_PI; float a2 = ((float)next / (vert_dist.size())) * 2 * M_PI; a1 += rotation; a2 += rotation; vec2f l1 = d1 * (vec2f){cosf(a1), sinf(a1)}; vec2f l2 = d2 * (vec2f){cosf(a2), sinf(a2)}; l1 += absolute_pos; l2 += absolute_pos; float width = (l1 - l2).length(); float height = 1; ///shape passed in as argument to avoid recreating the rectangle shape.setPosition(l1.x(), l1.y()); shape.setSize({width, height}); shape.setRotation(r2d((l2 - l1).angle())); win.draw(shape); } [/cpp] And now [cpp] for(int i=0; i<vert_dist.size(); i++) { int cur = i; int next = (i + 1) % vert_dist.size(); float d1 = vert_dist[cur] * scale; float d2 = vert_dist[next] * scale; float a1 = ((float)cur / (vert_dist.size())) * 2 * M_PI; float a2 = ((float)next / (vert_dist.size())) * 2 * M_PI; a1 += rotation; a2 += rotation; vec2f l1 = d1 * (vec2f){cosf(a1), sinf(a1)}; vec2f l2 = d2 * (vec2f){cosf(a2), sinf(a2)}; l1 += absolute_pos; l2 += absolute_pos; vec2f perp = perpendicular((l2 - l1).norm()); sf::Vertex v[4]; v[0].position = sf::Vector2f(l1.x(), l1.y()); v[1].position = sf::Vector2f(l2.x(), l2.y()); v[2].position = sf::Vector2f(l2.x() + perp.x(), l2.y() + perp.y()); v[3].position = sf::Vector2f(l1.x() + perp.x(), l1.y() + perp.y()); sf::Color scol = sf::Color(col.x(), col.y(), col.z()); v[0].color = scol; v[1].color = scol; v[2].color = scol; v[3].color = scol; win.draw(v, 4, sf::Quads); }[/cpp]
Still working on some foundation library stuff, just wrapped up a first version of (hopefully) cross platform sockets - just using BSD/WinSock atm, so no IO completion ports on windows and not tested on linux yet but shoulldddd work. Kinda happy with the interface: [CODE] class UDPSocket { SocketHandle m_handle; Port m_port; public: UDPSocket(); bool Open(Port port); void Close(); bool IsOpen(); bool IsOpen(Port* port); bool Send(Address* address, void* data, size_t numBytes); size_t Receive(Address* sender, void* buffer, size_t bufferSize); }; class TCPConnectionSocket; class TCPListenSocket { SocketHandle m_handle; Port m_port; public: TCPListenSocket(); bool Listen(Port port, size_t maxConnections); void StopListen(); bool IsListening(); bool IsListening(Port* port); bool HasConnection(Address* address, TCPConnectionSocket* socket); }; class TCPConnectionSocket { SocketHandle m_handle; Address m_remoteAddress; public: TCPConnectionSocket(); bool Connect(Address* remoteAddress); bool Open(SocketHandle socket); void Close(); bool IsConnected(); bool IsConnected(Address* address); bool Send(void* data, size_t numBytes); size_t Receive(void* buffer, size_t bufferSize); }; [/CODE] UDP is as simple as it gets: Create an UDPSocket, call Open() on it, done, ready to send and receive. TCP is a bit more involved at least server side - you need a TCPListenSocket and get TCPConnectionSockets when the listen socket has successful connections queued up, but setting that up is pretty painless as well. All in all I'm quite happy with it so far, especially with the fact that they're value types - this will work as expected: [CODE] UDPSocket socketA; socketA.Open(8080); auto socketB = socketA; socketA.Close(); if(socketB.IsOpen() == false) { printf("This worked"); } [/CODE] Need to introduce enum based error codes instead of booleans tho.
So getting my renderer working at work has been really satisfying: I've found tons more bugs than I would've otherwise, I get to use code that I know like the back of my hand (flaws and all, to be fair), and I've completely forgotten that I ever considered Qt a good idea. Since I've gotten so many bugs fixed and have improved so much of my renderer, I decided to spend today getting DiamondDogs back up and running by getting my skybox + star demo working again. This time, though, I've added tweakable parameters to help me tune what looks good for generating the star surface texture: [video=youtube;myjJMScJKzE]https://www.youtube.com/watch?v=myjJMScJKzE[/video] Next is going to be giving that star much more depth and texture beyond just colors, along with getting the corona working again. I've got most of an HDR+Bloom renderpass setup implemented too, so if I'm lucky I'll get to that today sometime. If I redo the corona like I'd like to (a 3d texture or particle cloud I think), though, I probably won't make it there today :v
[QUOTE=Radical_ed;52514395]This is going to be finished in some capacity soon as well- eventually going to be a RTS path finding engine for Unity. [IMG]https://my.mixtape.moe/owijav.gif[/IMG][/QUOTE] The flowfield for this is almost done, I'm pretty excited to see it in action. [IMG]https://my.mixtape.moe/izumez.gif[/IMG]
Finally took some time to learn how AppVeyor works (artifacts, setup scripts, etc.) and got the idea of having a web hook for a Discord chatroom, similar to how GitHub can easily do the same thing. Obviously it wasn't as simple as pasting in the web hook URL from Discord, so I had to study the documentation a bit. I eventually came up with this: [code] { "text":"Build <{{buildUrl}}|{{buildVersion}}> has {{#passed}}passed{{/passed}}{{#failed}}**FAILED**{{/failed}} on <https://{{repositoryProvider}}.com/{{repositoryName}}/commit/{{commitId}}|{{repositoryName}}/{{branch}}>!" } [/code] Result: [img]http://i.imgur.com/Da1EwDV.png[/img] Setup: [t]http://i.imgur.com/ehjJkzO.png[/t] I'd like to have a preview box or a commit message, but at least you can click on the last part to go directly to the commit itself. Nothing fancy, but at least it's automated!
Vulkan renderpasses really hurt my head. This is where I wish there were more examples explaining the [I]why[/I] of things. tldr of it is that it makes you explicitly declare how you're going to render things, so you can like explicitly declare a gbuffer renderpass and the corresponding subpasses (render to texture, do FX, composition, transparency pass for example) so that the driver can optimize the hell out of these the tricky part is getting the subpass dependencies right and maintaining image layout transitions, memory barriers, and avoiding just outright incorrect setups. its tricky stuff and I've spent most of the day just writing the bare code - I didn't even get the chance to test it :/ passed 10k SLOC on my renderer over the weekend, and this is 10,000 lines of code I'm [I]almost[/I] (but not quite) proud of. [editline]edited[/editline] as a throwback to my first posts in this thread almost a year ago now, I've been getting the voxel thingy actually running in Vulkan again. the throwback bit is all the strange bugs and artifacts I've had :v: [t]http://i.imgur.com/5QTyGQY.png[/t] (in this case, all of my positions were being uploaded but only half the normals/UVs arrive)
so uh i call this "cheap ass ambient occlusion" [t]http://i.imgur.com/U6s1g6r.png[/t] [t]http://i.imgur.com/xaDTiTE.png[/t] and the way i did it is uh [t]http://i.imgur.com/il3iu2B.png[/t] [t]http://i.imgur.com/TcfGm26.png[/t] [t]http://i.imgur.com/5n1cD2x.png[/t] [B]EDIT:[/B] fuck that was supposed to read "caao" not "ccao" i fucking failed
cheap cylinder ambient occlusion i get it
Sorry, you need to Log In to post a reply to this thread.