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

Pages: [1]
1
C / CSFML for Ubuntu Lunar Lobster
« on: October 02, 2023, 05:02:34 am »
Hi SFML community,

I have recently been forced to upgrade my Ubuntu version to Ubuntu 23.04 Lunar Lobster (x86-64).

I'm having a hell of a time trying to install CSFML on my system (SFML binaries from www.sfml-dev.org work fine). The packages I downloaded using Synaptic Package Manager / Apt were empty and I cant figure out how to install from source.

Is there any way that I can get hold of the CSFML headers and binaries that were available in apt with a previous version of Ubuntu? Does anyone have the headers and binaries they can send me?

Kind regards,
Boston

I downloaded the software objects from https://packages.ubuntu.com/search?suite=kinetic&searchon=names&keywords=csfml and got the headers from the csfml source code, and all is well.

2
Graphics / Re: Sprite gets mirrored?
« on: July 08, 2018, 11:17:01 am »
I have.

3
Graphics / Sprite gets mirrored?
« on: July 08, 2018, 08:25:12 am »
How come when I use sfTexture_copy everything goes as expected,
But if I create a Sprite based on the source texture and draw it to a RenderTexture that contains the destination texture, the result is a mirror image of what I was hoping for.
I can work around this by setting the y-scale of the sprite to -1 but I'd like to know why this behavior occurs in the first place.

4
C / sfCircleShape_setOrigin();
« on: March 21, 2016, 07:59:49 am »
Ive been experimenting, trying to get sfRenderWindow_drawCircleShape() to work,
it does work, but the function sfCircleShape_setOrigin() accepts coordinates that are scaled and negated.

eg.
#include <time.h>
#include <SFML/System.h>
#include <SFML/Graphics.h>
#include <SFML/Window.h>
#include <stdio.h>
#include <math.h>
#include <stdlib.h>


int main(void) {
    #define SCREEN_HEIGHT 300
    #define SCREEN_WIDTH 400

   
    sfVideoMode mode = {SCREEN_WIDTH, SCREEN_HEIGHT, 32};
    sfRenderWindow *window = sfRenderWindow_create(mode, "SFML window", sfResize | sfClose, NULL);



        sfCircleShape *SelectedCircle = sfCircleShape_create();
        sfVector2f scale;
        scale.x = 1;
        scale.y = 0.5;
        sfCircleShape_setScale(SelectedCircle, scale);
        sfVector2f origin;
        origin.x = -150;
        origin.y = -150;
        sfCircleShape_setOrigin(SelectedCircle, origin);
        sfCircleShape_setRadius(SelectedCircle, 100);


        sfCircleShape_setFillColor(SelectedCircle, sfTransparent);
        sfCircleShape_setOutlineColor(SelectedCircle, sfCyan);
        sfCircleShape_setOutlineThickness(SelectedCircle, 5.0);
   
    sfRenderWindow_clear (window, sfColor_fromRGB (255,255,255));
        sfRenderWindow_drawCircleShape(window, SelectedCircle, NULL);
        //sfCircleShape_destroy(SelectedCircle);

    sfRenderWindow_display(window);
    while (1) {}
}

produces something like the attached image.

5
Graphics / Re: textures blending
« on: June 29, 2015, 03:04:56 pm »
Thats OK, what you described is what I have been doing.
I have been doing many small experiments of what I need for my engine,
although I wouldnt expect to produce a commercial-grade product in like five years.
Working things out for myself is something i excell at,
but I was hoping some pro would swoop in and give me an easy answer.

Its annoying having to convert between textures and rendertextures.
I may decide to switch to a different media library.

Wotevs OK have nice day.

6
Graphics / textures blending
« on: June 29, 2015, 01:22:40 pm »
I am experimenting with 2d isometric game worlds.
I am using csfml.
I currently only have one texture for the ground which is just grass.
I have a texture that represents the area that is visible.
I have a texture that represents the area that has been explored.
I want to blend them so to give the actual texture to display.
The attachment shows the results i would like to acheive.

I would also like to blur/fade the edges of the light and dark regions.

Pages: [1]
anything