[QUOTE=Map in a box;33961121]YogUI has nothing on mine
[editline]30th December 2011[/editline]
Funny because thats my buttons color(or near it)[/QUOTE]
You talkin' trash about me bitch?
Imma mess you up
[QUOTE=Map in a box;33961121]Funny because thats my buttons color(or near it)[/QUOTE]
Damn. How about something in a dark purple?
[IMG]http://i.imgur.com/lfPvo.png[/IMG]
[QUOTE=Jookia;33961138]I've been programming since late '09 and I haven't got anything to show for it. A career change, I'm thinking.[/QUOTE]
too busy hacking up unions
Must resist urge to rate zing.
Anyway, I've been persuaded to use git as my now primary revision control software. I made my first git repo. [url]https://github.com/andrewmcwatters/lopensteamworks[/url] Pretty cool stuff!
[QUOTE=amcfaggot;33961007]I really hope you're going to consider changing the standard window composition frame into something more theme-oriented towards your application. As much as I absolutely cannot stand people breaking continuity in Windows, you do present a very nice design, and I wouldn't want it to be held back by that glass frame.[/QUOTE]
On this note: if you want to remove the border entirely (like -noborder does for Source), I know how to do it (It's a combination of styles in your WNDCLASS) - If you're using traditional Windows windows.
Not sure how to do it on cross-platform however.
[QUOTE=amcfaggot;33961061]#88c745 seems to be a trendy tone. RGB: (136, 199, 69)
[IMG]http://i.imgur.com/fkblc.png[/IMG][/QUOTE]
Any color looks trendy when you put that pattern on top of it and give it a gradient
[editline]a[/editline]
[img]http://dl.dropbox.com/u/32605179/Trendy.png[/img]
[QUOTE=PortalGod;33961733]Any color looks trendy when you put that pattern on top of it and give it a gradient[/QUOTE]
You're right! Colors are pretty great
[QUOTE=PortalGod;33961733][img]http://dl.dropbox.com/u/32605179/Trendy.png[/img][/QUOTE]
Awesome! I shall use that color as the background in all my games.
Jesus dick text scaling suck in love
[img]http://dl.dropbox.com/u/45554193/images/iryeesfcvfb.png[/img]
Revamping the UI. :eng101:
[IMG]http://dl.dropbox.com/u/27714141/CleverOmegle_revamp.png[/IMG]
I love it when Cleverbot makes people swear in other languages. (Especially Indonesian, which was the funniest so far)
[editline]30th December 2011[/editline]
[IMG]http://dl.dropbox.com/u/27714141/cleverOmegle_spanish.png[/IMG]
Oh god my lungs
[QUOTE=ZenX2;33962577]Jesus dick text scaling suck in love
[img]http://dl.dropbox.com/u/45554193/images/iryeesfcvfb.png[/img][/QUOTE]
You have to reload the font in a bigger size to make it look proper.
[QUOTE=thelinx;33948963][img]http://i.imgur.com/KT5jf.png[/img]
I'm taking that dumb rating as "you just don't know the way to do it", so I ask you, danharibo, how [i]do you[/i] make resolution and screen DPI independent UI?[/QUOTE]
This particular sentence;
[quote]At runtime, the system transparently handles any scaling of the dp units, as necessary, based on the actual density of the screen in use[/quote]
i.e. something that is 160 dips wide, will be the width of the whole screen on ANY screen.
[quote]For example, on a 240 dpi screen, 1 dp equals 1.5 physical pixels[/quote]
Wrote these to make reflection in .NET less annoying.
[csharp]
static class Util
{
public static object InvokeMethod(this object obj, string name, params object[] args)
{
return obj.GetType().InvokeMember(name, BindingFlags.InvokeMethod, null, obj, args);
}
public static object GetProperty(this object obj, string name, params object[] args)
{
return obj.GetType().InvokeMember(name, BindingFlags.GetProperty, null, obj, args);
}
public static object SetProperty(this object obj, string name, params object[] args)
{
return obj.GetType().InvokeMember(name, BindingFlags.SetProperty, null, obj, args);
}
}
[/csharp]
It made my copy function considerably shorter:
[csharp] private void copyToolStripButton_Click(object sender, EventArgs e)
{
object document = conversationBox.Document.DomDocument;
object iselection = document.GetProperty("selection");
object range = iselection.InvokeMethod("createRange");
object otext = range.GetProperty("text");
string text = (otext != null ? otext as string : string.Empty);
if (otext == string.Empty)
{
foreach (HtmlElement el in conversationBox.Document.Body.Children)
{
text += el.InnerText + "\n";
}
}
Clipboard.SetText(text);
}[/csharp]
wow i [b]love[/b] wxwidgets!
I downloaded and attempted to compile it and the bitch wouldn't work, compile errors right from the start (this was probably my fault somehow, though). I delete the files and redownload the source, this time I am able to configure and make without issues. I build one of the samples, and try it out.
[img]http://dl.dropbox.com/u/6929441/screenshots/wx_suck01.png[/img]
one of about four unique and repeatable assertion failures
[img]http://dl.dropbox.com/u/6929441/screenshots/wx_suck02.png[/img]
they decided not to use an assertion here, but it failed anyway.
[editline]30th December 2011[/editline]
[img]http://dl.dropbox.com/u/6929441/screenshots/wx_suck03.png[/img]
it's okat we're not al perfct
[QUOTE=mechanarchy;33963089]wow i [b]love[/b] wxwidgets!
I downloaded and attempted to compile it and the bitch wouldn't work, compile errors right from the start (this was probably my fault somehow, though). I delete the files and redownload the source, this time I am able to configure and make without issues. I build one of the samples, and try it out.
[img]http://dl.dropbox.com/u/6929441/screenshots/wx_suck01.png[/img]
one of about four unique and repeatable assertion failures
[img]http://dl.dropbox.com/u/6929441/screenshots/wx_suck02.png[/img]
they decided not to use an assertion here, but it failed anyway.
[editline]30th December 2011[/editline]
[img]http://dl.dropbox.com/u/6929441/screenshots/wx_suck03.png[/img]
it's okat we're not al perfct[/QUOTE]
I love it when you get compile errors all over the place when attempting to compile some open-source library, and they provide no binary blobs, or info on how to actually compile the peice of shit properly
Then it turns out you needed some ancient GCC version or something for it to actually compile
Every, fucking, time
[editline]30th December 2011[/editline]
On another note, the HL1 source is surely interesting
They managed to missuse private in every possible way, I basicly had to replace every "private:" with nothing to stop the errors from flooding :v:
[QUOTE=Tobba;33963942]I love it when you get compile errors all over the place when attempting to compile some open-source library[/QUOTE]
v8.h when compiling with -pedantic -Wall -Wshadow -Wpointer-arith -Wcast-qual -Wextra -Werror -Wno-unused-parameter -Wno-unused-function
Also, does anyone know how to get Visual Studio 2010 to stop erroring on this:
SetTouch(Stuff);
Not being:
SetTouch(&Stuff);
Because I am NOT going to manually replace that all over the code
Alternativly a regular expression would work too :v:
[editline]30th December 2011[/editline]
Dammit, there goes my automerge
[QUOTE=Tobba;33964112]Also, does anyone know how to get Visual Studio 2010 to stop erroring on this:
SetTouch(Stuff);
Not being:
SetTouch(&Stuff);
Because I am NOT going to manually replace that all over the code
Alternativly a regular expression would work too :v:
[editline]30th December 2011[/editline]
Dammit, there goes my automerge[/QUOTE]
Those two aren't equivalent afaik.
[QUOTE=danharibo;33964142]Those two aren't equivalent afaik.[/QUOTE]
With the compiler VALVe used when they made HL1, it was
It also completely ignored private/treated it as protected
[QUOTE=supersnail11;33961005][url]http://blogcake.x10.mx/img/react/FACEPALM/[/url][/QUOTE]
You should tell him to add a disclaimer that he knows nothing about the subject and everything he says is just his uneducated opinion.
[QUOTE=swift and shift;33964003]v8.h when compiling with -pedantic -Wall -Wshadow -Wpointer-arith -Wcast-qual -Wextra -Werror -Wno-unused-parameter -Wno-unused-function[/QUOTE]
Why do you use -pedantic without specifying a std version?
[QUOTE=ace13;33964267]Why do you use -pedantic without specifying a std version?[/QUOTE]
I'm happy with the default. It still errors when using -std=c++98 anyhow
[IMG]http://dev.flyingpie.nl/steamdroid-notifications.png[/IMG]
Notifications, sounds and vibrations.
[url=http://anyhub.net/file/1Zw9-release.7z][img]http://anyhub.net/file/47Ky-dl2.png[/img][/url]
You can now place more types of objects, fix the light direction and I fixed the intersecting mirrors bug.
I require optimistic ratings.
[QUOTE=Ziks;33964807][url=http://anyhub.net/file/1Zw9-release.7z][img]http://anyhub.net/file/47Ky-dl2.png[/img][/url]
You can now place more types of objects, fix the light direction and I fixed the intersecting mirrors bug.
I require optimistic ratings.[/QUOTE]
So how exactly are you calculating the reflections?
Do you loop through all the endpoints and see if the light goes through or what?
[editline]30th December 2011[/editline]
I mean, not the reflections, the actual checking if light needs to reflect.
And do you create a new ray every time the light bounces?
[QUOTE=Darwin226;33964966]So how exactly are you calculating the reflections?
Do you loop through all the endpoints and see if the light goes through or what?[/QUOTE]
A ray consists of an origin, left and right direction vectors that describe the direction of each edge of the ray, and a couple of doubles for each side describing how far along each side the ray travels or starts from.
I find the points where each side of a ray intersects the mirror with a standard line-line intersection method with the direction vectors, then I create a new ray with the origin and left and right direction vectors reflected relative to the mirror.
This function returns the reflected ray, when it is given the ray which has hit the mirror:
[csharp]public override LightRay[] Interact( LightRay ray )
{
Vector2d i = Line.Direction;
Vector2d j = i.PerpendicularLeft;
Vector2d newOrigin = ( ray.Origin - Line.Start ).ChangeBasis( i, j );
Vector2d newLeftField = ray.FieldRight.ChangeBasis( i, j );
Vector2d newRightField = ray.FieldLeft.ChangeBasis( i, j );
newOrigin.Y = -newOrigin.Y;
newLeftField.Y = -newLeftField.Y;
newRightField.Y = -newRightField.Y;
return new LightRay[]
{
new LightRay( newOrigin.RevertBasis( i, j ) + Line.Start,
newLeftField.RevertBasis( i, j ),
newRightField.RevertBasis( i, j ),
ray.ProjRight, ray.ProjLeft,
LightRay.DefaultRange, LightRay.DefaultRange,
ray, ray.Colour & Filter, this )
};
}[/csharp]
Basically it defines a new vector space where the mirror is flat along the x axis going from (0,0) onwards, with the input ray transformed appropriately. Then the y components of the various vectors describing the ray are flipped, which is essentially mirroring it relative to the x axis. Then the ray is transformed back into standard unit vector space.
[editline]30th December 2011[/editline]
There's probably a more mathematically efficient way of reflecting it, but I like this method because it is easy to visualise.
Finally back home :) now that I'm on a decent computer, I thought I'd record a GIF to show off the fact that I now have something to record a GIF of:
[IMG]http://i.imgur.com/R9wcw.gif[/IMG]
You can reset or start/stop time with the menus or hotkeys - it works for animating implicit relations too, although the performance is a little choppy.
I think I'll start working on the settings dialog now, this is gonna be fun :/
[editline]30th December 2011[/editline]
While I'm posting:
[img]http://i.imgur.com/AazY6.png[/img]
Using Newton's method to find intersections of two functions.
This animates too! :D
[QUOTE=Ziks;33965049]A ray consists of an origin, left and right direction vectors that describe the direction of each edge of the ray, and a couple of doubles for each side describing how far along each side the ray travels or starts from.
I find the points where each side of a ray intersects the mirror with a standard line-line intersection method with the direction vectors, then I create a new ray with the origin and left and right direction vectors reflected relative to the mirror.
This function returns the reflected ray, when it is given the ray which has hit the mirror:
[csharp]public override LightRay[] Interact( LightRay ray )
{
Vector2d i = Line.Direction;
Vector2d j = i.PerpendicularLeft;
Vector2d newOrigin = ( ray.Origin - Line.Start ).ChangeBasis( i, j );
Vector2d newLeftField = ray.FieldRight.ChangeBasis( i, j );
Vector2d newRightField = ray.FieldLeft.ChangeBasis( i, j );
newOrigin.Y = -newOrigin.Y;
newLeftField.Y = -newLeftField.Y;
newRightField.Y = -newRightField.Y;
return new LightRay[]
{
new LightRay( newOrigin.RevertBasis( i, j ) + Line.Start,
newLeftField.RevertBasis( i, j ),
newRightField.RevertBasis( i, j ),
ray.ProjRight, ray.ProjLeft,
LightRay.DefaultRange, LightRay.DefaultRange,
ray, ray.Colour & Filter, this )
};
}[/csharp]
Basically it defines a new vector space where the mirror is flat along the x axis going from (0,0) onwards, with the input ray transformed appropriately. Then the y components of the various vectors describing the ray are flipped, which is essentially mirroring it relative to the x axis. Then the ray is transformed back into standard unit vector space.
[editline]30th December 2011[/editline]
There's probably a more mathematically efficient way of reflecting it, but I like this method because it is easy to visualise.[/QUOTE]
Hmmm, that's kind of what I was thinking.
I wander how you could optimize that...
Got my tablet in just now, it browses facepunch pretty well.
Now I get to port my UI to android! Your move, yogurt.
[QUOTE=Darwin226;33965447]Hmmm, that's kind of what I was thinking.
I wander how you could optimize that...[/QUOTE]
Well for one thing I can just do this:
[csharp]public override LightRay[] Interact( LightRay ray )
{
Vector2d i = Line.Direction;
Vector2d j = i.PerpendicularLeft;
Vector2d newOrigin = ( ray.Origin - Line.Start ).ChangeBasis( i, j );
Vector2d newLeftField = ray.FieldRight.ChangeBasis( i, j );
Vector2d newRightField = ray.FieldLeft.ChangeBasis( i, j );
return new LightRay[]
{
new LightRay( newOrigin.RevertBasis( i, -j ) + Line.Start,
newLeftField.RevertBasis( i, -j ),
newRightField.RevertBasis( i, -j ),
ray.ProjRight, ray.ProjLeft,
LightRay.DefaultRange, LightRay.DefaultRange,
ray, ray.Colour & Filter, this )
};
}[/csharp]
Although that's only slightly better. I'll probably just write out the ChangeBasis and RevertBasis methods out in their long form and look for any redundant things.
Sorry, you need to Log In to post a reply to this thread.