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

Pages: [1] 2
1
SFML projects / [RELEASED] SFMLUploads.Org
« on: June 15, 2011, 11:37:13 pm »
I found a display bug: just search for " " or "ksks" and you see it.

And to make the search box a bit more user friendly:
Code: [Select]

<form method="post" action="index.php?page=search">
<input id="searchbar" value="Search.." type="text" name="q"
     onfocus="if (this.value == 'Search..') {this.value = '';}"
     onblur= "if (this.value == '') {this.value = 'Search..';}"/>
</form>

2
General / SFML 2 - Cmake problems
« on: June 13, 2011, 06:32:48 pm »
Quote from: "Laurent"
The clean solution is to make your compiler tools available

Of course you're right but it is quite useful if you have 32 & 64 bit compiler.

And before he gives up ...

3
General / SFML 2 - Cmake problems
« on: June 13, 2011, 06:23:10 pm »
Maybe you should add one more screen to the tutorial which shows, what you have to do if cmake couldn't find the compiler.
Enter it yourself!
Example:
http://projectbase.pr.funpic.de/cmakeCompiler.JPG
Just enter all these paths

4
SFML projects / Thor C++ Library – An SFML extension
« on: June 13, 2011, 04:30:34 pm »
Quote from: "Nexus"
Yes, the assertion should prevent you from adding an already added emitter by accident.

Ok.

I have another Problem :?
I don't know if this is a thor or sfml bug.

But the following Code doesn't copy the Image because image2.Copy check if image2 is not 0 (Width,Height) which it is after construction.
Code: [Select]
sf::Image image;
if (!image.LoadFromFile("Media/particles.png"))
  return EXIT_FAILURE;
sf::Image image2;
image2.Copy(image,0,0,sf::IntRect(0,0,32,32));


So this causes a problem with:
Code: [Select]
thor::ParticleSystem system(image,sf::IntRect(0,0,32,32));
which tries to copy the Image in a new constuctet one

5
SFML projects / Thor C++ Library – An SFML extension
« on: June 12, 2011, 02:35:53 pm »
Quote
you don't need to call Emit() directly

mh
The Problem:
I want to emit particles on an event but just for a certain time.  And i thought that adding and removing(auto) emitters from the system isn't the best way to do this. So I searched for a fire, start func.
Problem with AddEmitter is that it causes a assertion fail if it is called to fast(as long the emitter is emitting) with the same emitter

6
SFML projects / Thor C++ Library – An SFML extension
« on: June 12, 2011, 02:05:53 pm »
Shouldn't it be "affector" instead of "emitter"? in
include/Thor/Particles/Emitter.hpp, line 147
Code: [Select]
00147 void AddAffector(Affector::Ptr emitter, const RemovalTrigger& trigger);

---
Shouldn't this work?:
Code: [Select]
thor::ParticleSystem system(image);
...
thor::TargetEmitter::Ptr temitter( new thor::TargetEmitter(200.f, 2.f) );
...
temitter->Emit(system,10.0f); //Error

Error:
Code: [Select]
 'thor::Emitter::Adder' is an inaccessible base of 'thor::ParticleSystem'
Or did i misunderstood there something?

---
Quote
Okay, it is now easier :D

Ah this Copy Funktion looks nice and easy

7
SFML projects / Thor C++ Library – An SFML extension
« on: June 11, 2011, 09:06:47 pm »
Quote from: "Nexus"
My thought was that every emitter keeps an own zone, independent of other emitters. I thought shared ownership might have been less intuitive, what do you think?


I'm not really into shared & moved pointer.

I am also of the opinion that it is more intuitive if every emitter has it's one zone. But if you want to make an really cool effect than more emitters are in the same zone and it might be easier if you have a shared zone.

Maybe you should implement both, this means that we can choose on constuction and/or later if the emitter has it's own zone or if it uses a shared one.
Then it's possible to constuct for example 3 emitters with a shared zone, and later I can say now i want emitter 1 to have its own zone to modify this and not modifying the other ones.

Edit:
Well, I saw that it isn't that often that two emitters use exact the same Zone, so for me it's fine how it is now.

