Heh, my father walked in while I was running a ./configure script and yelled at me.. he thought I was hacking.
[img]http://dl.dropbox.com/u/516743/zig.png[/img]
Wrote up some code to convert a series of points:
[code]0 0 10 30
0 0 10 -30
0 0 20 0
20 0 30 30
20 0 30 -30
10 30 30 30
10 -30 30 -30
30 30 60 30
30 -30 60 -30
60 30 90 20
60 -30 90 -20
90 20 100 0
90 -20 100 0
-20 0 0 45
-20 0 0 -45
0 45 10 30
0 -45 10 -30
0 45 0 60
0 -45 0 -60
0 60 30 30
0 -60 30 -30
0 60 90 45
0 -60 90 -45
90 45 60 30
90 -45 60 -30
90 45 120 30
90 -45 120 -30
120 30 120 -30
120 30 90 20
120 -30 90 -20
0 0 -100 0
-100 0 -90 10
-90 10 -110 20
-110 20 -100 30
-100 30 -100 50
-100 50 -110 60
-110 60 -90 70
-90 10 -40 10
-90 70 -40 70
-40 10 -30 30
-40 70 -30 50
-30 30 -30 50
0 45 -30 45
-30 50 0 60
-20 0 -40 10
-100 0 -90 -10
-90 -10 -110 -20
-110 -20 -100 -30
-100 -30 -100 -50
-100 -50 -110 -60
-110 -60 -90 -70
-90 -10 -40 -10
-90 -70 -40 -70
-40 -10 -30 -30
-40 -70 -30 -50
-30 -30 -30 -50
0 -45 -30 -45
-30 -50 0 -60
-20 0 -40 -10
[/code]
Into a vector image, that I can scale and rotate as I wish.
First time I've really done anything in java, I'm pretty proud of myself :D
EDIT: Can I just add I did all those coordinates by hand and it took more time than the code did :v:
Next project is to make a tool where I can click and drag and create a wireframe like this and it'll generate the text file.
Oh my, I just made the greatest discovery of my project.
[code]std::vector<Wulf::StaticSprites::Sprite>::const_iterator itr = sprites.begin();[/code]
can be expressed as
[code]auto itr = sprites.begin();[/code]
My fingers bleed with joy.
[img]http://i.imgur.com/7Qm7e.jpg[/img]
Well, time to take a break from Hollygram for a while.
[QUOTE=Lexic;33699824]Oh my, I just made the greatest discovery of my project.
[code]std::vector<Wulf::StaticSprites::Sprite>::const_iterator itr = sprites.begin();[/code]
can be expressed as
[code]auto itr = sprites.begin();[/code]
My fingers bleed with joy.[/QUOTE]
Welcome to C++11. I can't use it for my course work. Weep for me.
ObjectInputStream and ObjectOutputStream in Java make things [I]so[/I] easy :v:
I was able to add level saving and loading in under 15 minutes.
[img]http://i.imgur.com/U6AJY.png[/img]
[QUOTE=ROBO_DONUT;33699438]It's a collision detection problem.
You take two screen-space points at a=<x, y, 1, 1> and b=<x, y, 0, 1> and turn them into world-space points by multiplying them by the inverse projection/view matrix. The world-space picker ray is found from the world space coordinates, a' and b', beginning at b' and pointing in direction a'-b'.
And then you do collision detection between this ray and the collision hulls for each object (well, preferably not [i]each[/i], hopefully you have some means of culling) in your scene and find the closest point of intersection.[/QUOTE]
So you basically do the opposite of what happens to vertices to your mouse point with the inverse projection matrix and then test collision with the shapes.
The thing is, shapes have their own transformation matrices that also change where they are and how they look, so how can I test for collision if the shape is not yet set?
It's a 2D game btw. I have a feeling that might change a lot.
Anyone checked out my awesome UI library for XNA yet?
[QUOTE=Yogurt;33700395]Anyone checked out my awesome UI library for XNA yet?[/QUOTE]
Downloaded it, I'm gonna check it out in the morning.
*Must resist urge to check source*
[QUOTE=Noth;33700456]Downloaded it, I'm gonna check it out in the morning.
*Must resist urge to check source*[/QUOTE]
It's not BAD code, per se...just messy.
[editline]13th December 2011[/editline]
Although the point of putting it on github was so that people could contribute, so please do look at the source.
[QUOTE=Yogurt;33695594]I'll release my UI engine if you guys promise not to look at the source :v:[/QUOTE]
[QUOTE=Yogurt;33700513]Although the point of putting it on github was so that people could contribute, so please do look at the source.[/QUOTE]
Conflicted!
Sorry for the lack of progress in the last couple days guys, haven't been too well so not much chance for coding :( Brought a laptop upstairs though, so hopefully some progress now :) I think it should be able to graph that batman equation now, I'll give it a go.
[QUOTE=r0b0tsquid;33700623]Sorry for the lack of progress in the last couple days guys, haven't been too well so not much chance for coding :( Brought a laptop upstairs though, so hopefully some progress now :) I think it should be able to graph that batman equation now, I'll give it a go.[/QUOTE]
I wrote a tokenizer once for Dairyular grapher, but it was terrible. I am really interested in how you did this.
[QUOTE=Noth;33700598]Conflicted![/QUOTE]
Notice the :v:
:v:
[QUOTE=Yogurt;33700645]I wrote a tokenizer once for Dairyular grapher, but it was terrible. I am really interested in how you did this.[/QUOTE]
If you guys like, I could upload the program and the source? It's a little messy, but it shouldn't be [i]too[/i] hard to follow :v: or I could just explain it sometime, some guy already PMed me about it and I sent a looong explanation in reply, but there doesn't seem to be any way to read your own replies to PMs?
[QUOTE=Lexic;33699824]Oh my, I just made the greatest discovery of my project.
[code]std::vector<Wulf::StaticSprites::Sprite>::const_iterator itr = sprites.begin();[/code]
can be expressed as
[code]auto itr = sprites.begin();[/code]
My fingers bleed with joy.[/QUOTE]
I'd just use a typedef.
[cpp]
typedef std::vector<YOURTYPEHERE const*> Collection;
// later
Collection collection;
// later
Collection::const_iterator it = collection.begin();
[/cpp]
[del]I have an illogical aversion to things like "auto" or "var" in C#... I've never used them but I think it probably stems from my hatred of all things PHP, and how PHP will let you just reassign types willy-nilly. I much prefer strongly-typed languages.[/del]
I'm using visual studio to do some C++ work with ogre, when I was just working with C#. Am I missing something, or has some madman attacked the intellisense with a hatchet, lopping off multiple limbs?
Finished the SmartFilter Shader (for OpenGL only yet):
[url=http://i.imgur.com/ZqCoS.png][img]http://i.imgur.com/ZqCoSs.png[/img](click to enhance)[/url] [url=http://i.imgur.com/q5csp.png](bilinear only Version)[/url]
[b]Download[/b]
Complete Pack: [url]http://levelnull.de/files/SmartFilterComplete.zip[/url]
Shader & Preprocessor: [url]http://levelnull.de/files/SmartFilterEssential.zip[/url]
RenderMonkey Playground: [url]http://levelnull.de/files/SmartFilterRenderMonkey.zip[/url]
[b]Known Issues[/b]
-Some artifacts (my math skills aren't great enough to fix those)
-Requires twice the amount of texture memory.
I've included a usage.txt for the shader, have fun using it! If you have a fix for the issues, let me know and I'll change it in the uploaded files aswell.
Older Post: [url]http://www.facepunch.com/threads/1144771/34#post33698259[/url]
[QUOTE=Yogurt;33700395]Anyone checked out my awesome UI library for XNA yet?[/QUOTE]
I did, messed around with it a bit. Quite like it so far. Is it possible to turn it into a .dll, so I can use it in my games or whatever?
[QUOTE=mechanarchy;33700723]I much prefer strongly-typed languages.[/QUOTE]
It's still strongly typed.
[QUOTE=Naarkie;33700804]I did, messed around with it a bit. Quite like it so far. Is it possible to turn it into a .dll, so I can use it in my games or whatever?[/QUOTE]
You can just take the code. Here's what you'll need to do:
-Put the Managers, Structs and UIComponents folders into your own project
-Initialize a public static InputManager in your main game code; calls its update function in the Update loop.
-Put CircleShader.fx and Console.spritefont into your "Content" folder in the solution.
-Place this in your LoadContent method:
[csharp]
//Create a 1x1 white texture to be used for drawing boxes/circles/etc.
Texture2D white = new Texture2D(GraphicsDevice, 1, 1);
white.SetData<Color>(new Color[] { Color.White });
AssetManager.Textures.Add("white", white);
AssetManager.LoadAsset<Effect>("CircleShader", "CircleShader", Content, GraphicsDevice);
AssetManager.LoadAsset<SpriteFont>("Console", "Console", Content, GraphicsDevice);
[/csharp]
-Put this in your unloadcontent method:
[csharp]
AssetManager.Effects.Clear();
AssetManager.Fonts.Clear();
AssetManager.Textures.Clear();
[/csharp]
A few notes:
-AssetManager can be used to load Effects, Spritefonts and Textures into a static dictionary that can be accessed anywhere. Textures can be loaded from files.
Simply call:
[csharp]AssetManager.LoadAsset<Texture2D>(string key, string pathToAsset, ContentManager content, GraphicsDevice graphics);
[/csharp]
To retrieve an asset:
[csharp]AssetManager.GetTexture(string key);[/csharp]
Change "GetTexture" to "GetFont" etc.
-DrawManager can be used to draw circles, boxes, bezier curves(experiment), lines, and outlines and stuff.
So today I learned that Mono is actually on version like 2.12. Version 2.10 which is the one they have on their site is months behind 2.12. And some bugs like HashAlgorithm.Dispose missing (fixed in 2.12 back in May) are not going to be in any of the 2.10 or 2.11 releases.
[url]https://bugzilla.novell.com/show_bug.cgi?id=691115[/url]
I suddenly don't like mono as much anymore :(.
[QUOTE=Dragonsdoom;33700745]I'm using visual studio to do some C++ work with ogre, when I was just working with C#. Am I missing something, or has some madman attacked the intellisense with a hatchet, lopping off multiple limbs?[/QUOTE]
The 2010 intellisense is crap. It basically requires that you use visualassistx(C++)/resharper(C#). I heard it wont be such crap in 2011 though.
[QUOTE=mechanarchy;33700723]I'd just use a typedef.
[cpp]
typedef std::vector<YOURTYPEHERE const*> Collection;
// later
Collection collection;
// later
Collection::const_iterator it = collection.begin();
[/cpp]
I have an illogical aversion to things like "auto" or "var" in C#... I've never used them but I think it probably stems from my hatred of all things PHP, and how PHP will let you just reassign types willy-nilly. I much prefer strongly-typed languages.[/QUOTE]
A typedef for a type that is literally used 3 times seems a bit pointless. I'd rather type out the full qualifier and keep the explicit definition.
In any case, auto in C++0x means "Give this variable the type of the return value of the function call which initializes it", not "create a loosely typed variable". All the normal rules apply, it just saves a lot of time/potential confusion for large templates.
I can change the template for sprites as much as I want addding custom allocators etc, and
[cpp]auto itr = sprites.begin();
auto end = sprites.end();
for (; itr < end; ++itr) {
auto& spr = *itr;[/cpp]
will continue to work no matter what.
That's [b]awesome[/b].
I've uploaded the grapher and the source, if anyone wants to have a fiddle with/look at it - [url=http://filesmelt.com/dl/grapher.rar]download here.[/url] Be warned, you'll probably need VB6 to open the project, although if not you should just be able to pop the form open in a text editor. Have fun, don't look too closely at the code :v: off to bed again now, still feel terrible :(
[QUOTE=high;33701134]So today I learned that Mono is actually on version like 2.12. Version 2.10 which is the one they have on their site is months behind 2.12. And some bugs like HashAlgorithm.Dispose missing (fixed in 2.12 back in May) are not going to be in any of the 2.10 or 2.11 releases.[/QUOTE]
I find many things on the mono website to be outdated.
Example: [url]http://www.mono-project.com/Tao[/url]
That has 1.2.0 (2 Nov 2005)
Newest is 2.1.0 2008-05-02
[editline]13th December 2011[/editline]
[QUOTE=high;33701134]The 2010 intellisense is crap. It basically requires that you use visualassistx(C++)/resharper(C#). I heard it wont be such crap in 2011 though.[/QUOTE]
I'm currently using Visual Studio 2011 Dev Preview with Visual Assist X. I can't work without either now.
I'll agree on the Visual Assist X bit, didn't bother checking out VS 2011 yet; although I'm sure I will once I get this project over with.
Also, I swear I'm going to spill innocent blood if I ever have to run autoreconf again. Fucking GNU toolchain is so full of shit.
[QUOTE=r0b0tsquid;33700775][img]http://www4a.wolframalpha.com/Calculate/MSP/MSP69519ia867c2d35ahc400003109c0eahi9ebad8?MSPStoreType=image/gif&s=23&w=486&h=240[/img]
[img]http://i.imgur.com/N5FCV.png[/img]
Holy graphing calculator, Batman! :v:[/QUOTE]
You should increase the precision of the grapher. It'll make it much more awesome.
[QUOTE=DeadKiller987;33701527]I find many things on the mono website to be outdated.
Example: [url]http://www.mono-project.com/Tao[/url]
That has 1.2.0 (2 Nov 2005)
Newest is 2.1.0 2008-05-02
[editline]13th December 2011[/editline]
I'm currently using Visual Studio 2011 Dev Preview with Visual Assist X. I can't work without either now.[/QUOTE]
Its not even that the site download is out dated. Its that their release version is extremely far behind the source version. You know something is fucked when high priority fixes (at least I think missing methods which prevent you from using a class are high priority) are not going to be in a release version for months-years.
Got my console working nicely so far:
[img]http://i51.tinypic.com/tapoj9.png[/img]
And suddenly, I'm feeling evil as hell and got a plan for a potential exploit in my schools public WiFi, oh lord
Sorry, you need to Log In to post a reply to this thread.