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 - ChronicRat

Pages: 1 ... 19 20 [21] 22
SFML projects / Re: GIPE Framework
« on: October 12, 2013, 01:04:00 pm »
Now i'm testing all this stuff in Linux (Ubuntu 12.04). Several problems because of migrating from MS VS were solved. Game using GIPE works fine, but not Editor based on wxWidgets. I've modified wxWindow class to return direct handle to X window:

unsigned long wxWindowGTK::GetLowLevelWindow() const
    return GDK_WINDOW_XID(gtk_widget_get_window(m_widget));
Then modified my own wxRenderWindow (natural child of sf::RenderWindow and wxPanel) class:
void wxRenderWindow::CreateSFMLWindow()
#ifdef __WXGTK__
        wxWindowGTK* wnd = (wxWindowGTK*) this;
        this->create( wnd->GetLowLevelWindow() );
So, i have fully functional editor except one big problem - SFML RenderWindow reacts only on MouseEnter and MouseLeave events. I can't get other events from pollEvent(). =( Any ideas why?

Window / Re: [potential fix] X11: Tilde key not getting detected
« on: October 11, 2013, 04:03:33 pm »
Well, Ubuntu 12.04 LTS, GCC 4.8.1, SFML just updated from repo, Tilde still not working - keycode == -1.

SFML projects / Re: GIPE Framework
« on: October 05, 2013, 09:33:57 am »
Cool! Can you tell us more about the project? What does it utilize, what can it do? :)
Thanks! =) I'm trying to not use Google translate, so it is not easy to me.
I'm planning to use this framework for multiplatform colorful games. wxWidgets used only for Editor. Other libraries used: SFML and its dep-s, SFGUI, Lua, OOLua, glm, minizip. I think Box2D will join to this company.
Framework has several managers (ResourceManager, InputManager, RenderManager, LuaManager), each manager designed to be in own thread, but can be set to be used from other thread (MainThread). So in future game will detect number of processors cores and use each of it or will be single (or two) threaded program.  Each manager has own queue of tasks, no direct access allowed.
ResourceManager can work with several filesystems, where filesystem can be real or virtual to work with Zip archives. It can prefer files from zip or from disk.
EventManager was created under the impression of wxWidgets event manager - which is very flexible and powerful. It allows to fast and simple transfer some data to all subscribers of Event. I hate Singletons. =)
And yes, each manager is a Singleton, but it does not allow to automatically create instance on calling to Instance method.
Well, i think i will present one cool game in a month. =)

SFML projects / Re: GIPE Framework
« on: October 04, 2013, 06:57:04 pm »
Thanks. =) Three weeks of development with stars for test and then one minute to create something like smoke. =)

SFML projects / GIPE Framework
« on: October 04, 2013, 05:45:27 pm »
Just another one framework based on SFML. Effects editor:


https://bitbucket.org/SteelRat/gipe - project still in development.

Graphics / Re: [SOLVED] sf::Text not drawed
« on: September 04, 2013, 04:39:38 pm »
For simpler cases, you might just have a centralized class that stores the resources and ensures their lifetime. You can then give away raw pointers to resources, since they are not owning.
I have the same now. Font problem was solved with a simple stream manager. By the way, how about to add sf::InputStream flag, or callback, that data was readed fully?

Graphics / Re: [SOLVED] sf::Text not drawed
« on: September 04, 2013, 07:14:52 am »
Yes, thank you, looks almost as my manager, but i tried to not use smart pointers. Now i'm ready to think that smart pointers are the best solution for Resource Manager.

Graphics / Re: sf::Text not drawed
« on: September 03, 2013, 07:57:25 am »
Well, yes, here it is:
Common mistakes

Some resource classes are not loaded completely after loadFromStream has been called. Instead, they continue to read from their data source as long as they are used. This is the case for sf::Music, which streams audio samples as they are played, and for sf::Font, which loads glyphs on the fly depending on the texts content.
I have to rewrite my resource manager...  :'( He was so cute.
And now i understand why i'm taking a rare crash with one texture. =)

Graphics / Re: sf::Text not drawed
« on: September 03, 2013, 07:50:59 am »
Well, if i initialising font before main loop, and if i creating sf::Text with some text - font will be created. But only will be available letters from previously defined sf::Text.

This code is before main loop:
        sf::Font* font = RES_MGR.InstantGetFont("sansation.ttf");
        sf::Text text("123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ", *font);
Without both of these lines - no text displayed...  :o

Font is loaded via loadFromStream function. Is this function loads entire font?

Graphics / Re: sf::Text not drawed
« on: September 02, 2013, 09:58:45 pm »
otherwise we can only guess.
Yep, i will continue to guess too. =)

Graphics / Re: sf::Text not drawed
« on: September 02, 2013, 09:56:45 pm »
By the way, what is SIMPLE_LOCK? It looks dangerous ???
It is macro where can be mutex lock. It is empty now.

Graphics / Re: sf::Text not drawed
« on: September 02, 2013, 09:54:52 pm »
Yes, i use Bitbucket and have Mercurial repo. This is very simple class to show debug (mostly) info without SFGUI. So i did the class, the text has been drawn. Source code was not committed to repository because of simplicity of class. =) Then i made some changes...  :o

Are you sure your "return;" isn't executed?
Yes, i'm sure.

Graphics / Re: sf::Text not drawed
« on: September 02, 2013, 09:26:23 pm »
Yes, i reverted all changes (as  i think), and i left only this object in render queue... Nothing on screen. May be sf::View is wrong? It is created by this code:

void Info::RecalcView(int x, int y)
        mScreenSize.x = (float) x;
        mScreenSize.y = (float) y;
        mView.reset(sf::FloatRect(0.0f, 0.0f, mScreenSize.x, mScreenSize.y));
All is looking good, but m_inverseTransform is equal to m_transform. They both are the identity matrixes. Is it correct?

Graphics / [SOLVED] sf::Text not drawed
« on: September 02, 2013, 08:56:15 pm »
Here is code:
/* virtual */ void Info::draw(sf::RenderTarget& target, sf::RenderStates states) const

        if (!mVisible || !mIsInitiated)

        sf::View old = target.getView();
        target.draw(mDrawText, states);

About one hour ago text was on the screeen, after little refactoring - no text drawed. Target is active, GLstate reseted... Is there any simple reason for such behavior?

Solved: Use sf::InputStream with care!

SFML projects / Re: SFGUI (0.1.1 released)
« on: September 01, 2013, 05:48:40 pm »
Thanks, it works:
        const sfg::Adjustment::Ptr& scroll = mScrolledWindow->GetVerticalAdjustment();
But will be nice to make it by one command.

upd: post edited, no questions anymore. =)

Pages: 1 ... 19 20 [21] 22