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.


Topics - eyeliner

Pages: [1]
1
SFML projects / [WIP - Not playable] UnNamed Tiny RPG
« on: January 06, 2015, 11:56:27 pm »
Hi.

First of all, hi guys, I've been working and honing my skills in C# programming using SFML.net and this is what I have (Disregard the red uppermost part):


This is a simple and fast RPG with all coding and assets done by me. It will be an RPG in the vein of candy box, but with some differences to make it a bit quicker to start, quest and finish in its entirety.

You will never control the character directly, you'll just point to where he will go and watch him succeed or fail.

So, on to the more technical stuff:
I have no artistic skills whatsoever and I could vastly improve my coding but I'm following (at least trying to) the NES system restrictions regarding resolution, colors and amount of sprites/colors on screen.
I have a game state system in place, but I am not sure it's ideal/the best, but it is working.

I have been able to learn A LOT and I'm almost at the point where I can search for help on most topics autonomously because I know the terms used in C# (like what is inheritance and those other things).

SFML.Net has become quite a learning tool and, even if I get nowhere with my tinyRPG, at least I improve my knowledge.

More to come. Eventually. Or if any of you ask stuff. :)

EDIT:
I've fixed the blurry text, though it's not quite there yet, as you can see in the top of the "E" in "Enemy".

2
DotNet / Adding a "Tag" to a sprite: Possible
« on: August 12, 2014, 05:22:48 pm »
First, I'll explain what I want to do:

I'm currently using lists to store my sprites, so that I use a foreach loop and draw all the items in a List<Sprite>.
It works great. For drawing, of course.

Thing is, if I want to do anything more to them, say like test if the mouse is over one specific sprite.
It would be great if there's a way to add a tag (or something, for that matter), that we could use to differenciate the sprites, using a list would be even more great.

In my case, I'm specifying the index of a sprite on the list to shutdown my app. Ok, I can live with it.
But when the app grows (and I intend on doing something very much mouse based), it would be great if I could do something like:

foreach (Sprite s in sprites)
    if (s.GetGlobalBounds().Contains(mouseX, mouseY)&&s.Tag =="whatever")
        {
                //Do something
        }
 
I'm really not sure about the difficulty in implementing such a thing and if a thing exists, I apologise. If it is something that can be added by anyone less enlightned (like myself), I surely wouldn't mind doing it.

Can anyone tell me? Thanks.

3
DotNet / window.draw() to draw multiple sprites?
« on: July 19, 2013, 01:09:25 pm »
First and foremost, I am quite dumb, but I'm still learning, and love every second of it. :)
I hope you don't find this question too dumb. :p

Is this possible?
I have the following code on Main():
            string newImage1 = "textures\\1.png";
            Sprite sTexture1 = createSprite(newImage1, window, new Vector2f(95, 95), new Vector2f(50, 50));

            string newImage2 = "textures\\2.png";
            Sprite sTexture2 = createSprite(newImage2, window, new Vector2f(95, 95), new Vector2f(500, 400));
And the method called:
        private static Sprite createSprite(string image, RenderTarget window, Vector2f origin, Vector2f position)
        {
            Sprite sTexture1;

            //Load a texture and make a sprite
            Texture texture = new Texture(image);
            sTexture1 = new Sprite(texture);

            //Set the origin to it's center
            sTexture1.Origin = origin;

            //Set the position to the center of the screen
            sTexture1.Position = position;
            return sTexture1;
        }

Then, in the game loop, I have to call window.draw to each sprite (makes sense), but is there a way to make only one window.draw to draw all the sprites?

I just remembered arrays/lists, but I'd have to make a for loop, and I don't know how that would be performance wise...

Pages: [1]
anything