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.


Topics - Groogy

Pages: 1 ... 3 4 [5]
61
General / Weird thing with speed.
« on: April 25, 2009, 12:24:54 am »
I noticed a thing. I got it printing out the elapsed time between frames.

And it first prints out between "Time: 0.0063...." to "Time: 0.0059...". Aight now comes the weird thing. When I grab the window, and move it and then releases it. This is decreased to 0.002 and sometimes even 0.001 and it continues at that speed for the rest of the lifetime of the application.

Is this a bug? Has it been noticed before?

I'm on Windows Vista when I tested this using the VC++ 2008 version of SFML.

62
SFML projects / SFML Bindings for mSCRiPT
« on: April 21, 2009, 09:34:43 pm »
Oi ^^

I've developed a language called Madness Script(mSCRiPT) and I'm thinking about making bindings for SFML to the language.

Though I'm just wondering some things.

If I create it and it work's perfectly. Can it be posted under the download page? Marketing you know :P

Is there some things I should know? I haven't made bindings before. The Dev API for the language is in C++ so it should be fairly easy to make it available in mSCRiPT. Should I change in the source code directly or make a wrapper around SFML?

It will be something like this:
Code: [Select]

SFML = PluginManager.RequestPlugin("SFML")
window = SFML.NewWindow
window.Display
// more code more code


** EDIT **
Remembered that SFML is divided into packages so it should be like this:
Code: [Select]
SFMLSystem = PluginManager.RequestPlugin("sfml-system")
SFMLSystem.Sleep(0.05)


Though should the bindings automatically link the packages they depend on? I.E. Should Window link System by itself or should the developer do that himself?

** Tragic end **
I think I can't do this. Not sure. I can't get my Dynamic Linker to work properly with VC++. It works perfectly with GCC/G++. But VC++ won't accept how I handle the external functions and create a "unified" form of argument list.

Unless someone can help me with that, I'm dead stuck.

63
General / Signalsending system
« on: April 06, 2009, 10:50:26 pm »
Oi! I'm making my own system for SFML. I've run into some problems and would like some help on it.

Anyway here's the basic how it works. We have a 3 Base objects. SignalSender, SignalReciver, SignalBase. SignalBase represents a signal which is sent by SignalSender to a SignalReciver. And the SignalReciver can subscribe to different levels of signals. Every signal is associated with a string name. For instance QuitSignal's name is "Signal.Window.Quit" and represents a Closed event. A Receiver can subscribe to "Signal.Window" to receive all Window associated events. Or he can be precise and say that he only wants "Signal.Window.Quit" or he can subscribe to "Signal" to get all signals. The biggest point with the system is that the developer can create his/her own signal classes.

See it as a extension to the already in place system.

Anyway here's problem number one. Data... Data data data. Since I store all events in a std::queue<SignalBase> some data seems to be lost when I pump the extended SignalBase class in there. (Like MouseMovedSignal). I guess it's because the queue only copies the SignalBase part of the entire object?

Here's some code:
Code: [Select]

class SignalSender {
    private:
        std::multimap<std::string, SignalReciver *> subscribers;
        std::queue<SignalBase> signalQueue;

    protected:
        void SendToObjects(const SignalBase& signal, const std::string& currentNamespace);
        SignalBase ConvertSFMLToSignal(const sf::Event& event, sf::Window * window);

    public:
        SignalSender();

        void SubscribeReciver(SignalReciver * reciver, const std::string& type);
        void SubscribeReciver(SignalReciver * reciver, const SignalBase& type);
        bool IsReciverSubscribed(SignalReciver * reciver, const std::string& type);

        void AddSignal(const SignalBase& signal);
        void SendSignals();
        void FetchEventsFromWindow(sf::Window * window);

};

void SignalSender::AddSignal(const SignalBase& signal) {
    this->signalQueue.push(signal);
}



I was thinking of like, adding like some resource object in the SignalBase where we stuff in all signal specific data though I'm wondering if there's a more gracious method to do it. Also, is there some class I can use in the stl already?

Thx for the help on before hand


PS: Oh yeah Laurent, I fixed so it can calculate relative movement for ya now in multiple windows :D

64
Window / MouseWheelEvent - How do you use it?
« on: April 06, 2009, 01:15:02 am »
I'm just wondering how you use MouseWheelEvent? It's the event to use when the event type is MouseWheelMoved right?

Is it that negative is scrolling downwards and positive is upwards? Is it relative? So the more scroll the higher/lower number?

65
General / Compiz Fusion is bugging me...
« on: March 01, 2009, 03:43:33 pm »
Compiz Fusion in Linux adds some effects to my desktop using OpenGL.... And as SFML uses OpenGL as a backend, it conflicts with each others. When I open a window while hacing Compiz enabled, the window get screwed over and I can't even see the window border.

I'm wondering if anyone knows a work around for this?

66
Graphics / sf::Image complains about "pure virtual function call&a
« on: February 27, 2009, 09:54:59 pm »
Yo! While trying some stuff on Vista I get this error when exiting the application (When the sf::Image object is being destroyed)

Quote from: "Vista"
Runtime Error!

Program: {Path to application}

R6025
 - pure virtual function call


Return value of this is 255 (0xFF).
I've tried to isolate a special case though I'm not sure but I think it is when I don't use the image and just create it. But then if I have two images, each with an own sprite and then draw them, the exact same error is back.

** UPDATE **
This only happens when I load the image data from a file. Gonna try what happens if I change file and fileformat.

** UPDATE **
I tried changing file and format, no change in behaviour.

** UPDATE **
Only happens after I have loaded the image from a file.

67
Window / Get the Window FPS
« on: January 29, 2009, 07:25:43 pm »
I can't seem to find a function like: GetFramerateLimit(); for Window.
Soo.... Is there some other way to find the value for what the current frame rate is?
I know how to get the time since the last display update but that won't do it.

68
Window / Create your own events
« on: January 21, 2009, 01:24:39 pm »
Can I somehow create my own events? Like making an event called "HoverOverButton" or something like that?

69
Feature requests / Event Messaging/Mailing
« on: January 19, 2009, 10:34:43 pm »
I got this idea from Rubygame. In Rubygame they got the classical Event Polling but you can extend the EventQueue class with a MailQueue module which gives EventQueue the ability to have objects subscribed to it together with an event. And when that event is polled it is sent like a mail to each object subscribed to that event making it much easier to make interactive objects.

Would it be possible to add this to SFML? If it is I can help out with writing it.
I think I've written it several times for SDL/Xlib though calling it SignalSender instead.

70
Graphics / sf::Text destructor crashes app
« on: January 19, 2009, 10:13:12 pm »
It's probably me that has done something wrong. But every time I try to run my application with sf::String it crashes when it shuts down(working perfectly until then). When I uncomment the line where I create the object the error disappears.

Can't see what's wrong.

71
Graphics / Images and OpenGL
« on: January 16, 2009, 11:35:06 pm »
Couldn't find any topics about this when I made a search.

Can I use like the pointer to the pixel data in a sf::Image to use as an texture or image with OpenGL? Kinda like you can do with SDL_Structures and OpenGL.

Ow yeah, can you also use Sprites? To just draw an image on the display while using OpenGL? Would simplify a lot of stuff. I tried myself but the image was kinda incomplete and it didn't show the entire image. Some random squares were black.

Keep in mind I'm just trying out SFML and thinking about moving from SDL to SFML.

Pages: 1 ... 3 4 [5]
anything