• What Are You Working On? May 2015
    1,601 replies, posted
I think we need to do a census of WAYWOer, so we can find out once and for all exactly how many Matts we have.
[QUOTE=Dr Magnusson;47655637]I think we need to do a census of WAYWOer, so we can find out once and for all exactly how many Matts we have.[/QUOTE] [url]http://facepunch.com/showthread.php?t=1463724[/url]
[QUOTE=cra0kalo;47655591]More cVision stuff This time aim lines big thanks to [B]Tamschi[/B] for the math angle help. Basically will draw the enemies viewangles when they are using snipers so you can see the exact angle they are holding. [sp]BOTS SEE THROUGH WALLS[/sp] [video=youtube_share;LpWT_v26UnQ]http://www.youtube.com/watch?v=LpWT_v26UnQ[/video][/QUOTE] Is source using C++ ?
[QUOTE=proboardslol;47654891]I am out of work for a month. I've got my classmates to trade food for debugging their code. In other news, why the fuck is there no byref/byval keyword in java like there is in c#? a lot of times when my classmates are having some kind of problem with their code it's because they don't understand the difference between the two and it's because java is like, 99% byref[/QUOTE] Passing by reference is almost exclusively what you want.
[QUOTE=Ac!dL3ak;47654852]Thanks, I got the shaders working in love, but now I need to learn about GLSL because I don't know wtf is going on in those[/QUOTE] This is an old ass thread but I still like it, especially the simplified bloom shader. [URL]https://love2d.org/forums/viewtopic.php?f=4&p=38565[/URL] [code] vec2 image_size; vec4 effect(vec4 color, Image tex, vec2 tc, vec2 pc) { vec2 pixel_offset = vec2(1.0)/image_size; color = Texel(tex, tc); // maybe add a weight here? color += Texel(tex, tc + vec2(-offset.x, offset.y)); color += Texel(tex, tc + vec2(0, offset.y)); color += Texel(tex, tc + vec2(offset.x, offset.y)); color += Texel(tex, tc + vec2(-offset.x, 0)); color += Texel(tex, tc + vec2(0, 0)); color += Texel(tex, tc + vec2(offset.x, 0)); color += Texel(tex, tc + vec2(-offset.x, -offset.y)); color += Texel(tex, tc + vec2(0, -offset.y)); color += Texel(tex, tc + vec2(offset.x, -offset.y)); return color / 9.0; // use 10.0 for regular blurring. } [/code] The way you would set "image_size" is like this. [code] shader:send("image_size", {canvas:getDimensions()}) [/code] If you want to see some really crazy GLSL then go here [URL]http://glslsandbox.com/[/URL]
[QUOTE=BoowmanTech;47655852]Is source using C++ ?[/QUOTE] It has previously been stated that this has been done in C#.
[QUOTE=RusselG;47656008]It has previously been stated that this has been done in C#.[/QUOTE] Probably, but I didn't read that post so not my fault.
[QUOTE=AntonioR;47654383]Could you spare a tip or two how you did it ?[/QUOTE] You mean the SSAO in particular?
[QUOTE=Darwin226;47655970]Passing by reference is almost exclusively what you want.[/QUOTE] Well I think it leads to unsafety. Though java is technically by value, something like: [code] int americaFuckYeah = 1; System.out.println(americaFuckYeah); // prints 1 foo(americaFuckYea); System.out.println(americaFuckYeah); // prints 2 foo(int bar){ //do a bunch of shit bar = 2; //do some more shit }[/code] does all this without explicit instructions to do so
[QUOTE=proboardslol;47656371]Well I think it leads to unsafety. Though java is technically by value, something like: [code] int americaFuckYeah = 1; System.out.println(americaFuckYeah); // prints 1 foo(americaFuckYea); System.out.println(americaFuckYeah); // prints 2 foo(int bar){ //do a bunch of shit bar = 2; //do some more shit }[/code] does all this without explicit instructions to do so[/QUOTE] Umm actually you misspelled americafuckyeah in your foo parameters so you wont be able to compile your code or maybe run it I cant remember which because I just dont okay
[QUOTE=proboardslol;47656371]Well I think it leads to unsafety. Though java is technically by value, something like: [code] int americaFuckYeah = 1; System.out.println(americaFuckYeah); // prints 1 foo(americaFuckYea); System.out.println(americaFuckYeah); // prints 2 foo(int bar){ //do a bunch of shit bar = 2; //do some more shit }[/code] does all this without explicit instructions to do so[/QUOTE] [URL]http://ideone.com/09Aetv[/URL] No. It doesn't. It would be extremely weird if it did. A reference in this context is just a pointer to a constant value. You can change the pointer because it itself isn't constant (but this doesn't change the value passed in), and you can modify the object pointed to by using it's methods. The only thing you can't do is modify the object itself like you would be able to in C. Let's say you have an object `o` in memory at some address `a` [code] address: |a |a+x data: |o header|o data [/code] Then if you have a function like [code] void f(object oRef);[/code] What happens when you call it like [code]f(o)[/code] is that `oRef` (basically a pointer) becomes a. It let's you modify stuff in the `o data` memory with o's methods and properties. You can also do `oRef = something else` to rebind the `oRef` pointer to some other memory location. The only thing you can't change is the header part. You can't swap out the WHOLE `o` object in memory. You can think of primitive types (like ints, floats, bools) as having no data and consisting only of headers. With them you can just change what the pointer is pointing to, can't modify the object itself.
[QUOTE=proboardslol;47656371]Well I think it leads to unsafety. Though java is technically by value, something like: [code] int americaFuckYeah = 1; System.out.println(americaFuckYeah); // prints 1 foo(americaFuckYea); System.out.println(americaFuckYeah); // prints 2 foo(int bar){ //do a bunch of shit bar = 2; //do some more shit }[/code] does all this without explicit instructions to do so[/QUOTE] Thats not correct, however wrap the int in an object: [code] /* package whatever; // don't place package name! */ import java.util.*; import java.lang.*; import java.io.*; class Bar { public int i; public Bar(int a){ i = a; } public void add(){ i++; } } /* Name of the class has to be "Main" only if the class is public. */ class Ideone { public static void main (String[] args) throws java.lang.Exception { Bar bar = new Bar(1); System.out.println(bar.i); // prints 1 foo(bar); System.out.println(bar.i); // prints 2 } static void foo(Bar bar){ bar.add(); } } [/code]
A bit of clarification: pass-by-ref and pass-by-val are semantic concepts. People often confuse other things to relate to those concepts when they often have nothing to do with them. [code] void f(int x) { x = 5; } int a = 6; f(a)[/code] This doesn't modify a, but the fact that it doesn't has nothing to do with int being a value type. It definitely has nothing to do with passing by value. [code] void f(List<int> x) { x = new List<int>() { 1 }; } List<int> a = new List<int>() { 2 }; f(a)[/code] Here we're using a List<int> which is a reference type, but a still doesn't get modified. Again, nothing to do with value/reference types and passing by reference. Assignment doesn't modify anything. Ever. It just rebinds an existing name (this is, for example, not true in C where you can do *p = something that does modify memory). Now take a look at this example: [code] void f(List<int> x) { x.Add(1); } List<int> a = new List<int>() { 2 }; f(a)[/code] Here passing by reference actually comes into play. In a pass-by-ref language like C# and Java we would modify the SAME list we passed in. In a pass-by-val language, the list would get copies and the .Add wouldn't apply to the original. If you're comfortable with pointer, a convenient way to think about passing by reference is that EVERYTHING is a pointer. List<int> x, actually means List<int>* x. Combine that with the "caveat" that you can't do modifying assignment (*x = something), just regular assignment, and you have the pass-by-ref model.
[QUOTE=fewes;47656320]You mean the SSAO in particular?[/QUOTE] Yes <3
due to source and quake influence, i'm used to nearly exclusively passing pointers around
Got attached generic behaviors, my single-inheritance/modular-function solution, working :) Now I can write a few lines of code and attach it to any IBehavioral<> object. [img]http://imgur.com/ytPzotL.png[/img]
polkm is basically the best, and you can't have him he's mine [editline]4th May 2015[/editline] he introduced some fixes into Grid, which have been merged into VA and will be code dropped into grid-sdk on GitHub tonight
[QUOTE=AntonioR;47656885]Yes <3[/QUOTE] It's very simple and rather rough if you actually look at the buffer (only 12 samples): [img]http://puu.sh/hBfOM.jpg[/img] It works by sampling the input mask with some small offsets, just a standard blur shader really. I'm using a predefined gaussian blur array but it could easily be moved to a 2-pass blur with n amount of samples. The only other inputs it takes besides the scene mask are the screen resolution and two values for the radius and offset. Here's the GLSL code: [code] uniform sampler2D rt_sceneMask; uniform vec2 r_screenRes; uniform float r_ssaoRadius; uniform vec2 r_ssaoOffset; vec2 taps[12] = vec2[12]( vec2( -0.326212, -0.405805), vec2( -0.840144, -0.073580), vec2( -0.695914, 0.457137), vec2( -0.203345, 0.620716), vec2( 0.962340, -0.194983), vec2( 0.473434, -0.480026), vec2( 0.519456, 0.767022), vec2( 0.185461, -0.893124), vec2( 0.507431, 0.064425), vec2( 0.896420, 0.412458), vec2( -0.321940, -0.932615), vec2( -0.791559, -0.597705) ); void main() { vec4 ao = 0; vec2 pixelSize = vec2( 1.0f / r_screenRes.x, 1.0f / r_screenRes.y ); // Center tap ao += texture2D(rt_sceneMask, gl_TexCoord[0] + pixelSize * r_ssaoOffset.x ); if( r_ssaoRadius > 0 ) { // Sample taps int tapCount = 12; for ( int i=0; tapCount > i; i++ ) ao += texture2D(rt_sceneMask, gl_TexCoord[0] + taps[i] * pixelSize * r_ssaoRadius + pixelSize * r_ssaoOffset.x ); ao *= ( 1.0 / (tapCount+1) ); } vec4 p_sceneMask = texture2D(rt_sceneMask, gl_TexCoord[0]); float f_sceneMask = 1 - p_sceneMask.r * p_sceneMask.g; gl_FragColor = ao.r * ao.g + f_sceneMask; } [/code]
[QUOTE=BoowmanTech;47656107]Probably, but I didn't read that post so not my fault.[/QUOTE] this is proof we need the 'bad reading' rating back also what sort of dumb argument is that.
Put my [URL="https://github.com/Sidneys1/GFSM"]Generic Finite State Machine[/URL] and [URL="https://github.com/Sidneys1/Behaviorals"]Behavioral[/URL] frameworks on GitHub. :) [editline]4th May 2015[/editline] I have no idea if they're any good, so feedback is welcome :) So far they work, though they haven't been heavily tested.
[QUOTE=Sidneys1;47658338]Put my [URL="https://github.com/Sidneys1/GFSM"]Generic Finite State Machine[/URL] and [URL="https://github.com/Sidneys1/Behaviorals"]Behavioral[/URL] frameworks on GitHub. :) [editline]4th May 2015[/editline] I have no idea if they're any good, so feedback is welcome :) So far they work, though they haven't been heavily tested.[/QUOTE] What do these do/mean , for a starter? If I may ask ofc.
[QUOTE=war_man333;47658090]this is proof we need the 'bad reading' rating back also what sort of dumb argument is that.[/QUOTE] Let's not stretch this into a page long argument :v:
[QUOTE=Dostoyevsky;47658478]What do these do/mean , for a starter? If I may ask ofc.[/QUOTE] tl;dr: GFSM allows you to easily implement a finite state machine. In my case I used it to model the states of a game I'm working on (Main Menu, Ingame, Pause Menu, etc) Behavioral lets you attach behaviors to classes. In my case I use it to attach various behaviors to UIElements in my menu states. Not very descriptive I know, but they're kinda hard to explain. There is example code in the readme's, reading through it might make more sense than my babbling.
[QUOTE=cra0kalo;47655591]More cVision stuff This time aim lines big thanks to [B]Tamschi[/B] for the math angle help. Basically will draw the enemies viewangles when they are using snipers so you can see the exact angle they are holding. [sp]BOTS SEE THROUGH WALLS[/sp] [video=youtube_share;LpWT_v26UnQ]http://www.youtube.com/watch?v=LpWT_v26UnQ[/video][/QUOTE] really cool, but it sucks to see that you're going to be selling it.. :( [url]http://cvision.cra0.net/[/url] too many cheaters in my rank
[QUOTE=Rocket;47658797]There's really no reason to make a hack other than to sell it.[/QUOTE] that's true. you probably can get a shitton of money from it. It just sucks to see it happening I play a lot of csgo and playing against hackers/with hackers isnt very fun.
Making a space game in Unity for Android + iPhone [video=youtube;EK55wDnrgqg]http://www.youtube.com/watch?v=EK55wDnrgqg[/video] You can zoom in and out when you pinch too
I wish it was reasonably possible to create some sort of responsive graphics settings that disabled advanced features when your card proved in real-time that it couldn't render frames fast enough with said features enabled. I wanted to do this with Grid, but as far as I know, it's not really feasible or at least easily doable due to any combinatorial set of graphics settings being enabled. It's a cute idea nonetheless. [editline]4th May 2015[/editline] Also, wow, I am super impressed with that cheat marketing. I mean some people's legit products do not even pitch a sell that well.
[QUOTE=andrewmcwatters;47659047]Also, wow, I am super impressed with that cheat marketing. I mean some people's legit products do not even pitch a sell that well.[/QUOTE] there's a typo in the disclaimer, i can't buy it now
[QUOTE=cra0kalo;47655591]More cVision stuff This time aim lines big thanks to [B]Tamschi[/B] for the math angle help. Basically will draw the enemies viewangles when they are using snipers so you can see the exact angle they are holding. [sp]BOTS SEE THROUGH WALLS[/sp] [video=youtube_share;LpWT_v26UnQ]http://www.youtube.com/watch?v=LpWT_v26UnQ[/video][/QUOTE] What is the music?
[QUOTE=jung3o;47658749]really cool, but it sucks to see that you're going to be selling it.. :( [url]http://cvision.cra0.net/[/url] too many cheaters in my rank[/QUOTE] Like I said when he first posted stuff about this, people who show they're working on hacks here never have good intentions.
Sorry, you need to Log In to post a reply to this thread.