1,429 Results
It's definitely not just c#. I'd go as far as to say that 99% of c#, c or c++ code you see will have curly brackets on newlines.
garry Programming Reply
There's not really a lot there to crit. Use newlines before { It's okay to have the parameters on one line You can use "var" instead of the whole type name when defining locals A preference thing, but generally private vars start with lowercase, public with upper. No need fo...
garry Programming Reply
Because I'm talking about doing something that normal people can use, not just hyper nerds.
garry Programming Reply
Yeah, that's cool - but you have to use linux and chain commands in bash.
garry Programming Reply
I wouldn't really want it to be that granular and hard to use. I think ideally a user would download a "screen snipping" mod, which would default to taking a png and saving on the clipboard. But of course a user could go in there and change the file type and destination. It f...
garry Programming Reply
I seem to remember doing this with Roslyn
garry Programming Reply
No the idea is kind of like a ShareX, but more modular. ShareX has a concept of destinations, which is cool, but they're all bundled. What I would propose, would be something like ShareX but you install modules from an app store type thing. These modules use the systems provi...
garry Programming Reply
I use ShareX too. The whole of Facepunch do. We have it upload to amazon s3 automatically. ShareX makes me want to make a Garry's Mod of Windows..
garry Programming Reply
how to record a 7mb gif of code
garry Programming Reply
Looks awesome
garry Programming Reply
No-one could figure out the controls, so I had to add some help https://files.facepunch.com/garry/1064814f-d0ff-46d7-bc55-5f1b3f6e5831.mp4
garry Programming Reply
Damn, GWEN still rocking?
garry Programming Reply
Speaking as an employer, here's what I'm looking for when I look at job applicants: What have they done? Here's what I'm not interested in: Watching cringey vlog video applications Reading a lot Education, Diplomas Photos of pets You wouldn't believe the amount of people t...
garry Programming Reply
Haha, that's a cool idea, but I probably need to put a stop to it
garry Programming Reply
I usually just select all, cut, paste.. and it formats it how it should be.
garry Programming Reply
Stay in my hole
garry Programming Reply
Did a video about what I did this week https://www.youtube.com/watch?v=vihNcweO1w8
garry Programming Reply
Made a mini profiler, integrated it with this site https://files.facepunch.com/garry/a293d4c2-caa1-4978-94d1-1d11ad556145.png Gotta work out how to wrap/log sql queries now.
garry Programming Reply
https://files.facepunch.com/garry/2018/03/05/Tub%2005_03_2018%2021_20_32.mp4 <3 Mario Odyssey
garry Programming Reply
That looks rad, did you try particles first?
garry Programming Reply
Installing ProBuilder from the package installer, not having it all in the Assets folder https://media.giphy.com/media/l3q2LH45XElELRzRm/giphy.gif
garry Programming Reply
Yeah we use lfs. We use git with lfs for some reasonably big projects, like sandbox, but I gave the rust team a choice and they wanted to stay with plastic.
garry Programming Reply
Rust's is 29gb right now, no splitting.
garry Programming Reply
Normal unity grass with really low alpha 😫
garry Programming Reply
Runs the same for me
garry Programming Reply
Hairy grass https://files.facepunch.com/garry/2018/01/16/704926ea.png
garry Programming Reply
At Facepunch we use Plastic and Git. I much prefer git. I like doing a ton of smaller commits and then pushing them. But there's no doubt that plastic still handles bigger repositories better.
garry Programming Reply
Leg animation and throwing https://files.facepunch.com/garry/2018/01/09/%202018-01-09%2022-53-30-129.mp4
garry Programming Reply
100% agree. To work out it needs to be able to unfold in-line, maybe show the last few comments, and reply in-line. Also post in-line too. I ideally wanted to make the posts zoomed out, so you clicked on them and they zoomed in full size, but haven't figure that out yet.
garry Programming Reply
No, keep using this thread.. but feel free to post in that forum too. I'm just experimenting at the moment, seeing if we can come up with a system that works.
garry Programming Reply
Link me to them and I'll see what I can do
garry Programming Reply
Default visual studio
garry Programming Reply
Chewgum: trying to do html puts you on the error page Just .NET being dumb, should be okay now
garry Programming Reply
Probably not
garry Programming Reply
Here you go nerdo private Api.Data.Thread PostThread(Model.ThreadCreateForm form) { using (var db = new Api.Data.Entities()) { var ipaddress = Util.GetIPAddress(); var country = GeoIp.Get(ipaddress); var thread = new Api.Data.Thread { ...
garry Programming Reply
Syntax Highlighting
garry Programming Thread
Experimented this week with unity/webgl/websockets [url]http://shooty.facepunch.com/[/url] It's using a really minimal dedicated server instead of a Unity server. Which is probably stupid tbh because that means the server isn't simulating physics or anything, it's just e...
garry Programming Reply
[QUOTE=DrTaxi;50397009]Please don't remove 60% of features and 90% of subforums this time kthx [editline]---[/editline] Custom Forums 2006 - 2009 NEVER FORGET[/QUOTE] No deal
garry Programming Reply
[img]http://files.facepunch.com/garry/f24c0/c5033962.png[/img] Making my own forum
garry Programming Reply
I guess I should make it easy on myself by storing the zero based postid in the table..
garry Programming Reply
Say you have 10,000 posts in a database, and are paging them with limit, offset. So then you get a postid, how do you efficiently determine which page that it's on?
garry Programming Reply
I don't want to stop the page changing height, I want the scrolling to stay consistently relative to the top or bottom of the page depending on which one is closer.
garry Programming Reply
Both. The page changes size - and since scroll is determined by the distance from the top of the page, the button you're clicking moves. Ideally it'd become determined by the distance from the bottom of the page when you scroll down. This seems like something that'd be a co...
garry Programming Reply
When the content changes on a webpage, that you're scrolled near the bottom of, is there any existing solution to lock the scroll position relative to the bottom - instead of the top? So that this small movement wouldn't happen.. [url]http://files.facepunch.com/garry/5ea...
garry Programming Reply
Thanks guys, defo going to have a play with some of that stuff. Sounds like I'm doing stuff the old fashioned way.
garry Programming Reply
I'm using mysql right now - but I'm only really using that because it's what I'm used to - from my php days. I wrote a wrapper for it, so I'm like. [code]var reportid = Facepunch.MySQL.Current.ExecuteGetLastInserted( "INSERT INTO benchmarkReport ( data, gameid, salt ) VALUE...
garry Programming Reply
Can someone explain the right way to be accessing databases in c#/.net? Like if I want to be putting something in a database I shouldn't be writing the sql, right? I should be passing a structure to some function and it should be correctly interpreting that right? If I w...
garry Programming Reply
I learned asp.net over the weekend. Can't believe all the time I wasted on PHP, what a bunch of shit.
garry Programming Reply
[QUOTE=Map in a box;49140153]This will theoretically allow LuaJIT support via FFI, too.[/QUOTE] We like to call it LuaShit
garry Programming Reply
[QUOTE=Berkin;49138421]That is really clever. I'm surprised I haven't seen this technique used before for writing managed wrappers.[/QUOTE] It kind of exists, but the systems I found (like SWIG) are pretty intimidating. I didn't really need all the stuff they provide, and ...
garry Programming Reply
Made a program to parse comments in cpp files to turn this [img]http://files.facepunch.com/garry/a969ca23b/2015-11-18_09-28-00.png[/img] into this [img]http://files.facepunch.com/garry/570b01941/2015-11-18_09-28-22.png[/img] so we can do this [img]http://files.f...
garry Programming Reply
Lets see if this works [url]http://slack.facepunch.com/[/url]
garry Programming Reply
[img]http://files.facepunch.com/garry/2015/June/18/2015-06-18_17-40-16.png[/img]
garry Programming Reply
[vid]http://files.facepunch.com/garry/2015/June/18/2015-06-18_00-45-41.mp4[/vid] Done!
garry Programming Reply
This would make my life so much easier right now [url]http://answers.unity3d.com/questions/807164/can-i-duplicate-folder-with-internal-dependencies.html[/url]
garry Programming Reply
Cuz Unity5's networking is gonna eat everyone's food
garry Programming Reply
[QUOTE=Richy19;46295308]@Garry Did you ever explain how you did that unity web project that could hotload code in the browser? If not, would you mind explaining it? Or could we see the project? :)[/QUOTE] Pretty much what reevezy67 said - it's just eval
garry Programming Reply
[QUOTE=ECrownofFire;46291402][url=http://fabiensanglard.net/quake3/network.php]This has more detail on it as well[/url].[/QUOTE] This is probably what I'm gonna end up doing, delta'ing on each variable rather than each byte.
garry Programming Reply
[QUOTE=Cold;46287644]How big are the packages you want to diff, and much of it is likely to change per-tick? EDIT: Is it even worth introducing complexity to save some bandwidth? You're more likely to cap on CPU/Ram before you even get close to capping an 100/100 connection...
garry Programming Reply
For the implementation I was going to chunk it into say, 8 byte chunks, then send a 32bit int first describing which chunks changed. This would mean an overhead of 32 bytes for every 256 bytes that get sent. But the 32 bytes could potentially save up to 248 per send. I dunn...
garry Programming Reply
For our networking I was considering always generating a data blob for each entity - but then analyzing every frame and only sending the differences vs the last send. Is that something that's ever done? Is it feasible to do with decent performance?
garry Programming Reply
I procmonned the compiler. The huge majority of time is spent reading and writing thousands of files to Library/Shadercache/.
garry Programming Reply
Anyone got any tips on reducing build times?
garry Programming Reply
[QUOTE=Pelf;45941085]How can I get all components on a gameobject that implement a particular interface? I'm doing what people on the forums and unity answers say to do ... [code] foreach ( GameObject stateObj in state.objects ) { // This is wha...
garry Programming Reply
You can ray-trace spheres/capsules
garry Programming Reply
Oh nice! [vid]http://files.facepunch.com/garry/2014/August/22/1408724321.mp4[/vid]
garry Programming Reply
Unity 4.6? That's cute :) [img]http://files.facepunch.com/garry/2014/August/20/2014-08-20_19-39-44.png[/img]
garry Programming Reply
Would be cool in Unity if you could add imageeffects to child objects on a camera instead of piling them all on one camera. We have 25 effects on our camera in Rust, some are only enabled when in water etc.
garry Programming Reply
[QUOTE=Luafox;45628271]if i remake garrys mod in unity will i get a job[/QUOTE] Probably
garry Programming Reply
[QUOTE=layla;45621481]I've been remaking facewound using unity, It's a pointless but fun project for me. I was planning on only showing it once it was finished but I failed to keep it secret because everyone guessed what game I was remaking. There's still a shit load to do ...
garry Programming Reply
Purchased :)
garry Programming Reply
I should set up a macro for this [vid]http://files.facepunch.com/garry/2014/July/22/1406019597.mp4[/vid]
garry Programming Reply
[QUOTE=KillaMaaki;45432248]Working on a Fire FX pack for Unity. [video=youtube;SFQaYXjmrL4]http://www.youtube.com/watch?v=SFQaYXjmrL4[/video] Six effects: - Regular fire - Torch - Character/object on fire - Big fire - Wide fire (molotov?) - Flamethrower Thoughts...
garry Programming Reply
It's one per item. It works the same now except they're not scriptable objects. It's really a lot of overhead just to have Unity GC them.. especially considering the normal classes are GC'd and don't have that overhead.
garry Programming Reply
Stopped using ScriptableObject for our Items in Rust. Before: [img]http://files.facepunch.com/garry/2014/July/07/2014-07-07_19-25-32.png[/img] After: [img]http://files.facepunch.com/garry/2014/July/07/2014-07-07_19-26-02.png[/img] Looks like about a saving of 100MB...
garry Programming Reply
[QUOTE=Banandana;45302364]I don't know how well [URL="https://thrift.apache.org/"]Thrift[/URL] compares to it but I believe it was developed as a spinoff of protobufs or something and is slightly different. It was developed by an X-googler and was used in facebook, designed to...
garry Programming Reply
I'm using c# tho and all the implementations are pretty heavy/slowish :(
garry Programming Reply
[QUOTE=sarge997;45301014]So I'm looking into networking solutions for my new game. I've decided to go against using Unity networking and Photon. I'd like to have the ability to host dedicated servers and what not. Rust seems to do it alright, so it'd be cool to know w...
garry Programming Reply
Is that irrelevant if you're not actually releasing anything in Dispose?
garry Programming Reply
Cool, that's what I thought. People talk of using IDisposable like it makes your object becomes unmanaged and no longer a burden on GC, and instantly released/destroyed.
garry Programming Reply
Right. So it's true that the object is still `managed`, it still part of the GC system?
garry Programming Reply
I'm getting mixed messages about IDisposable in C#. Am I right in thinking it DOESN'T take stress away from the garbage collector at all? It's basically just a reliable way to call a destructor? i.e, if you have a IDisposable class in a using, Dispose() will be called on...
garry Programming Reply
My biggest issue with Visual Studio is it constantly asking me if I want to reload the project file. I know why it's happening (adding files, renaming files, changing build vars).. but the fact that it asks me 40+ times a day kills me.
garry Programming Reply
Had a quick scan of your code. Seems like using [URL="http://docs.unity3d.com/ScriptReference/Quaternion.Euler.html"]Euler [/URL] would be easier?
garry Programming Reply
We use plastic on Rust. Works pretty good, really fast with larger files compared to SVN/GIT.
garry Programming Reply
Last time I looked at Photon it required you to write another program for the server, to bounce messages off? I feel like a lot of the networking solutions miss the mark in a few ways. One of the big ones is dedicated servers, a lot of the current solutions assume that you'...
garry Programming Reply
[QUOTE=KillaMaaki;44898977]Speaking of multiplayer, who here is excited for UNET? :D[/QUOTE] I would be more excited if it came out 2 months ago :(
garry Programming Reply
That'd work.. I wonder how fast it is.. only one way to tell I guess.
garry Programming Reply
[QUOTE=sarge997;44825807]What do you guys think the best way of handling decals/blood decals in Unity? As an example, I'm actually not sure how I'd do this. So I'm asking. Anyways, in my top-down shooter. I want blood decals to spray across the floor, when a rigidbody hits ...
garry Programming Reply
That's what I do right now. The issue is that every frame you're going through 100,000 tasks - even though you're only calling 7 tick functions :/
garry Programming Reply
Here's a n00b question.. what's the fastest way to make a tick function? So you can go.. AddTick( 0.1f, MyFunction ) and it'll call the function every 0.1 seconds. What's the fastest way to handle that back-end - so you can have 100,000 ticks?
garry Programming Reply
[QUOTE=garry;44712487]When you assign a mesh to a MeshFilter, does it create a new one? I'm seeing some weird stuff coming back in the profiler [img]http://files.facepunch.com/garry/home/2014/May/03/15-51/u33J.png[/img] See the number of meshes.. we only have about 10...
garry Programming Reply
sharedMesh
garry Programming Reply
When you assign a mesh to a MeshFilter, does it create a new one? I'm seeing some weird stuff coming back in the profiler [img]http://files.facepunch.com/garry/home/2014/May/03/15-51/u33J.png[/img] See the number of meshes.. we only have about 10 meshes.. should it be...
garry Programming Reply
Released a couple of scripts on my blog to enable the command line console in Windows.. [url]http://garry.tv/2014/04/23/unity-batchmode-console/[/url]
garry Programming Reply
monodevelop is for suckers.. right?
garry Programming Reply
Anyone made a FPS weapon system with Unity? Just doing some experiments. In Rust we use a custom shader.. but I'd like to avoid that if at all possible. So problems as I see them: [b]Weapon clips through world[/b] [b]Weapon casts crazy shadows in world[/b] [b]Weapon FOV c...
garry Programming Reply
[QUOTE=layla;44030768]Alright I got the map loading from disk, only problem is that I have to have a copy of the file in Assets/ and _Data/ so it works in both the editor and game. I guess I can live with that. I'm using this to find the path [url]http://docs.unity3d.com/Docum...
garry Programming Reply
[QUOTE=layla;44030200]The one thing I dislike about unity is that it makes it difficult to have external game files, it packs everything into some proprietary format. I know they do that to make it easier to build for multiple platforms but what are my options if I want all my...
garry Programming Reply
[QUOTE=Asgard;44019456]Would you mind sharing the Point and Click scripts?[/QUOTE] Sure, here you go: [url]https://dl.dropboxusercontent.com/u/3590255/Bits/PointAndClick.zip[/url] Oh you need this somewhere too: [code]using UnityEngine; using System.Collections; ...
garry Programming Reply