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

Pages: 1 [2] 3 4
16
Graphics / Am I changing the view correctly?
« on: July 08, 2011, 01:29:14 am »
no

sf::FloatRect(left, top width, height);

so 1px => sf::FloatRect(0,0,x,y)

17
Python / Error Building the PySFML2-cython Bindings
« on: July 08, 2011, 01:24:11 am »
Quote
C:\MinGW\bin\gcc.exe -mno-cygwin -mdll -O -Wall -IC:\Python27\include -IC:\Python27\PC -c sf.cpp -o build\temp.win32-2.7\Release\sf.o


it doesn't speak about a -I C:/Program Files ..... path, so mingw don't use it.
you may need to edit the setup script, or make a link from your SFML include and libs to your mingw installation ;) .

18
SFML projects / Groogy's Game Engine
« on: July 05, 2011, 10:50:41 pm »
Your engine is amazing and awesome :o . but why a ( const sf::Uint32 aDelta) in void Update in you 2nd video ? a ( const sf::Uint32& ) or a (sf::Uint32) is enought no ?

(no parameter name, because you don't use it)

19
General discussions / A new logo for SFML
« on: July 05, 2011, 10:36:58 pm »
just awesome, @Nexus, @Haikarainen and any other who has participated to this last one  :wink: .

+1 for you.

20
Graphics / Share your collisiondetection techniques!
« on: June 30, 2011, 10:31:52 pm »
Quote

Hehe yup, thats why i created this thread. I guess anything goes, but my specific thought was regarding game-development. Like platform, top down, anything from box to pixel perfect.


To summary, anythings  :D .

I'll try later if I'll recall this post, but you can use google search code to find the heaven door ;) .

21
SFML projects / [RELEASED] SFMLUploads.Org
« on: June 30, 2011, 10:29:30 pm »
:cry: , it provides a better file management than the most part of the file hosting  :'( (without dropbox, but it's heavy and doesn't have code or picture hosting).

22
Window / Resize event behavior
« on: June 28, 2011, 08:25:35 pm »
It depends of the system ;) . For exemple my gnome3 only trigger one resize event when I resize a window

23
SFML projects / Groogy's Game Engine
« on: June 27, 2011, 11:41:13 pm »
I've used a singleton derived pattern for me (that support polymorphism i think, not tried), because i need a perfect control on what i singlelise :

Code: [Select]


Obj singleton;
SharedInstance(singleton);

SharedInstance<Obj>()->DoThat();

Obj singletwo;
SharedInstance(singletwo);
...



I agree with Groogy. although it's a C-like behavior, you need external memory management, because devs could need it and could be stopped by this leak.

But i don't manage it itself, I prefer let the user destroy it, or use a GTK-like Garbage, but with more semantics :

Code: [Select]

template<typename T>
class Garbage
{
public:
    virtual ~Garbage();
    T& Manage(T*); // I use reference, because the other code use reference, not a Qt like system
private:
    std::vector<T*> m_Objects;
};

class GuiHandle : public Garbage<Widget> // GuiHandle can manage memory destruction for widgets object
{

};


I hope you understand me  :oops:

24
Clash : no, RenderImage has only a FBO (frame buffer object) managed by openGL ;) .

25
General / Questions about game programming
« on: June 25, 2011, 02:16:48 pm »
You have to keep a shared  "shema position" of the items between your characters (or indicate were they are separatly), but keep in mind that it's a heavy feature, so a strong solution can be the solution to implement.

26
Graphics / move sprite in the opposite direction and bullet problem
« on: June 24, 2011, 07:42:49 pm »
99.9% of programming errors are between the chair and the screen  :lol:

27
General / Questions about game programming
« on: June 24, 2011, 12:44:13 pm »
here 4 schemas : (i'm not a real artist ^^)
http://dl.dropbox.com/u/12423314/tuto%20pathfinding/1-initial.svg
http://dl.dropbox.com/u/12423314/tuto%20pathfinding/2-first%20path.svg
http://dl.dropbox.com/u/12423314/tuto%20pathfinding/3-path%20found.svg
http://dl.dropbox.com/u/12423314/tuto%20pathfinding/4-explanations.svg

this algorithm is a graphnode.

the first thing to do is to find a polygon on the line from the start point, to the end point. (your "first" node)
Next, you need to circle the obstacle, so you find the segment, you create 2 nodes for the 2 points of the segment, and you place a distance equal to the radius of your shape on the 3 positions ( before, next to, after, schema 4 ) you've got by :
Code: [Select]


px => the segment point
pi => intersection point
p1, p2, p3 => the solutions
r => shape radius


if px.x > pi.x AND px.y < pi.y THEN

#  \  -----  pi
#   \        / we need that path
#    \  px
#   extend the straight line (pi;px) and find the point p1, extend the adjacent straight line, and find the bisector between them
   
p1.x = px + r
p1.y = px.y + r

p2.x = px.x +r
p2.y = px.y +r

// used to test if next position is valid
p3.x = px.x - r
p3.x = px.y + r


// and you always test if p1/p2/p3 is in a polygon


I know it's very expensive and do better, but i'll optimise after. There's also a problem because the radius is larger and is on the segment (p1, p2) and (p2, p3), but it's nearly nothing.

I may have done english mistakes (i'm French), and mathematics mistakes (i'm 15) so check all that on the paper ;) .

In addition, i use for the polygon a powerful class of my engine, and use a context to save them and use them in a query.

28
Graphics / Is there a way to change one colour in a sprite?
« on: June 23, 2011, 07:24:22 pm »
groogy : for the photoshop case it's better to use a per-pixel mask (a image that mask another one, somebody has already implement that on the forum, but i forgot who).

29
General / Questions about game programming
« on: June 23, 2011, 01:32:17 pm »
If you want to do a point&clic rpg, you need 3 things :
1) like you said, you have to ensure the player don't clic in a obstacle zone, but in addition, that the player will have the space to get there.

2) Moreover, obstacles can exists between the start point and the end point, you need to consider them and make a pathfinding query between these points.

3) Then, you have to ensure no obstacle will walk on the path your query had done, considering the size of your object.

I'm programming a library that does all that for my engine, and have finished the algorithm (but not the 3) ).
If you want, I can post them with diagrams, formulas and explanations.

30
SFML website / [Suggestion] Favicon
« on: June 22, 2011, 06:29:26 pm »
Now, my firefox loves you  :D  thank you very much.

Pages: 1 [2] 3 4