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

Pages: [1] 2 3
1
DotNet / How to hide the sfml .dlls from my solution explorer?
« on: May 30, 2016, 06:53:00 am »
I tried doing it the normal way by adding the .dll are reference but I got this error:

A reference to the "....dll" could not be added. Please make sure that the file is accessible and that it is a valid assembly or COM component.

I also tried NuGet but it also threw all the .dlls in my solution explorer. When I try to put them in a folder they break and the compiler can't find them.

How do I put the .dlls inside a folder or add them them by reference?


2
DotNet / Re: Poor performance using multiple VertexArray
« on: March 24, 2016, 07:30:24 am »
Quad tree is pointless for tile maps

A QuadTree excels with many static objects that don't move. A tile map is literally perfect for a QuadTree. Even if he's clumping his tiles into giant objects, something he probably shouldn't be doing, a QuadTree would still heavily reduce the amount the draw calls.

and he want's to have full zoom out anyway.

That has nothing to do with spatial indexing. If he wants to zoom all the way, fine, a QuadTree won't help when he's drawing every entity on screen. But for the mast majority of applications you're not zoomed all the way out.

Hapax hit this problem on the head and a QuadTree would be the way to do what he suggested.

"Why are you drawing all 256 chunks that are each 2048x2048?
Surely you only need to draw the one(s) that are actually visible."

3
How do you know when to choose from inheritance from a class, inheritance from an interface, and components?

4
DotNet / Re: Poor performance using multiple VertexArray
« on: March 21, 2016, 09:12:25 am »
You should be using something like a QuadTree to find out what you should be drawing. Have a camera class, get its bounds, and use the QuadTree to query what objects are inside the camera's bounds. You should *never* have a draw loops that just iterates over every entity inside your game.

If you make the code available again (It says I don't have access to look at the repository) I can test your code with a QuadTree.

5
I have an interface that holds the methods needed to invoke the events and the events itself. Is this how you generally use events?

interface MouseInput
    {

        void HandleMousePressed(object sender, MouseButtonEventArgs e);

        void HandleMouseReleased(object sender, MouseButtonEventArgs e);

        void HandleMouseMoved(object sender, MouseMoveEventArgs e);

        event EventHandler OnPressed;
        event EventHandler OnReleased;
        event EventHandler OnHoveredEntered;
        event EventHandler OnHoveredExit;

    }
 

I then have a button class which derives from MouseInput.

Button.cs:

http://pastebin.com/QnyqxwPS

It works with no [known] bugs but it forces you to rewrite a lot of code like how the events are called. This gives flexibility on how you can use the interface but most classes deriving from the interface will want the same behavior (that I wrote in the Button class). And I really don't want to make the interface a class - most classes that would use this functionality will already being deriving from another class (like an Entity class) and I can't derive from more than two classes.

6
The objects in the QuadTree are just references, no? There no actual data stored in the QuadTree. It's all a reference to your objects that are stored in your main gameobject list. So I'm not sure why that would be so bad on memory. I guess I could just have the QuadTree store a reference to the IQuadTreeItem interface, not the object itself. Do you think that would be actually worth it, though? And if I did that I would still have to have a reference of the gameobejct inside the interface... So doesn't that defeat the purpose of the original fix?

Why is that not satisfying when working with higher objects?
The problem I see now with your approach is that you have to check whether an object is already in that list or not since they can occur in multiple nodes.

You have to store an object multiple times if the object is on the edge of the node it is contained in. That's why I check for intersecting instead of contains. If an object is in more than one node then each node that the object intersects must check collision for that object. Because if that object is in  another node then it might be colliding with the objects in the other node.

7
So I was looking over a friend's project, which was a platformer, and he was using input from the RenderWindow itself. And, if haven't already guessed, it didn't work well. I'm not sure what it's called, but when you use input from a window event it has that little pause between the initial invoke and then reoccurring invoke (not sure the exact the words to describe that...) But this can be averted by using an external variable.

So my question is this: would it be best to work around that problem using an external variable? Or is the RenderWindow events best used for things like control/UI? If using an external variable, wouldn't you basically have to write code twice? Once to set the current velocity (KeyPressed) and stop the input velocity (KeyReleased).

8
I'm not sure if you can respond to comments so I'm going to use @.

@Ungod

Why is that not satisfying when working with higher objects?

@Mörkö

Yep, you're right! I changed it. Thanks.


9
Sorry if this isn't the right place to post this. I wasn't sure if "project" meant a full game or a literal meaning of the word.

Hi! After working on it for a few days I think I have a bug free dynamic QuadTree.

Github link: https://github.com/asusralis/QuadTree-for-SFML.NET

I would love suggestions to speed up its performance. I recently just made the remove method faster by having each object keep a list of references to all nodes its contained in. That made dynamic objects preform a lot better.

Also, this is my first Github project so I'm not sure if I set it up correctly. =/


10
General / Re: C# intellisense suggestion/request.
« on: March 06, 2016, 06:24:48 pm »
Thanks, that actually gave info. It has to be a bug - the constructor that comes up is the Vector2f one but it acts like it's the float one. I'll submit it.

Also, I assumed it was SFML's fault because I've only seen this happen twice before - for FloatRect and IntRect.

11
General / Re: C# intellisense suggestion/request.
« on: March 06, 2016, 05:52:10 pm »
I'm not sure if you don't know what I'm asking for or you're implying you have no control over this. Can you please explain?

12
General / C# intellisense suggestion/request.
« on: March 06, 2016, 01:52:11 pm »
Hi! I work with FloatRects a lot and I have a request. The intellisense default for their constructor is a float when I feel like it should be a Vector2f. If the programmer intends to use its float constructor he would simply type in a number followed by an 'f'. But if you intend to use the Vector2f constructor (which requires two) you have to type the first one in manually.

I know how this might sound very pedantic but when you're playing with FloatRects a lot you waste a lot of time expecting a Vector2f but getting a float and then having delete 'float' and typing it in manually.

Here's a quick video I made if you don't understand what I'm talking about:
https://dl.dropboxusercontent.com/u/65017464/ShareX/2016/03/500.mp4

Thanks! Really enjoying SFML.net.



13
Although I don't see why the hostility (and see why people usually talk ill about these forums...) I thank you for the help. Now to make all of this work by myself!

14
Right. But I do want to use the Window's context menu. That's what I'm trying to figure out how to do. The two people who replied to me pushed me in the right direction but I'm not actually sure how to do it. There's next to none on the web about this.

15
I'm not sure how to wrap SFML's window or embed SFML into a Form. Do you mean to make a Form project and ignore the actual Form? Because I've been trying this but I'm not sure what to pass.

For the life of me I can't figure this out. Sadly there is next to nothing on the internet that has much on this (or NativeWindow). When you mean intercept the control do you mean SFML takes the info passed and uses it itself? How is the contextmenu/button/whatever form object is actually drawn?

Is this something that isn't supposed to happen? I.e is it better to just make my own UI system in SFML or it common for an application to use its own render window but use form elements?

Pages: [1] 2 3
anything