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

Pages: 1 [2] 3 4 ... 6
16
Graphics / Vector Graphics?
« on: February 21, 2012, 06:15:19 pm »
will it ever?

I have been thinking abut this...what are the chanced of openV ..is it openv...or something?

anyone ever played it

17
Feature requests / Better input support
« on: February 21, 2012, 11:34:17 am »
alright thank you,

Im more than happy to have a look.

I do however not have any experience, nore won a mac, :\....linux I can always duel boot I guess. never used linux either.

road map is good thank you,

18
Window / understanding of event system for hooking external input lib
« on: February 21, 2012, 11:31:16 am »
what external events library is it?

19
Window / Moving a shape along both axis using sf::Vector2f
« on: February 20, 2012, 05:29:16 pm »
try
Code: [Select]

if (sf::Keyboard::IsKeyPressed( sf::Keyboard::W )) {
      this->velocity += ( sf::Vector2f(0, -1) * this->deltatime );
   }

   if (sf::Keyboard::IsKeyPressed( sf::Keyboard::S )) {
      this->velocity += sf::Vector2f(0, 1) * this->deltatime;
   }

if (sf::Keyboard::IsKeyPressed( sf::Keyboard::A )) {
      this->velocity += sf::Vector2f(-1, 0) * this->deltatime;
   }

   if (sf::Keyboard::IsKeyPressed( sf::Keyboard::D )) {
      this->velocity += sf::Vector2f(1, 0) * this->deltatime;
   }

20
Graphics / Animation doesn't loop
« on: February 17, 2012, 11:54:15 pm »
what happens after you reach max frames?

++frame? max Is?

21
Graphics / (Solved) VertexArray Tilemap not drawing correctly
« on: February 17, 2012, 09:24:00 pm »
would you like my Tiled map loader? edited from one I found on the forums (forgot who sorry), but I added support for full layers, objects, tilemaps etc.

it uses tinyxml, loads, displays them, I havent looked over it again yet, as I will eventually be changing it from tinyxml, and other map info.


at the moment It draws just one background, then tiles over, for speed, so you may want to easily change that.

22
General / Trouble loading font ttfs from stream.
« on: February 15, 2012, 07:28:14 pm »
thanx v.much for your work!

23
General / Trouble loading font ttfs from stream.
« on: February 15, 2012, 01:49:58 pm »
Quote from: "Mario"
You should check the version used on the wiki example as well as the version you downloaded. If you're using the latest source version, there seem to be several more or less significant changes as well as deprecated functions.


May I ask Which?

Everything seems good, I should probably go over and make sure its good, rather than just assuming, thank you

I finally worked out who the Author was, and will notify them of this thread

24
SFML projects / Ruin Rumble - a 2D split-screen platformer
« on: February 15, 2012, 01:44:36 pm »
very very cool, very smooth, effects and gimmicks are fantastic !

had to play agaisnt my left hand but still was very cool.

25
General / Trouble loading font ttfs from stream.
« on: February 14, 2012, 04:12:04 pm »
yeah I'm sorry about the screenshot, it turned up a lot bigger than I thought, I assumed the link would be a thumbnail.

Code: [Select]

int PHYSFS_seek ( PHYSFS_File * handle,
PHYSFS_uint64 pos
)


I returned the same position and it seems to work well. thank you, I will let the author know..

amazingly spotted.

26
Feature requests / Support for dialog popups (MessageBoxes)
« on: February 14, 2012, 03:38:53 pm »
I noticed there is one here, BUT I can not read it msyelf?

https://github.com/SFML/SFML/wiki/Sources

27
General / Trouble loading font ttfs from stream.
« on: February 14, 2012, 03:24:01 pm »
Quote from: "Laurent"
Does font.LoadFromStream return false?
.

it returns false.

Quote from: "Laurent"
What does "fontstream returns TRUE and not NULL" mean?
.

I mean, the file has a handle and the error section of the class is false,  So I mean it reports it as loading "correctly"

