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 - Lord Delvin

Pages: 1 2 3 [4] 5
46
SFML projects / BF::Renderer::Text
« on: November 21, 2007, 09:35:02 pm »

That would be 12.0px

47
Feature requests / Make colored strings more readable
« on: November 21, 2007, 05:25:12 pm »
I'd suggest to turn line 367 in FontManager.cpp

Code: [Select]
CurFont.Texture.SetPixel(x + Left, y + Top, Color(Pixels[x], Pixels[x], Pixels[x], Pixels[x]));


into

Code: [Select]
CurFont.Texture.SetPixel(x + Left, y + Top, Color(255, 255, 255, Pixels[x]));
So text should be more readable on colored text/background.

48
SFML projects / BF::Renderer::Text
« on: November 21, 2007, 05:16:52 pm »
As far as I read the sfml code, sfml seams to load the biggest verion of a required character, whats basicly a good idea, but it leads to bad results, because OpenGL can't ever do nice scaling(as it does not know you are using a vector image source)

I think it will look better, but this will also havily depend on the font file you use...hmm I'll try out if I can really do better(thought unicode would be more interesting)
have fun!

EDIT: I tested a bit and for DejaVu I get a limit of 10px, bellow you cant read any small letters so I'd really suggest to use a bitmap font for anything smaller.

49
SFML projects / BF::Renderer::Text
« on: November 21, 2007, 09:00:30 am »
Atm it looks good in the range of 12px to 32px. But I will fix that when I have the gc working, as it wont be much overhead to have chars twice as long as needed in different sizes.

50
SFML projects / BF::Renderer::Text
« on: November 20, 2007, 09:22:33 am »
For my game development toolkit I wrote a version of sf::String, which should use less memory and which is easier to use, as you dont need to tell which chars are needed.
My aproach uses a simple GC, so it might not be usefull for sfml itself(besides its not fully implemented yet).

Shot:


Code: [Select]

// init
    BF::Renderer::Text test;
    test.setText(L"☢NücLäa Πlaßτ♀☢\ngrr\nDer ☠ kommt zu euch☺\nGgriesch!");

//....//

//draw

    glColor3ub(122, 255, 255);
    test.draw();

(text is stupid , I know that)

51
General discussions / Less formats vs less dependencies ?
« on: November 19, 2007, 09:16:30 am »
Quote from: "dunce"
From now on I can distribute just an exe file and game assets.

You could make a package, hardcode it and then load it from memory :twisted:

52
Feature requests / Possibility to load resources from a file buffer
« on: November 12, 2007, 08:25:09 pm »
A much saner way to do that would be to provide methods for a pure virtual reader Class and to do some standardimplementations.
There are still people who have to mess with FILE* as some APIs work with FILE*;)

53
SFML projects / LuaSFML
« on: November 12, 2007, 09:27:26 am »
This might be usefull for a OO syntax, as syntax with : is a bit confusing.

Code: [Select]

--This is derived from Salmaso Raffaele by Timm Felden
--the origin and the license can be found at http://thread.gmane.org/gmane.comp.lang.lua.general/12344/focus=12344

function Class(super, typename)
    -- create a new class description
    local class = {}
    -- set the superclass (for object/function inheritance)
    setmetatable(class, {
        __index = super,
        __call = function(this, ...) --a call of Class is similar to C++'s new class(...)
            local tmp = {}
            setmetatable(tmp, class)
            if this.new then
            local err = this.new(tmp, ...); -- non-nil return values are exceptions and will be printed
            if err then
            print(err);
            return nil;
            end
            end
            return tmp
        end
    })
    class.__type = typename
    if super and super.__tostring then --einige Metamethods müssen scheinbar von Hand geerbt werden
    class.__tostring = super.__tostring
    end
    class.__index = function(table, key)
        local r = class[key]
        if type(r) == 'function' then
            local f = function(...) return r(table, ...) end
            table[key] = f
            return f
        else
      table[key] = r
            return r
        end
    end
    return class
end


usage:
Code: [Select]

A = class(nil, "A");
A.new = function(this, name) this.name = name end
A.__add = function(this, that) return A(this.name .. that.name) end
A.print = function(this) print(this.name) end

B = class(A, "B")
B.print = function(this) print(this.name .. " is a B!") end

hope it works for you and is usefull:)

54
General / DevIL.dll not found?!?!?!
« on: November 11, 2007, 01:45:33 pm »
Afaik under windows you have to put the DLL somewhere in you PATH or into the execution folder(which is the same if you doubleklick the file, but in IDE's it's not the folder where you store your executable, as this would make it impossible to have release/debug versions at the same time)

if you have /bin/Debug/app.exe(or just /_DEBUG/app.exe, depends on IDE) the DevIL.dll has to be in /.
Thats anyways a good idea under windows as this os lacks a system that can install dependencies for you:)
hope I could help you.

55
Feature requests / File manager
« on: November 08, 2007, 09:17:20 am »
Uh that's nice...ahm may I contribute some code, as I'd really like to see this feature and you could focus on something more interesting.
mfg
Lord Delvin

56
General discussions / Less formats vs less dependencies ?
« on: October 27, 2007, 07:02:55 pm »
Voted yes:

I think it would be good to have less dependencies, but I also think, that, as you are using DevIL, you wont be able to add this dependencies' functionality in an accaptable amount of time, so I wont suggest to move away from devil.

If you have portable code to load and save these formats and to take screenshot, remove DevIL.
Have fun!

57
General discussions / Libraries
« on: October 25, 2007, 08:22:12 am »
Quote from: "Laurent"
Hehe, ok. I should put the exact names of the packages in the tutorials, sometimes it doesn't match the library name, like DevIL.

Or far better would be to make an example line for ubuntu/debian, that would be something like
install:
"sudo apt-get install foo bar"
"sudo make install"
build:
"sudo apt-get install foo bar-dev"
"make"
"sudo make install"

58
Feature requests / Load Image from Font Glyphe
« on: October 22, 2007, 08:31:58 am »
As I will need the ability to create an Image with a single Unicode Glyph on it, I'm asking, if this feature is allready planned or implemented.(I know the FontManager can do this, but the Image itself doesn't provide an interface for that)
If it's not, I would do it with sfml itself so you can easily implement it for 1.2; if you dont wish to implement something like that ever, please tell me as it will make my code better(as I wont hack it into sfml;))
greatings
LordD

59
Window / Reading single key presses
« on: October 21, 2007, 11:05:55 am »
You could fire an event in your system if the key is known to be pressed the first frame and only use that event for calculations.

60
General discussions / [Seeking] Easy 3d-model loading library
« on: October 21, 2007, 11:03:56 am »
I think that too: Look at all pages and try to find a good and complete model loading library. You wont find one, because this is nonsense to write in times, where each new engine brings new features to models(but if I have a look at these features I think time for that will come soon).

But keep in mind, that sfml does not support most of these features, so it's nonsense be able to load such models:)

Write this loader and renderer yourself and I think most people would be thankfull.

Pages: 1 2 3 [4] 5