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

Pages: 1 ... 3 4 [5]
61
General discussions / Re: Developing a code edit box with sfml
« on: August 27, 2014, 09:05:05 pm »
Thanks for the answer. The control I'm looking for strives for flexibility and might have features similar to sublime text's one (i.e. multiple carets, drawings here and there, etc...) so implementing all those features as hacks for existing controls sounds like suicide to me (maybe I'm wrong though). I thought of Cairo in the first place since GTK+ (newer versions) uses it, but it seems porting to win32 isn't that great and I would have to rewrite the controls in something that works on Windows.

I'm a newbie in this field though and I might be getting something wrong.

Well as Laurent suggested, definitely sounds like a job for GTK to me. Actually developing a fully working flexible GUI (like in Sublime text) with SFML sounds like suicide to me. Thankfully we have Gwen, TGui and SFGui so if you really want to take the SFML road take a look at those. I don't really understand what you mean with porting to Windows. Gimp is built on GTK and works great on Windows?

Believe me, building a decent Gui with 2d library is pain in the ass. That's why they usually tend to be projects on their own, like the ones I mentioned.

62
SFML projects / Re: A Particle Simulation project, custom console update
« on: August 22, 2014, 12:56:53 pm »
Beautiful! I love these kinds of projects.

63
General / Re: im completely lost on Camera movement in SFML C#
« on: August 22, 2014, 12:52:36 pm »
In your update method, do:

 
                if (Keyboard.IsKeyPressed(Keyboard.Key.W))
                {
                    View view = window.GetView();
                    view.Move(new Vector2f(0, -1));
                    window.SetView(view);
                }

Remember to set the modified view for window!

64
DotNet / Re: Adding a "Tag" to a sprite: Possible
« on: August 13, 2014, 02:04:46 pm »
He is referring to splitting your class into logical components as in Component pattern.

The simplest practical example would be:

 
public class MySprite
    {
        // this is the sfml sprite
        public Sprite Sprite { get; set; }

        public string Tag {get; set;}

        public MySprite()
        {
        }
        public MySprite(Texture t)
        {
            Sprite = new Sprite(t);
        }
    }

 
MySprite spr = new MySprite(new Texture("..."));

65
General / Re: I have a game in mind but...
« on: August 12, 2014, 09:31:08 am »
...
Do I just make the whole map in photoshop and load it as one big sprite, then set custom point boundaries for the buildings and stuff? Or..

That could work, but you would have to split the photoshop image into smaller parts if your texture is exceptionally large. The maximum size of texture you can load depends on the graphics card. I generally avoid having textures larger than 1024x1024. I'd say it's probably not worth the hassle.

If tilemaps are out of the question you'd really want to create the terrain from polygons, either randomly generated or with use of tool capable of creating polygons. Pretty much any 3d modeling software can export into .obj file which are really easy to parse into SFML Vertex arrays. Collidable and all special objects you could handle with sprites.

Here's an interesting read http://www-cs-students.stanford.edu/~amitp/game-programming/polygon-map-generation/

66
General / Re: Deciding on a language
« on: August 11, 2014, 11:07:40 am »
I thought I'd chip in and offer my point of view, not necessarily for you but anyone. If you are looking forward to working in the IT industry you might want to think what language would benefit you the most. For example, most of the programming job advertisements I see around here is C# or Java. Back when I was studying I did most of my side projects in C# (XNA, SDL.NET, OpenTK and now SFML.NET) because that's what I thought to be the most benefitial to me. Besides I already knew some C++ so C# was natural choice for me.

I still stick to C# mostly for desktop projects because that's the language I personally enjoy the most and that's what I do for living.

67
DotNet / Re: Sprite following Mouse && Mouse.Pos == Sprite.Pos ?
« on: August 10, 2014, 05:15:46 pm »
Wouldn't the cursor appear on the window if your using
Mouse.SetPosition(x,y, window)
?

Anyways you want to take your view into account aswell incase you someday want to move the view.

float x = sprite.Position.X - window.GetView().Center.X + window.GetView().Size.X / 2;
float y = sprite.Position.Y - window.GetView().Center.Y + window.GetView().Size.Y / 2;
Mouse.SetPosition(new Vector2i((int)x, (int)y), window);

Plus, remember to set origin for your sprite.

68
SFML projects / Re: Feedback wanted - Simple Gravity Game.
« on: August 10, 2014, 02:49:34 pm »
Nice little game. Going through the levels is mostly just trial and error which is not necessarily a bad thing. As for the music, I think some slower tempo chiptunes might fit the minimalistic style of the game.

69
DotNet / Re: [Rookie] FormatException Build Error - Setup Try
« on: August 09, 2014, 05:58:52 pm »
If you're using x64 libs make sure your project's build configuration is set to x64 from configuration manager (it's Any cpu by default)

70
DotNet / Re: csfml-system-2 missing from .NET sources
« on: August 07, 2014, 09:06:10 am »
Grabbed csfml dlls from nightly builds which seems to work fine, atleast for now.

71
DotNet / csfml-system-2 missing from .NET sources
« on: August 06, 2014, 06:32:41 pm »
Hi

I downloaded SFML.net sources to have the latest version because of this bug: https://github.com/SFML/SFML/issues/526

However, built apps won't work because extlibs https://github.com/SFML/SFML.Net/tree/master/extlibs/x64
is missing csfml-system-2.dll

Pages: 1 ... 3 4 [5]
anything