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

Pages: [1]
1
Python / Re: texture rectangle not working
« on: November 26, 2014, 11:03:54 pm »
(Sorry for not being able to provide now a full working example.)

What I do:

o_texture = sfml.Texture.from_file(s_file)                       # Full image texture loaded from disk
o_sprite = sfml.Sprite(o_texture)                                # Creating a sprite from the texture
o_sprite.texture_rectangle = sfml.Rectangle((10, 10), (50, 30))  # "cropping" only the rectangle I want from the full texture

Of course this is a basic example and you should do it with proper coding to keep your texture "alive".

Hope it helps.

2
Python / Re: pySFML discontinued?
« on: November 12, 2014, 07:52:06 pm »
Thank you for your answer and, above all, thank you for pySFML. I've been using it a short time but I really like it: very powerful and simple to use.

Keep the good work even when there are no frequently updates ;)

3
Python / Re: pySFML 1.3: UTF-8 characters?
« on: November 12, 2014, 07:48:02 pm »
Sorry for my late reply, Sonkun. I've been really busy lately with real life issues.

I didn't know a "simple" encoding problem could be so complicated and I really appreciate your explanation. Unfortunately I think I'll leave my project parked at least until next year. If the problem is still there I'll try to compile pySFML.

Thank you very much and regards

4
SFML projects / Re: PyFe v2.0
« on: October 07, 2014, 08:23:20 pm »
Even when the original hardware drew everything by software and the resolution was low, it would be great to have that advantage in the emulator. Of course there's no big advantage for 320x200, but maybe it could be helpful in games which allow VESA modes (thinking about Duke Nukem 3D now...).

5
Python / pySFML 1.3: UTF-8 characters?
« on: October 07, 2014, 07:30:57 pm »
During last week I've been strugling to draw UTF-8 characters on screen without success. I've tried with different encodings in the unicode string (u'aá eé ií oó uú') and combinations with and without # -*- coding: utf-8 -*- at the beginning of the code. The best thing I obtain are squares or interrogation marks instead of the special characters.

Any idea about what should I add or change?

Regards and thanks in advance.

My setup is:
  • Linux Mint 17
  • pySFML 1.3.0
  • Python 2.7.6

And for testing purposes here is my code:

# -*- coding: utf-8 -*-

import math
import sfml

o_window = sfml.RenderWindow(sfml.VideoMode(480, 300), 'PyFe v2.0')
o_window.vertical_synchronization = True
o_window.framerate_limit = 30

o_font = sfml.Font.from_file('/usr/share/fonts/truetype/freefont/FreeSerif.ttf')
o_color = sfml.Color(255, 0, 0)

o_text_ascii = sfml.Text(u'aá eé ií oó uú')
o_text_ascii.color = o_color
o_text_ascii.font = o_font

f_angle = 0

o_rotation = sfml.Transform()
o_rotation.rotate(0.5)


def position(f_angle):
    i_pos_x = 200 + 150 * math.sin(f_angle)
    i_pos_y = 120 + 100 * math.cos(f_angle)

    return i_pos_x, i_pos_y


# Main loop
while o_window.is_open:

    # Handle events
    for event in o_window.events:
        # window closed or escape key pressed: exit
        if type(event) is sfml.CloseEvent:
            o_window.close()

    # Updating
    f_angle += 0.05
    o_text_ascii.position = position(f_angle)

    # Rendering
    o_window.clear(sfml.Color(50, 200, 50))
    o_window.draw(o_text_ascii)

    o_window.display()
 

6
SFML projects / Re: PyFe v2.0
« on: October 07, 2014, 07:18:07 pm »
I didn't know that DosBox didn't have any kind of graphical aceleration. It's a shame but anyway I just use it for really old games. During the transition from 486 to Windows 95-98 I didn't have PC at all so I don't miss games from that era.

And glad you like PyFe v2.0 ;)

7
SFML projects / PyFe v2.0
« on: October 04, 2014, 06:53:07 pm »
I've been working in my free time during last year in an emulator game launcher called PyFe v2.0. At the beginning I was using pygame until I realised I needed hardware aceleration to work in HD resolution.

The main feature is all the graphical elements are based on a plugin system. So the general look of the application can be easily changed.

Here you can see a video of the program running:


8
Python / pySFML discontinued?
« on: October 04, 2014, 06:36:36 pm »
Hi to everybody, this is my first post here.

I've been using pySFML for a couple of months in my personal project, an emulator front-end/launcher (link), and today I realised the last time it was updated was 27th May of 2013. So I was wondering if the project is discontinued.

Regards


Pages: [1]
anything