I'm working on a simple text program since i'm just begging on C++
[code]#include <iostream>
int main() {
std::cout << "Press a number" << std::endl;
int 1Number;
std::cin >> 1Number;
std::cout << "You Pressed #" << 1Number << std::endl;
return 0;
}[/code]
I can't find out why its not starting though,
[QUOTE=jmanmc;20109711]So it has to do all of this every time you build what?[/QUOTE]
ChromiumOS: [url]http://chromeos.hexxeh.net[/url]
Next release is named Flow, you can find details here: [url]http://blog.hexxeh.net[/url]
(If the blog link is showing Tumblr, DNS hasn't updated for you yet, I moved it to a self-hosted Wordpress earlier today)
Edit: ie, a fresh image ready to copy to a USB stick and boot from.
Figured it out forgot to space the "
[editline]08:26PM[/editline]
Okay apparently it did not work
[code] #include <iostream>
int main() {
std::cout << "what is you're favorite number? " << std::endl;
int 1number;
std::cin >> 1number;
std::cout << "your favorite number is " << 1number << std::endl;
return 0;
}[/code]
So I was just wondering why those things need to be done every time.
[QUOTE=Themage;20109865]Figured it out forgot to space the "
[editline]08:26PM[/editline]
Okay apparently it did not work
[code] #include <iostream>
int main() {
std::cout << "what is you're favorite number? " << std::endl;
int 1number;
std::cin >> 1number;
std::cout << "your favorite number is " << 1number << std::endl;
return 0;
}[/code][/QUOTE]
You can't start a variable with a number.
[QUOTE=Xeon06;20108333]I need some help folks, currently trying to hammer down a memory leak bug in SFML.Net 2.0 and I would like it if you guys could try this app out and tell me if it crashes or hangs up, and if so, at how many Text instances were you. I also need to know what OS you are running (if Win7 what build) and what architecture (x86, x64). This would help me greatly folks.
[url]http://dl.dropbox.com/u/3310651/Memleak2.rar[/url][/QUOTE]
XP 32bit, just crashes when I close it, and the instances went from 0 to like 3k and back to 0, and again and again.
[QUOTE=windwakr;20112901]So, does this "SFML" not provide a way to just access the pixel data? That seems like it would be awfully slow having to call some function which probably has tons of overhead every time you want to plot a single pixel.[/QUOTE]
Yeah he's doing it wrong. IIRC every call to GetPixel will pull the texture back from OpenGL edit it, then re-upload. A very slow process.
Better off creating the texture on the CPU completely then uploading once.
[QUOTE=s0ul0r;20112751]XP 32bit, just crashes when I close it, and the instances went from 0 to like 3k and back to 0, and again and again.[/QUOTE]
Thanks! Anyone else?
[QUOTE=noctune9;20105502]Alright guys, reality check.
It seems reasonable to limit my pathfinder to 3000*3000 in order to cut my memory usage by half, right?[/QUOTE]
I know the last page contained a lot of drama, but does this seem reasonable?
[QUOTE=jA_cOp;20107146]nullsquared wanted you guys to see this.
(img snipped)
Pretty nice.[/QUOTE]
Why in god's name is that a PNG?
[QUOTE=blankthemuffin;20113207]Yeah he's doing it wrong. IIRC every call to GetPixel will pull the texture back from OpenGL edit it, then re-upload. A very slow process.
Better off creating the texture on the CPU completely then uploading once.[/QUOTE]
By doing it that way you can't watch it render from left to right, which is part of the fun (and it takes like half a second to render an 800x600 window anyway)
Despite this, I will make it so that you can retrieve some form of interface to the pixel data anyway as well.
[B]Edit:[/B]
Right ok, you can only get a read only pointer to pixel data in SFML. Not that I see how it's neccessary, the following code completes the loop and displays in about 300ms, and this uses 2 SetPixel's and 1 GetPixel.
[code]
for(int x = 0; x <= 800; x++)
{
for(int y = 0; y <= 600; y++)
{
int col = x-y;
pixelr.SetPixel(x,y, Colour(col * 2, col*3, col * 4));
Colour colour = pixelr.GetPixel(x, y);
col = (colour.r + colour.g + colour.b) / 3;
if(col > 127)
col = 255;
else col = 0;
pixelr.SetPixel(x, y, Colour(col, col, col));
}
}
while(pixelr.Update())
{
Sleep(1);
}
[/code]
The image is still loading for me, the filesize must be huge.
I feel warm and fuzzy inside when I figure out I need to use a pointer for something, it makes me feel clever.
364kb! shock! horror!
Oh and using jpg for a mandelbrot is like using a camera phone at a photo shoot.
[QUOTE=Jallen;20115915]364kb! shock! horror!
Oh and using jpg for a mandelbrot is like using a camera phone at a photo shoot.[/QUOTE]
As if that's 364kb... It loads shit slow for me.
Must be a problem on my end
[QUOTE=Jallen;20115915]364kb! shock! horror!
Oh and using jpg for a mandelbrot is like using a camera phone at a photo shoot.[/QUOTE]
I am mistaken then, like above it loads damn slow.
[QUOTE=noctune9;20114075]I know the last page contained a lot of drama, but does this seem reasonable?[/QUOTE]
Can't you use a const int or something to specify the size in compile-time?
[QUOTE=turby;20116023]As if that's 364kb... It loads shit slow for me.
Must be a problem on my end[/QUOTE]
[QUOTE=iPope;20116192]I am mistaken then, like above it loads damn slow.[/QUOTE]
More likely a problem with the host
Starting to learn C++ so yeah, it is only able to do addition right now.
[IMG]http://img715.imageshack.us/img715/3032/workingo.jpg[/IMG]
My hopes and deams have been shattered as a guy on MSN ranted about how I can't support actual graphics for my game rather than just ASCII and how nobody plays ASCII games.
Ever heard of Dwarf Fortress? Tons of people play that.
According to him, less than 100 people actively play it.
[QUOTE=Eleventeen;20116915]According to him, less than 100 people actively play it.[/QUOTE]
If he is wrong about that, which he is, then he is likely wrong about other things he tells you.
[QUOTE=Eleventeen;20116915]According to him, less than 100 people actively play it.[/QUOTE]
I'm pretty sure more than a 100 people play it on this forum alone.
[QUOTE=Eleventeen;20116915]According to him, less than 100 people actively play it.[/QUOTE]
The DF community is huge for a free game like that. The IRC channel alone idles with about 90 users, and the forums are even more active.
And why can't you "support actual graphics" for your game?
Because SDL has a commercial license (I'm not going there. At all.) and probably uses libjpeg code and SFML is zlib and basically both of them have shitloads of research to do to find licenses and work out if I can use them to work with the LGPL properly.
[QUOTE=Eleventeen;20117155]Because SDL has a commercial license (I'm not going there. At all.) and probably uses libjpeg code and SFML is zlib and basically both of them have shitloads of research to do to find licenses and work out if I can use them to work with the LGPL properly.[/QUOTE]
You could, you know, make your own engine, if you don't agree with the licensing of existing ones.
Wrote a little program which creates a RB2 looking chartimage from drum tabs because I can't read the drum tabs on-the-fly.
[code]Cr|X---------------|----------------|x---------------|----------------|
HH|--X-X-X-X-X-X-X-|X-X-X-X-X-X-X-X-|--X-X-X-X-X-X-X-|X-X-X-X-X-X-X-X-|
Sn|----o--g-g--o---|----o--g-g--o---|----o--g-g--o---|----o--o----o---|
Bd|o---------o-----|o---------o-----|o---------o-----|o---------o-----|[/code]
[img_thumb]http://filesmelt.com/dl/output9.png[/img_thumb] (Click)
(Guess what song that is from and win absolutely nothing)
Gotta add visual support for stuff like ghost notes, open hi-hats, different toms and all that.
[url=http://www.libsdl.org/license.php]SDL license[/url] (LGPL or alternative commercial license) [url=http://www.sfml-dev.org/license.php]SFML license[/url] (zlib-style license)
[QUOTE=Eleventeen;20117155]Because SDL has a commercial license (I'm not going there. At all.) and probably uses libjpeg code and SFML is zlib and basically both of them have shitloads of research to do to find licenses and work out if I can use them to work with the LGPL properly.[/QUOTE]
SDL is available as LGPL or an optional commercial license. If you're using an unmodified version of SDL, all you need to do is dynamically link to SDL and link to their website somewhere.
SFML is even more open, zlib/png basically lets you do whatever you want except claim that you wrote the SFML code... the most restrictive license among SFML's dependencies is FreeType, using GPL.
[QUOTE=arienh4;20117204]You could, you know, make your own engine, if you don't agree with the licensing of existing ones.[/QUOTE]
That's what I'm doing. Right now I'm going to make a Unicode roguelike engine.
Sorry, you need to Log In to post a reply to this thread.