[QUOTE=Doritos_Man;27990397]I can always install it later if I need it[/QUOTE]
[url]http://create.msdn.com/en-US/education/catalog/?contenttype=0&devarea=0&platform=20&sort=1[/url]
This should get you started with Developing XNA stuff for Windows
[QUOTE=CarlBooth;27990480][url]http://create.msdn.com/en-US/education/catalog/?contenttype=0&devarea=0&platform=20&sort=1[/url]
This should get you started with Developing XNA stuff for Windows[/QUOTE]
Do you have Steam or something
[QUOTE=Richy19;27990035]Is libFox x11 only?
I tried compiling it but it kept giving errors about x11[/QUOTE]
On Unix-like platforms it depends on X11, though apparently it is abstracted enough if you wanna port it to different windowing systems (considering it also works on Windows).
It's a shame that nowhere on the website it lists the dependencies.
[QUOTE=HiredK;27990272]Hum you can't use Qt if your not at least posting the source code with your project.[/QUOTE]
Stop posting misinformation.
Question about the game of life:
How do the pixels MOVE? Or is every non-alive pixel considered "Dead" at the start of the simulation?
What do you mean move? I'm pretty sure that they don't change coordinates. The way I'd do it is to have an array of pixels and choose which ones are alive and which ones are dead each step (using the GoL rules), then set the array accordingly (e.g. turn dead ones off and live ones on).
(Please don't tear me apart if that's not at all what you are talking about).
[QUOTE=MrBob1337;27991369]What do you mean move? I'm pretty sure that they don't change coordinates. The way I'd do it is to have an array of pixels and choose which ones are alive and which ones are dead each step (using the GoL rules), then set the array accordingly (e.g. turn dead ones off and live ones on).
(Please don't tear me apart if that's not at all what you are talking about).[/QUOTE]
I see now, thanks.
[QUOTE=geel9;27991317]Question about the game of life:
How do the pixels MOVE? Or is every non-alive pixel considered "Dead" at the start of the simulation?[/QUOTE]
What? The cells never change position.
Edit: Must refresh more.
[QUOTE=Metroid48;27979124]Overall it looks really good! Does it allow more than 3 inputs?
If you want to clean up the gui a bit, I'd suggest generally making things take up less space. In particular, the T/F status and the table take up a lot more space than necessary. The input statuses could be changed to simple buttons, similar to the I/O row above. You could also make truth table generation and simplification automatic, which would both make it more intuitive (data displayed is always relevant) and remove the respective buttons.
Are you planning on releasing it?
[editline]10th February 2011[/editline]
Boolean algebra is a method of dealing with logical inputs, that is, everything is 1 or 0. For example, in C++:
[cpp](A && B) || (!A && C)[/cpp]
is equivalent to (in boolean algebra):
[code]A . B + !A . C[/code]
It results in some weird rules, like x + (y . z) = (x + y) . (x + z) and x + 1 = 1, but it's not too bad. It also allows for major simplification [url=http://en.wikipedia.org/wiki/Kmap]using k-maps[/url].[/QUOTE]
Thanks for the feedback I was thinking the buttons were a bit large. I went through a phase in the design where I had the idea that the bigger the form window the more impressive my program looked. Which hasn't turned out too well.
Good call on the automatic truth table generation/simplification. Some kind of delay would be needed I think though because the simplifier can take a while if it has to deal with a lot of Karnaugh Groups.
It currently only supports 3 inputs but it shouldn't be too hard to add another one. Getting the karnaugh groups to grow toroidally in both directions doesn't sound fun though.
I will probably release it after I've handed it in for marking, not sure what the exam boards policy on that is.
So for some reason Windows is incapable for sleeping for less than 15ms at a time. I only need to do an 8ms sleep for stuff I have to do at work. We make 3D simulations (as in stereoscopic coming out of the screen 3D), so we have to display at 120fps, and I have a thread that needs to do something once per frame which is once per 8.33ms.
Since the project is in C++ and uses boost::thread, I was using boost::this_thread::sleep() and for any number less than 15ms, it wakes up in 15ms.
I used the same code on my Windows XP desktop at work, my result was 15ms. My Linux server at work which runs CentOS 5.5 (x86) gets 2ms. My Gentoo desktop at home gets 0.1ms using boost and 0.01ms using the system sleep(). I didn't have time to test sleep() as well at work, but it might solve my issue (unlikely). We have one Windows 7 machine at work that I didn't have time to test either, so I can only say my results apply to XP, but XP is still our main target OS because our customers use that.
Here is the code I used to find the minimum sleep time:
[cpp]
#include <iostream>
#include <boost/date_time.hpp>
#include <boost/thread.hpp>
using namespace boost;
int main()
{
xtime xt;
xtime_get(&xt, boost::TIME_UTC);
xt.nsec += 1;
posix_time::ptime start = posix_time::microsec_clock::local_time();
//use either of these sleep functions
//this_thread::sleep(xt);
sleep(0.000001);
posix_time::ptime end = posix_time::microsec_clock::local_time();
posix_time::time_duration td = end - start;
std::cout << "dif: " << posix_time::to_simple_string(td) << "\n";
}
[/cpp]
I'd be curious to see if anyone else here can get better than 15ms.
And I don't know how my Gentoo machine does so well compared to CentOS. Either the newer kernel really helps or I mistakenly built a real time kernel?
[QUOTE=PvtCupcakes;27993056]So for some reason Windows is incapable for sleeping for less than 15ms at a time. I only need to do an 8ms sleep for stuff I have to do at work. We make 3D simulations (as in stereoscopic coming out of the screen 3D), so we have to display at 120fps, and I have a thread that needs to do something once per frame which is once per 8.33ms.
Since the project is in C++ and uses boost::thread, I was using boost::this_thread::sleep() and for any number less than 15ms, it wakes up in 15ms.
I used the same code on my Windows XP desktop at work, my result was 15ms. My Linux server at work which runs CentOS 5.5 (x86) gets 2ms. My Gentoo desktop at home gets 0.1ms using boost and 0.01ms using the system sleep(). I didn't have time to test sleep() as well at work, but it might solve my issue (unlikely). We have one Windows 7 machine at work that I didn't have time to test either, so I can only say my results apply to XP, but XP is still our main target OS because our customers use that.
Here is the code I used to find the minimum sleep time:
[cpp]
#include <iostream>
#include <boost/date_time.hpp>
#include <boost/thread.hpp>
using namespace boost;
int main()
{
xtime xt;
xtime_get(&xt, boost::TIME_UTC);
xt.nsec += 1;
posix_time::ptime start = posix_time::microsec_clock::local_time();
//use either of these sleep functions
//this_thread::sleep(xt);
sleep(0.000001);
posix_time::ptime end = posix_time::microsec_clock::local_time();
posix_time::time_duration td = end - start;
std::cout << "dif: " << posix_time::to_simple_string(td) << "\n";
}
[/cpp]
I'd be curious to see if anyone else here can get better than 15ms.
And I don't know how my Gentoo machine does so well compared to CentOS. Either the newer kernel really helps or I mistakenly built a real time kernel?[/QUOTE]
[url]http://bytes.com/topic/net/answers/790037-high-resolution-sleep[/url]
That might be useful.
[QUOTE=vepa;27991086]Stop posting misinformation.[/QUOTE]
[B]Learn to read before posting[/B], The "Qt Commercial Developer License" must be purchased, here's the "License Comparison Chart"
[IMG]http://i55.tinypic.com/302c26v.png[/IMG]
source: [URL]http://qt.nokia.com/products/licensing/licensing#qt-commercial-license[/URL]
[QUOTE=HiredK;27990272]Hum you can't use Qt if your not at least posting the source code with your project.[/QUOTE]
As of Qt 4.5 Nokia made the library LGPL, which means you only have to make any changes you have made to Qt itself available to them. (And your silly chart also proves this)
Aside from that I'd argue that Qt is one of the better APIs. My only gripe with it is their build systems almost always requires you to use them (Though this is changing in the future, as they move to allowing CMake and other build systems), as well as the generation of C++ code at compile time. They built a small code generator called MOC that generates this special C++ code that allows for runtime reflection. This also increases the amount of time it takes to build a file by a bajillion units of time. But then again it's just so damn nice to use :v:
There are also bindings to C#, Python (PySide, and PyQt), and a few other languages.
[QUOTE=HiredK;27993400][B]Learn to read before posting[/B][/QUOTE]
Follow your own advice.
[QUOTE=HiredK;27993400][B]Learn to read before posting[/B], The "Qt Commercial Developer License" must be purchased, here's the "License Comparison Chart"
[img_thumb]http://i55.tinypic.com/302c26v.png[/img_thumb]
source: [URL]http://qt.nokia.com/products/licensing/licensing#qt-commercial-license[/URL][/QUOTE]
You must only post the changes made to QT, not the source using it.
[editline]11th February 2011[/editline]
Ninja'd, have to rememebr to refresh the page.
Has anyone any information about performance of events in a C# application? I'm starting to work more and more with them, they are quite easy to do and reduce the amount of code I'd have to use heavily, but I'm not sure if that's good.
[url=http://github.com/SergeB/Rhubarb]Rhubarb[/url] now runs on Linux!
[url=http://i.imgur.com/cFb63.png][img]http://i.imgur.com/cFb63l.png[/img][/url]
As you can see the CPU usage is absolutely huge, and there's no multisampling. Guess it's time to leave glut...
Considering you run without vsync, what did you expect?
[QUOTE=vepa;27989807]How is it "bloated"?[/QUOTE]
[img]http://i.imgur.com/FgtdW.png[/img]
I never knew 200MB wasn't bloated for a GUI toolkit. Well, it's a lot more shit than that. It's bloated for the job.
[QUOTE=ZeekyHBomb;27994742]Considering you run without vsync, what did you expect?[/QUOTE]
As you can see in the list on the right, most of the CPU usage isn't due to my code, but to X. When I ran that on Windows I just had my executable use around 30%... I expected more-or-less the same on Linux.
Is there any real reason to worry about cpu usage? It doesn't necessarily mean that your program is inneficient, it just means it's using the available cycles to run as fast as possible. If other programs need cycles, they will be allocated. Efficiency is not directly proportional to cpu usage.
[QUOTE=RyanDv3;27995131]Is there any real reason to worry about cpu usage? It doesn't necessarily mean that your program is inneficient, it just means it's using the available cycles to run as fast as possible. If other programs need cycles, they will be allocated. Efficiency is not directly proportional to cpu usage.[/QUOTE]
Memory usage on the other hand...
Just realised that the tile engine I haven't touched in 4ish months has a memory leak. Leaking about 500kb/s and I can't figure out why.
Crap.
So I've got a gravity force constantly going downwards, but you can apply other forces to make it go horizontal and downward at the same time(or any other combination of directions)
I can check for collisions, but how do I know which way to move back? I could check all of the ways, and which ever has the least I do, but what if it's on a corner?
[QUOTE=Rohans;27994844][img_thumb]http://i.imgur.com/FgtdW.png[/img_thumb]
I never knew 200MB wasn't bloated for a GUI toolkit. Well, it's a lot more shit than that. It's bloated for the job.[/QUOTE]
Out of curiosity, have you ever even used Qt? The 16 libraries that it consists of (cross-platform GUI to database access to XML parsing) easily have some of the best API's I have ever used. The documentation is incredible. They are also completely modular, so they do not result in any "bloat" if you only want to use the GUI toolkit. An app that uses Qt for GUI will take around 8 megabytes of space for the executable and DLL.
In addition, you're not making a very convincing argument here in the first place. You're judging the "bloatedness" of a powerful framework based on the file size of a source code archive? Let's dig a bit deeper and figure out what all that space is actually used for!
After unpacking, we have a 500 megabyte directory. That sounds like a lot, but right away we can see that the included documentation takes 300 megabytes of space - 60mb goes to some files for generation and the rest to the HTML results and images.
The second largest directory is the src directory, weighing at around 180 megabytes - and over there we have a "3rdparty" directory that is 112 megabytes big. It includes huge stuff like Webkit (which Qt has a modular library for) and Freetype.
The "gui" source directory which includes the GUI module is about 25 megabytes big, which is on par with GTK+ and wxWidgets. Mystery solved!
[QUOTE=BlkDucky;27995926]Memory usage on the other hand...
Just realised that the tile engine I haven't touched in 4ish months has a memory leak. Leaking about 500kb/s and I can't figure out why.[/QUOTE]
[url]http://www.informit.com/guides/content.aspx?g=cplusplus&seqNum=40[/url]
see "Overriding new and delete Globally"
And #define new new(__FILE__, __LINE__) and #define delete delete(__FILE__, __LINE__). Assuming you don't use placement-new this will work fine for debugging. Google can probably also turn up a few small libraries for finding memory leaks.
[IMG]http://i56.tinypic.com/5a0xs3.png[/IMG]
Success!
I doubt I'm doing this anywhere near how I'm supposed to.
At the moment, it's looking to be the lovechild of lua and C# :downs:
Trying to implement a neural network... oh god. Why is it so hard?! It's so simple in my head!
Finished my collision system, it's the longest piece of code I've ever written.
Would C# benefit me learning C++ later?
[QUOTE=neos300;27996142]Crap.
So I've got a gravity force constantly going downwards, but you can apply other forces to make it go horizontal and downward at the same time(or any other combination of directions)
I can check for collisions, but how do I know which way to move back? I could check all of the ways, and which ever has the least I do, but what if it's on a corner?[/QUOTE]
If you're already using forces and can get the velocity of the object, you could just handle the collisions physically with the use of elastic/inelastic collision equations. Then it wouldn't matter in what direction the object is moving.
Sorry, you need to Log In to post a reply to this thread.