[QUOTE=Tamschi;49574732]
Most importantly you can control where exactly object instances are put. (In C# [I]can[/I] do this to [I]some[/I] extent, but it's [URL="http://stackoverflow.com/questions/10800063/how-to-instance-a-c-sharp-class-in-unmanaged-memory-possible/13826828#13826828"]ugly[/URL].)
The compilers also usually aren't as optimising when targeting the CLR, so e.g. F# didn't constant-fold floats when I last checked.
I think the main issue is that almost anything running on the CLR is going to use the heap a lot though, whereas in C++/native you can instantiate just about anything on the stack.[/QUOTE]
The thing is, making your code cache local is almost never anything more than packing data into an array (which you can do with value types in C#) and maybe some smart object pooling which you can also do.
Sure, you can't manipulate class instances the same way you can in C++, but IMO the things that should be made local are structs, and those you can.
Alright guys, based on your options I might try it but will keep my game in Unity so if I ever feel the need to switch again I always have the choice to go back to Unity. Thanks!
[QUOTE=Verideth;49576430]Alright guys, based on your options I might try it but will keep my game in Unity so if I ever feel the need to switch again I always have the choice to go back to Unity. Thanks![/QUOTE]
I say this like three times in every thread but my opinions are pretty good so I'll say it again: less experienced programmers can fall into a trap of switching tools when they start worrying about whether they've picked the wrong one for the job.
They'll jump from C# to C++ to Lua to Java and never actually get anything done, ending up with about six half-baked projects in different engines and no solid foundation of experience to build on. Fact is that - for games, at least - 99% of projects are tool-independent.
Obviously you can't make Quake in LÖVE (that's not a challenge, WAYWO) and UE4 is a poor choice for a Pac-Man clone, but switching from Unity to UE4 because you're having trouble with engine limitations just means you'll stutter to a halt when you run into different limitations later on. It's much more valuable to learn how to work within or around limitations than trying to avoid them entirely.
tl;dr: finish what you start and don't change engines mid-project
[QUOTE=Nigey Nige;49576497]Obviously you can't make Quake in LÖVE[/QUOTE]
Is that a challenge?! WAYWO COLLAB 2016!
[QUOTE=miceiken;49576519]Is that a challenge?! WAYWO COLLAB 2016![/QUOTE]
i will FIGHT YOU
[QUOTE=Nigey Nige;49576497]I say this like three times in every thread but my opinions are pretty good so I'll say it again: less experienced programmers can fall into a trap of switching tools when they start worrying about whether they've picked the wrong one for the job.
They'll jump from C# to C++ to Lua to Java and never actually get anything done, ending up with about six half-baked projects in different engines and no solid foundation of experience to build on. Fact is that - for games, at least - 99% of projects are tool-independent.
Obviously you can't make Quake in LÖVE (that's not a challenge, WAYWO) and UE4 is a poor choice for a Pac-Man clone, but switching from Unity to UE4 because you're having trouble with engine limitations just means you'll stutter to a halt when you run into different limitations later on. It's much more valuable to learn how to work within or around limitations than trying to avoid them entirely.
tl;dr: finish what you start and don't change engines mid-project[/QUOTE]
I wholeheartedly agree with this. This is why planning is good, because jumping into something without future considerations can be painful, but what is more painful is trying to show off something you've done and realising you never actually completed much.
I've recently switched my attitude to finishing EVERYTHING I do just to make sure I can say I have experience. On a personal level, it is much more fulfilling.
It was a bit of a pain in the ass to update the settings form whenever I wanted to add something new to it (and having things only shown in debug mode would be even worse) so I made a form layout engine. WinForms has some sort of layout system built in but it is way too basic to be of any real use.
[code]Layout.BeginGroupBox(grpCompression);
Layout.AddControl(lblCompression);
Layout.AddControl(cmbCompression);
Layout.AddControl(lblCompressionWarning);
Layout.EndGroupBox();
Layout.BeginGroupBox(grpDefaults);
Layout.BeginRow();
Layout.AddControl(lblDefaultOffset);
Layout.AddControl(btnDefaultTiming);
Layout.EndRow();
Layout.OffsetY(-7);
Layout.AddControl(lblDefaultInterval);
Layout.BeginRow();
Layout.AddControl(chkDefaultRandomise);
Layout.AddControl(chkGlobalRandomise);
Layout.EndRow();
Layout.BeginRow();
Layout.AddControl(chkDefaultFading);
Layout.AddControl(chkGlobalFading);
Layout.EndRow();
Layout.BeginRow();
Layout.AddControl(lblDefaultWallpaperStyle);
Layout.AddControl(chkGlobalWallpaperStyle);
Layout.EndRow();
Layout.AddControl(cmbDefaultWallpaperStyle);
Layout.EndGroupBox();
Layout.BeginGroupBox(grpHighlight);
Layout.AddControl(lblHighlightMode);
Layout.AddControl(cmbHighlightMode);
Layout.BeginRow();
Layout.AddControl(lblHighlightColour);
Layout.AddControl(picHighlightColour);
Layout.AddControl(btnHighlightColour);
Layout.EndRow();
Layout.EndGroupBox();
Layout.BeginGroupBox(grpPreprocessing);
Layout.BeginRow();
Layout.AddControl(chkGlobalPreprocessing);
Layout.AddControl(btnPreprocessingDefaults);
Layout.EndRow();
Layout.EndGroupBox();
Layout.BeginGroupBox(grpMiscellaneous);
Layout.AddControl(lblColourChanging);
Layout.BeginRow();
Layout.AddControl(chkDefaultColourChanging);
Layout.AddControl(chkGlobalColourChanging);
Layout.EndRow();
Layout.AddControl(chkRainbowMode);
Layout.EndGroupBox();
Layout.ProcessLayout();[/code]
Becomes this:
[t]http://i.imgur.com/mzN2uhE.png[/t]
Still a bit rough and could do with some padding between columns and a way to get the button to sit off to the right at normal button size like I had before but it will do. It's recursive so as long as the stack is big enough you can put group boxes inside columns of group boxes as much as you like.
[QUOTE=helifreak;49577007]
[code]Layout.BeginGroupBox(grpCompression);
Layout.AddControl(lblCompression);
Layout.AddControl(cmbCompression);
Layout.AddControl(lblCompressionWarning);
Layout.EndGroupBox();
Layout.BeginGroupBox(grpDefaults);
Layout.BeginRow();
Layout.AddControl(lblDefaultOffset);
Layout.AddControl(btnDefaultTiming);
Layout.EndRow();
Layout.OffsetY(-7);
Layout.AddControl(lblDefaultInterval);
Layout.BeginRow();
Layout.AddControl(chkDefaultRandomise);
Layout.AddControl(chkGlobalRandomise);
Layout.EndRow();
Layout.BeginRow();
Layout.AddControl(chkDefaultFading);
Layout.AddControl(chkGlobalFading);
Layout.EndRow();
Layout.BeginRow();
Layout.AddControl(lblDefaultWallpaperStyle);
Layout.AddControl(chkGlobalWallpaperStyle);
Layout.EndRow();
Layout.AddControl(cmbDefaultWallpaperStyle);
Layout.EndGroupBox();
Layout.BeginGroupBox(grpHighlight);
Layout.AddControl(lblHighlightMode);
Layout.AddControl(cmbHighlightMode);
Layout.BeginRow();
Layout.AddControl(lblHighlightColour);
Layout.AddControl(picHighlightColour);
Layout.AddControl(btnHighlightColour);
Layout.EndRow();
Layout.EndGroupBox();
Layout.BeginGroupBox(grpPreprocessing);
Layout.BeginRow();
Layout.AddControl(chkGlobalPreprocessing);
Layout.AddControl(btnPreprocessingDefaults);
Layout.EndRow();
Layout.EndGroupBox();
Layout.BeginGroupBox(grpMiscellaneous);
Layout.AddControl(lblColourChanging);
Layout.BeginRow();
Layout.AddControl(chkDefaultColourChanging);
Layout.AddControl(chkGlobalColourChanging);
Layout.EndRow();
Layout.AddControl(chkRainbowMode);
Layout.EndGroupBox();
Layout.ProcessLayout();[/code][/QUOTE]
beginning
I hate code that has both a BeginningElement and an EndElement that you have to call and if you dont it causes all sorts of issues. Like the Unity Begin/End GUI elements. Writing how you currently have it in certain IDEs can cause everything to snap back into proper formatting having all the indenting change back to normal.
What I will usually do is:
[code]
Layout.BeginGroupBox(grpCompression);
{
Layout.AddControl(lblCompression);
Layout.AddControl(cmbCompression);
Layout.AddControl(lblCompressionWarning);
} Layout.EndGroupBox();
[/code]
Just so I can still use the brackets to understand exactly where the groupbox starts and ends. either that or go through the process of writing a wrapper so I could do:
[code]
Using(Layout.BeginGroupBox(grpCompression))
{
Layout.AddControl(lblCompression);
Layout.AddControl(cmbCompression);
Layout.AddControl(lblCompressionWarning);
}
[/code]
Then the auto dispose would call the EndGroupBox. I know it is extra code to be able to visualize it like this but I feel it is totally worth it for readability. The second method is just for C# but I think most languages will accept the first one.
I'm completely rendering the box out of individual pieces now, so I can have dynamic node sizes.
[t]https://my.mixtape.moe/nlxuui.png[/t]
Yesterday I decided to mess around with some voxel marching techniques in unity (Converting voxels into a polygon topology), there are still some issues regarding the "smoothness", but it's somewhere. Currently it's all in c#, I might move the actual threaded generation into a native plugin, and then go from there later.
EDIT: The gif(v) was fucking huge:
[vid]http://i.imgur.com/FJPovDF.webm[/vid]
[QUOTE=TH3_L33T;49577045]I hate code that has both an BeginingElement and an EndElement that you have to call and if you dont it causes all sorts of issues. Like the Unity Begin/End GUI elements. Doing how you do it in certain IDEs can cause when you add in a semi-colon in visual studio it would re-order them to be in the proper formatting which would make them all same distance from the left.
What I will usually do is:
[code]
Layout.BeginGroupBox(grpCompression);
{
Layout.AddControl(lblCompression);
Layout.AddControl(cmbCompression);
Layout.AddControl(lblCompressionWarning);
} Layout.EndGroupBox();
[/code]
Just so I can still use the brackets to understand exactly where the groupbox starts and ends properly. either that or go through the process of writing a wrapper so I could do:
[code]
Using(Layout.BeginGroupBox(grpCompression));
{
Layout.AddControl(lblCompression);
Layout.AddControl(cmbCompression);
Layout.AddControl(lblCompressionWarning);
}
[/code]
Then the auto dispose would call the EndGroupBox. I know it is extra code to be able to get it to visualize like this but I feel it is totally worth it for readability. The second method is just for C# but I think most languages will accept the first one.[/QUOTE]
Never though of (ab)using using, looks nicer and stops Visual Studio from removing the indent. I'll look into adding that.
[editline]22nd January 2016[/editline]
Well that was easier than expected.
If anybody remembers my Youtify project, I've been working on it and turns out I'm shit in designing with the winforms designer, so why not use HTML and some jQuery magic for the GUI?
So this is sorta an hello world:
[IMG]http://i.imgur.com/rZa7wj7.png[/IMG]
[QUOTE=migi0027;49577288]Yesterday I decided to mess around with some voxel marching techniques in unity (Converting voxels into a polygon topology), there are still some issues regarding the "smoothness", but it's somewhere. Currently it's all in c#, I might move the actual threaded generation into a native plugin, and then go from there later.
[/QUOTE]
Are you doing the GPU Gems marching cubes? [URL]https://a248.e.akamai.net/f/248/10/10/http.developer.nvidia.com/GPUGems3/gpugems3_ch01.html[/URL]
[QUOTE=Asgard;49577762]Are you doing the GPU Gems marching cubes? [url]https://a248.e.akamai.net/f/248/10/10/http.developer.nvidia.com/GPUGems3/gpugems3_ch01.html[/url][/QUOTE]
Nah, all the generation is currently CPU sided, might change thought. Currently it's just plain old marching cubes, I'm currently writing support for some surface nets.
[img]http://cld.moe/files/2016-01-21_18-31-09.png[/img]
Having a little PTSD from Tomcat right now.
I don't know what that is but it just looks absolutely disgusting either way.
[QUOTE=Cold;49577915][img]http://cld.moe/files/2016-01-21_18-31-09.png[/img]
Having a little PTSD from Tomcat right now.[/QUOTE]
Oh god, is that the callstack?
[QUOTE=TH3_L33T;49577045]beginning
I hate code that has both a BeginningElement and an EndElement that you have to call and if you dont it causes all sorts of issues. Like the Unity Begin/End GUI elements. Writing how you currently have it in certain IDEs can cause everything to snap back into proper formatting having all the indenting change back to normal.
What I will usually do is:
Just so I can still use the brackets to understand exactly where the groupbox starts and ends. either that or go through the process of writing a wrapper so I could do:
Then the auto dispose would call the EndGroupBox. I know it is extra code to be able to visualize it like this but I feel it is totally worth it for readability. The second method is just for C# but I think most languages will accept the first one.[/QUOTE]
What about
[code]
Layout.WithGroupBox(grpCompression, () =>
{
Layout.AddControl(lblCompression);
Layout.AddControl(cmbCompression);
Layout.AddControl(lblCompressionWarning);
});[/code]
Or even better:
[code]
Layout.WithGroupBox(grpCompression, group =>
{
group.AddControl(lblCompression);
group.AddControl(cmbCompression);
group.AddControl(lblCompressionWarning);
});[/code]
Or what about
[code]
var GBox = Layout.CreateGroupBox(grpCompression);
GBox.AddControl(lblCompression);
GBox.AddControl(cmbCompression);
GBox.AddControl(lblCompressionWarning);
[/code]
What's wrong with just appending controls to another control and they simply layout automatically? Begin* and End* are ugly.
[QUOTE=Darwin226;49577983]What about
[code]
Layout.WithGroupBox(grpCompression, () =>
{
Layout.AddControl(lblCompression);
Layout.AddControl(cmbCompression);
Layout.AddControl(lblCompressionWarning);
});[/code]
Or even better:
[code]
Layout.WithGroupBox(grpCompression, group =>
{
group.AddControl(lblCompression);
group.AddControl(cmbCompression);
group.AddControl(lblCompressionWarning);
});[/code][/QUOTE]
At that point you make an xml/json/whatever parser to populate your menus
[QUOTE=cartman300;49578009]Or what about
[code]
var GBox = Layout.CreateGroupBox(grpCompression);
GBox.AddControl(lblCompression);
GBox.AddControl(cmbCompression);
GBox.AddControl(lblCompressionWarning);
[/code]
What's wrong with just appending controls to another control and they simply layout automatically? Begin* and End* are ugly.[/QUOTE]
I'm assuming that everything that does the explicit begin/end has some need for initialization and finalization.
Life is seriously a LOT easier with Perl, I've come to learn. Recently, I decided that I wanted to check our servers out for Virtual hosts that didn't have an actual domain registered to them. Now, there's a few ways to do this, but I decided to take the most direct route.
However, while these servers do have Perl installed for Virtualmin, I wouldn't want to install different kinds of Perl modules to them. CPAN being available at all seems bad enough to me.
So I decided to write the following two scripts:
[b]nodns.pl[/b]
[code]
#!/usr/bin/perl
use strict;
use warnings;
use Net::DNS;
my @doms = `virtualmin list-domains --name-only`;
my @bad = ();
my $resolver = new Net::DNS::Resolver();
chomp(@doms);
for(@doms) {
my $h = $_;
my $reply = $resolver->search( $_, 'A' );
push @bad, $_ unless $reply;
}
if (!@bad) { exit; }
open FILE, ">/root/nodns.txt";
for(@bad){ print FILE "$_\n"; }
close FILE;
[/code]
[b]checkall.sh[/b]
[code]
#!/bin/sh
perl -c nodns.pl || exit $?
curl -L http://cpanmin.us | perl - Carton
carton install
carton exec fatpack pack nodns.pl > check.pl 2>/dev/null
perl -c check.pl || exit $?
for f in `cat servers.txt`; do
scp -rp check.pl $f:/root/check.pl &
done
wait
rm -f check.pl
polysh --hosts-file=servers.txt << EOF
rm -rf /root/nodns.txt
perl /root/check.pl
rm /root/check.pl
EOF
mkdir -p hosts
for f in `cat servers.txt`; do
scp -rp $f:/root/nodns.txt hosts/${f}.txt 2>/dev/null &
done
wait
[/code]
And just like that, it packs up the script as a payload, fires it up on the server with all dependencies included, and returns a list of hosts that do not have DNS A records set to them, which I can then map to a database and automate so it spews into our systems. God dang Perl is so useful, and so easy to make great shit with, and it's actually surprisingly fast. Much faster than Ruby, and noticably faster than Python. It's amazing.
[QUOTE=Darwin226;49578077]I'm assuming that everything that does the explicit begin/end has some need for initialization and finalization.[/QUOTE]
You initialize a control by creating the control object, and you finalize it by adding the said control to something else. Each time a child control is added, you can recalculate the automatic layout. First recalculate the child control and then the container itself. And what's even better is, you can re-layout everything going from current control to the top most layer of the control tree when you decide to append a child somewhere in the middle.
Messin around with some turbulence, the normals are fucked up:
[IMG]http://i.imgur.com/UFfpHA0.png[/IMG]
[QUOTE=Tamschi;49574732]Will you delete them, move them to a separate public cheater leaderboard, or hide their scores for everyone else?
Personally I think option 2 is the most interesting and transparent, but that's mostly my personal opinion on matters like these.[/QUOTE]
They got deleted forever to the "deletedUsers" graveyard.
[QUOTE=migi0027;49577288]Yesterday I decided to mess around with some voxel marching techniques in unity (Converting voxels into a polygon topology), there are still some issues regarding the "smoothness", but it's somewhere. Currently it's all in c#, I might move the actual threaded generation into a native plugin, and then go from there later.
-MOAG-[/QUOTE]
Could you link to the next 40 MB gif you post, instead of including it in the post?
[QUOTE=roastchicken;49578779]Could you link to the next 40 MB gif you post, instead of including it in the post?[/QUOTE]
Or, you know, just upload a fucking video
[QUOTE=roastchicken;49578779]Could you link to the next 40 MB gif you post, instead of including it in the post?[/QUOTE]
[QUOTE=DrDevil;49578827]Or, you know, just upload a fucking video[/QUOTE]
It is imgur even, all one has to do is use vid tags and the [URL="http://i.imgur.com/FJPovDF.gifv"]extension gifv[/URL] and it will play the webm version instead.
[QUOTE=roastchicken;49578779]Could you link to the next 40 MB gif you post, instead of including it in the post?[/QUOTE]
This please, it seriously chews through mobile data when I wanna check this thread on my phone.
Sorry, you need to Log In to post a reply to this thread.