here is an image to illustrate what I mean;
http://i41.tinypic.com/qn787d.png

Quote from: "Laurent"

Can I see the complete implementation of the sf::physfs class?
.

I am using the following code:
https://github.com/SFML/SFML/wiki/SourceSfmlPhysfs

Its header is simply
Code: [Select]

namespace sf{

    class physfs: public sf::InputStream{
        private:
            PHYSFS_File *file;
        public:
            mutable bool error;
        public:
            physfs(const char *);
            ~physfs();
            sf::Int64 Read(char *, sf::Int64);
            sf::Int64 Seek(sf::Int64);
            sf::Int64 Tell();
            sf::Int64 GetSize();
    };

}


Quote from: "Laurent"

One thing that you will need to fix, after loading works, is that the font source (in this case the stream -- or just its contents, I don't remember) has to remain alive as long as the font is used for drawing. This is because I cannot preload all the font's glyphs directly in the LoadFromXxx function, it is done on the fly

.

I see, thank you

28
Feature requests / Better input support
« on: February 14, 2012, 03:02:55 pm »
I thought I would write it here, so it's not forgotten,

maybe a roadmap would be helpful for the website?


While we wait for better keymaps, more keys and maybe better named joystick keys.

Really annoying right now, how can I make anything for release which might fail on its input?


Is there anything that we can do?

Not sure I want to go including a separate input library...not that I actually found one that is not tied to orge :\

29
General / Trouble loading font ttfs from stream.
« on: February 14, 2012, 02:45:00 pm »
Hey, all my images and data files load from a stream fine. apart from fonts, though they are being done in the same way.


I'm using the physfs class from the wiki.

this loads my font

Code: [Select]
const sf::Font * imageManager::getFont( const sf::String& filename )
{
if(filename.GetSize() < 1)
{
return &sf::Font::GetDefaultFont();
}

// Check, whether the image already exists
std::map<sf::String, sf::Font>::iterator it = fontResources.find(filename);
if(it != fontResources.end())
{
return &it->second;
}

CGameEngine &Game = CGameEngine::getInstance();

sf::String fontpath("fonts/");
fontpath += filename;
std::string s(fontpath);

if(PHYSFS_exists(fontpath.ToAnsiString().c_str()))
{
sf::Font font;
sf::physfs fontstream(fontpath.ToAnsiString().c_str());

// Search project's main directory
if( font.LoadFromStream(fontstream) )
{
fontResources[filename] = font;
//std::cout << "DEBUG_MESSAGE: " << filename << " loading image.\n";
return &fontResources[filename];
}
}

Game.consolePrint("Failed loading font \"" + fontpath + "\"");
return &sf::Font::GetDefaultFont();
}



this fails
Code: [Select]

if( font.LoadFromStream(fontstream) )


fontstream returns TRUE and not NULL.

if(PHYSFS_exists(fontpath.ToAnsiString().c_str()))
returns true, it exists.


The images, textures is exactly the same, BUT it loads
Code: [Select]

if(texture.LoadFromStream(imagestream) )
{




This is what loads the file:

Code: [Select]

sf::physfs::physfs(const char *filename){
    file = PHYSFS_openRead(filename);
    error = false;
    if (file == NULL){
        sf::Err() << PHYSFS_getLastError() << std::endl;
        error = true;
    }
}


PHYSFS_openRead, file is valid.

Any suggestions?

I tried loading the font from file, works fine.

30
Graphics / SFML2 and external gui library
« on: February 12, 2012, 03:17:09 pm »
I had no problems when I tried rocket...the example had some problems but still worked, but the resize func was messed.


try removing just this:

Code: [Select]


   glMatrixMode(GL_PROJECTION);
   glLoadIdentity();
   glOrtho(0, mWindow->GetWidth(), mWindow->GetHeight(), 0, -1, 1);
   glMatrixMode(GL_MODELVIEW);


Pages: 1 [2] 3 4 ... 6
anything