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 - Tex Killer

Pages: 1 ... 14 15 [16] 17
226
General / Weird drawing issue
« on: November 10, 2011, 01:39:46 am »
I guess you're you using separate images for each tile... Am I right?
You can use one big image with all tiles on it, but if you are following a tutorial that will give you some trouble.

Why are you scaling the sprites before drawing?

227
Graphics / RenderWindow.Clear() one sf::Shape?
« on: November 09, 2011, 12:56:00 am »
The thing is: The rendered image is not layered, so if something is printed in front of another thing, that another thing gets replaced on those pixels. There is no coming back, as there is no changing history nor layers.

The best you can do is redraw only what was behind the removed image, but if there was something on top of it, will get replaced as well. And so on.

The simplier and more doable thing is to redraw everyting each frame, which is not very costly for something like 60 FPS, depending on the number of drawable instances. Everyone does just that.

228
General / Tutorial "Opening a window" code doesn't work righ
« on: November 07, 2011, 10:01:36 pm »
That tutorial doesn't treat events, so your window's close event is not used and the window isn't closed. Advance on the tutorials and you shall solve your problem.

229
Window / Disabling Alt/control/shift
« on: November 06, 2011, 05:24:27 pm »
Does that mean you agree?  :)

230
Window / Disabling Alt/control/shift
« on: November 06, 2011, 03:43:47 am »
The matter here is that there is a system effect on Windows that affects the Alt key, and is specific to menus. Why would you want this effect active if SFML by itself doesn't allow you to use menus? Wouldn't it be better to disable the effect, and provide some function for future GUIs that may use SFML to enable it?

I'm sorry if I'm not making myself clear... As I said on another topic, english is not my main language  :?

231
Window / Disabling Alt/control/shift
« on: November 05, 2011, 05:20:43 pm »
Is it allowed to "UP" threads around here?

232
General discussions / Possible changes in the audio API
« on: November 05, 2011, 03:49:54 pm »
Damn Notepad++... I usually code in code::blocks, and there the tabs turn into four spaces. Notepad++ keeps the tabs, but shows them as four spaces, as it seems. My bad, sorry for that.

My goal was to, later, be using C on it all, removing the SFML layer and working directly with opengl/openal and stuff, but I'm beginning to review that, as it may be bad for compatibility. The thing is I treat things (specially graphics) in a diferent way that SFML does, and have to adapt the output to match SFML standards.

Anyway, you can replace whatever tabs you can find to four spaces, and it should be idented.

I don't know what you said about constructors either. I'm not very used to C++.

233
General discussions / Possible changes in the audio API
« on: November 05, 2011, 03:20:25 pm »
Nexus, thank you for your tips. The thing is: I've changed only what took to make the code work without my engine. I'm programming my engine using C standard (but compiling it as c++, because of some c++ libs I'm using). That is why the mallocs and frees, and the variables being declared on top of functions. About the variable names standard, what is it that is wrong in my code? I didn't get it about the identation as well.
Thanks for the feedback, by the way.

234
General / Polling for events drastically lowers frame rate
« on: November 05, 2011, 03:14:10 pm »
If it have a delay high enough to damage FPS, then it will be always bad to put it in the same thread as the game loop. If it is in a separate thread, it will not damage FPS and will be called right when it is ready to be called, without waiting for seconds or so.

235
General / Polling for events drastically lowers frame rate
« on: November 05, 2011, 03:27:20 am »
Wouldn't it be possible to run that method on a separate thread, and every frame just check if the thread had finished, re-launching it if it had?

236
General discussions / Possible changes in the audio API
« on: November 03, 2011, 04:29:56 pm »
Laurent, from my experience it is, as OGG and MP3 are quite similar.

I've googled some comparison tests over the internet, and found these:
http://forums.anandtech.com/showthread.php?t=2168530
http://www.stereophile.com/content/mp3-vs-aac-vs-flac-vs-cd-page-2

It is hard to judge the quality of music files, but I think the difference is big enough to be noticeable, specially at lower bitrates.

Sorry for the noobish question, but why can't it be used on SFML? I don't know much of these licenses.

237
General discussions / Possible changes in the audio API
« on: November 03, 2011, 03:47:07 pm »
Hello guys...
Laurent told me to create a new topic about my sugestion on the audio API.
My point here is that users cannot play chained parts of songs in a decent way with the current API. I've made some changes on my local version of SFML trying to accomplish something like that. Here is a version I changed a little from the one I'm currently using to show you:

EDIT: Code updated and upgraded.
I've renamed the class to Playlist, and changed some of the C fashion design of mine (the best I could with my limited C++ knowledge)
Now it is possible to return to a previous item during execution, and you can limit how many times it returns.
It is still not equal to my local version, but it can accomplish pretty much the same.


Inside src/SFML/Audio:
Playlist.cpp
▼ Download
• You also have to alter CMakeLists.txt and add this lines among the similar others:
Code: [Select]
    ${SRCROOT}/Playlist.cpp
    ${INCROOT}/Playlist.hpp
Inside include/SFML/Audio:
Playlist.hpp
▼ Download

Inside include/SFML you have to alter Audio.hpp and add this line among the similar others:
Code: [Select]
#include <SFML/Audio/Playlist.hpp>I think these are the only changes, but I may be wrong. I've made a minimal example showing how to create a list and add sounds to it specifying (or not) the start and end positions in milliseconds:
Main.cpp
▼ Download

By the way... How hard would it be to incorporate a library like FAAD2 on SFML to make it possible to use AAC sounds? I think this format is the one with the best compression at the moment.

PS: Sorry about any english errors... English is not my main language.

238
Graphics / Help with sf::RenderWindow*
« on: November 03, 2011, 04:05:44 am »
When you do something like this:

Code: [Select]
App2 = &sf::RenderWindow(sf::VideoMode(64, 640), "Images");

you create a local variable and takes its address to put on the pointer. This local variable gets destroyes when the function ends, and then you have an invalid address on the pointer. But if you use the new to construct the pointers, they stay on the memory until you destroy them manually.

239
General discussions / The new graphics API in SFML 2
« on: November 02, 2011, 09:17:15 pm »
Well, I'd have to polish my code before showing, mainly because most part of the terms are in portuguese. Basically, in my version you set up a list, and add to that list the files you want played - specifying the start and end millisecs each time you add a file to the list - and then play the list. Once one entry is finished the other starts right away, in the same thread. I've made it buffered, extending the Music class and coding some more things.
I'll show what I did soon, then. Thanks.

240
General discussions / The new graphics API in SFML 2
« on: November 02, 2011, 07:51:22 pm »
Hello.
I'm sorry for not reading all the messages on the topic, but I have an idea I want to discuss.
Are you planning on revewing the audio API?
As I have checked, you can't play one piece of song right after another piece... you cant mix sounds in the current API. Am I correct?
I have made a little improvement on my local version of SFML code to allow such things. Don't you think it deserves be on the public one too?
Thank you all for your work and dedication.

Pages: 1 ... 14 15 [16] 17
anything