Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Ashenwraith

Pages: 1 ... 15 16 [17] 18
241
General discussions / Visual Studio 2010
« on: April 13, 2010, 08:58:01 pm »
I know what pointers and arrays are conceptually, but isn't an array essentially an indexed list of pointers?

And also, aren't arrays much faster than vectors, especially for linear iterations?

242
General discussions / Visual Studio 2010
« on: April 13, 2010, 08:20:16 pm »
Quote from: "Nexus"
Quote from: "Ashenwraith"
Is it possible to implement it so you can put all drawables in an array so you can loop through them with draw?
You can do that already now. Store pointers.

Concerning automatic deallocation, you might consider Boost.PointerContainer.


What's the difference between an array and a pointer in C++?

It seems like an array is a pointer, but don't all pointers/arrays have to be of the same type and drawables is abstract?

Without an external class to bundle, would that not be possible?

243
General discussions / Visual Studio 2010
« on: April 13, 2010, 08:14:10 pm »
Quote from: "Laurent"
Quote
And one off-topic question: when is the SFML2 release+documentation expected to see broad daylight?

SFML 2 release... still too soon to tell ;)

The documentation is almost complete (I just have to complete drawables classes before it's ready), so I think I'll upload it in the next few days. The tutorials will require a lot more work though.


Hey, I got a quick Q about drawables.

Is it possible to implement it so you can put all drawables in an array so you can loop through them with draw?

244
General discussions / cheeseburger.ttf
« on: April 13, 2010, 07:31:14 pm »
Quote from: "kolofsson"
Quote from: "Ashenwraith"
I read in the license if you distribute cheeseburger.ttf it must be bundled with fries.ttf


I've heard that if you excessively use aforementioned fonts, you can get stuck with Bold always being on.  :twisted: [/b]


Hey, bold is BEAUTIFUL.


Unless, it's too BOLD to read the curves...

Then you are screwed because all of the italic dressing in the world is not going to help.

245
General discussions / Benchmark : SDL vs SFML
« on: April 13, 2010, 07:25:13 pm »
Quote from: "Spodi"
As long as SFML is "around SDL" in terms of performance, anything more is just a bonus to me. I use SFML for its design, very active development, and great 2d support. Any speed improvements are just a bonus. How many of you are actually 1) hitting a frame rate limit, 2) have a reasonable amount of rendering being done, and 3) have already optimized your rendering? There is a huge amount of stuff you can do to optimize rendering on the user side. From what I can see, SFML is pretty much bottlenecked by the drawing calls, which is usually what happens with most 2d engines. So there likely isn't a whole lot SFML can do besides batching, but even then I have had mixed results when it comes to that since batching in 2d isn't always so beneficial.

Focus on designing your game. If by the time you finish, and your game isn't running fast enough, optimize the way you are rendering and add some support for toggling effects/quality. If that still isn't enough, then you can consider SFML's performance. Until then, its just "an interesting statistic".


Speaking of performance, how is xna/directx working for 2d?

246
Quote from: "Laurent"
Quote
I thought rects in 2.0 were going to be w,h,x,y?

They are.


Awesome man, good job.

Yeah, forget this corner stuff. I'm building a rect, not a rhombus.

247
General discussions / cheeseburger.ttf
« on: April 13, 2010, 05:45:13 pm »
I read in the license if you distribute cheeseburger.ttf it must be bundled with fries.ttf

248
General discussions / Benchmark : SDL vs SFML
« on: April 13, 2010, 05:05:49 pm »
This thread is smart and a good idea.

Benchmarking SFML against SDL should be standardized with each major release of SFML--or at least the benchmark executable updated.

BTW, I found SFML by searching "better than SDL" and "SDL sucks"  8)

249
I thought rects in 2.0 were going to be w,h,x,y?

If so I think I will switch to 2.0 because I don't have to convert all my rect code.

250
General / Taking the time control approach - questions
« on: April 13, 2010, 04:27:23 pm »
The lowest I could get it to go was 60.1fps and that's with holding down the fire and dodging all the bullets everywhere.

I have a 7800 gtx

You should probably ask people what vid cards they have.

Also, writing lots of txt to the console can slow the  cpu/game down too (especially old systems). You might want to get rid of that before benchmarking.

251
General / Re: i can kindof program for the ps3
« on: April 13, 2010, 03:47:11 pm »
Quote from: "WSPSNIPER"
i can use sfml on the ps3 but booted on linux, i know its not the ps3 os but its the ps3 lol, ps3 is the best, they allow you to put an operating system on it but only 456MB or so RAM oh well


Last I heard they don't give you access to hardware acceleration and other hardware. It's sort of a faux homebrew system.

252
Graphics / [solved]SFML Color probs
« on: April 13, 2010, 09:13:02 am »
Quote from: "Nexus"
Quote from: "Ashenwraith"
hmmm... I tried
Code: [Select]
std::cout<<my_color.a<<'\n';But it was only blank.
The sf::Color members are of type sf::Uint8, which is a typedef for unsigned char. And the unsigned char overload of std::ostream::operator<< tries to write characters, not numbers. So, you have to cast to a type that is recognized by the streams as a number:
Code: [Select]
std::cout << static_cast<int>(my_color.a) << std::endl;

Quote from: "nulloid"
Or maybe you just need to write <<"\n" instead of <<'\n', or at least '\n\0'.
No, that's not the problem. std::cout can handle single characters. And '\n\0' is not a valid char literal, you can't store two characters in one byte.


Hey thanks with the cast help. That's what I thought it was. I haven't used C++ in a while and this new syntax looks good without having to use a lib like boost. I'll have to check to see if it works with wchar_t and other stuff I'm working with.

253
Graphics / [solved]SFML Color probs
« on: April 13, 2010, 12:11:27 am »
Quote from: panithadrum
Quote from: "Ashenwraith"
yeah, yeah.. I know



Code: [Select]

void PrintColor(const sf::Color &Color)
{
    std::cout << Color.r << ", " << Color.g << ", " << Color.b << ", " << Color.a << std::endl;
}


Thanks, I got it working.

hmmm... I tried
Code: [Select]

std::cout<<my_color.a<<'\n';


But it was only blank.

Why does your code work?

I think it might be the windows console, I get strange characters for a lot of these cout.

254
Graphics / [solved]SFML Color probs
« on: April 12, 2010, 11:55:14 pm »
yeah, yeah.. I know

I don't know what's wrong with my code.

It would help if there was a way to print all these variables.

It's hard to tell if they are working.

255
Graphics / [solved]SFML Color probs
« on: April 12, 2010, 11:35:28 pm »
Quote from: "panithadrum"
What do you mean? The compare method works fine.


hmmm... still having probs with it .

Are you sure this works for comparing the r,g,b,a value?

What are the bool operators for?

bool sf::Color::operator!=  ( const Color &  Other   )  const


I can't get these to work either.

Pages: 1 ... 15 16 [17] 18