8
General discussions / mmorpg server question
« on: June 11, 2011, 08:22:14 pm »
Other posibility:
The Server sends just every X Game Tick the positions(same area) to the player + the direction they are walking, attacking?, action, what they are doing...
Then the client calculates the movement,... of these players and if it gets new positions it correct the self calculatet positions.

In addition you can give closer players a higher priority and send these data more often.

9
SFML projects / Thor C++ Library – An SFML extension
« on: June 11, 2011, 07:51:02 pm »
Quote from: "Nexus"
... its output is twice "T".


Because:
Code: [Select]
#include <iostream>

template <typename T>
void Func(T)
{
    std::cout << "T" << std::endl;
}

template <typename T>
void Use()
{
    Func(T()); //AT THIS POINT
}

void Func(int) //it doesnt know this func so it calls the top one, by putting this before use it should work
{
    std::cout << "int" << std::endl;
}

int main()
{
    Use<double>();
    Use<int>();
}



OT: Is there a reason why i can't use one Zone (thor::Emitter::ZonePtr) for two emitters(thor::TargetEmitter::Ptr)? -> Assertion fail !IsNUll() : include/Thor/Detail/SmartPtrImpl.inl, line 210

10
SFML projects / Thor C++ Library – An SFML extension
« on: June 11, 2011, 03:42:04 pm »
Shame on me  :(

Made the same mistake: wrong library dependency order

Now everything works
Thanks

11
SFML projects / Thor C++ Library – An SFML extension
« on: June 11, 2011, 01:04:50 pm »
Thor: 1.0 (not precompiled ) (maybe i should try the svn version)
Sfml: The recommended one (from the Thor website)
OS: Win7 64bit
Compiler: MingW (g++ 4.5.1)  ( :oops: )

SFML Opengl example works with dynamic linkage.
with static linkage i get a bunch of undefined reference errors, and i don't know what to link to

if i try to static linkage thor i get some undefined references to:
Code: [Select]
glOrtho@48
glTranslatef@12
glTranslatef@12
glRotatef@16
glTranslatef@12
glColor4ub@16
glTranslatef@12
glRotatef@16

And right now I link to libopengl32 and libglu32

12
SFML projects / Thor C++ Library – An SFML extension
« on: June 11, 2011, 10:55:33 am »
Realy nice Nexus!

Thanks

But:
1. I think you use a outdatet version of mingw (current gcc version: 4.5) (but who cares :) )

2. I tried the particles demo and it works, but in debug mode i get an error but the app ist not crashing.

Debug: http://projectbase.pr.funpic.de/ThorDebug.JPG (even the sf:text looks  :?)
Release: http://projectbase.pr.funpic.de/ThorRelease.JPG

3. And in both cases the app crashes on exit.
[Edit]
 3. Fixed, Ah it was the ati bug with dynamic linking but the debug error still exists
[/Edit]

@Beliar:
Get them too
But they are fixed easily

13
SFML wiki / Get ip adress from php page.
« on: February 26, 2011, 05:52:24 pm »
There are already functions which get the ip:
Code: [Select]
sf::IpAddress::GetLocalAddress();  // my address on the local network
sf::IpAddress::GetPublicAddress(); // my address on the internet

14
General / How to write text on screen - SFML2
« on: February 26, 2011, 04:09:38 pm »
Code: [Select]

sf::Font    font;
sf::Text    text;
if(!font.LoadFromFile("verdana.ttf")){
    //error
}
text.SetFont(font);


All about text:
http://www.sfml-dev.org/documentation/2.0/classsf_1_1Text.htm

15
Window / Skip resize event
« on: February 26, 2011, 03:51:06 pm »
Code: [Select]
sf::RenderWindow window(sf::VideoMode(800, 600), "SFML window");

    int count = 0;
    while (window.IsOpened()){
        sf::Event Event;
        while (window.GetEvent(Event))
        {
            if (Event.Type == sf::Event::Closed){
                window.Close();
            }else if (Event.Type == sf::Event::Resized){
                count++;
                std::cout << count << std::endl;
            }
        }
    }

    return EXIT_SUCCESS;


This code should output 1 on the first resize?
I got more.

Can someone test it?

Pages: [1] 2
anything