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

Pages: [1]
1
General / Adding GetX and GetY to drawable
« on: August 13, 2010, 10:35:11 pm »
I haven't put this as a feature request because I don't know how important it is to anyone else.

I'd like to have GetX() and GetY() methods in drawable because it then provides symmetry with the SetX() and SetY() methods which then can translate to properties in my scripting language (does that make any sense)

If I subclass drawable to add these then that won't work for Sprite, Text, Shape as of course they inherit from Drawable not my new Drawable.

Is there a sensible way to do this without modifying the SFML source?  Or is adding these methods to sf::Drawable directly the only real way to do it.

Any pointers on this would be great.


Cheers
Nick

2
General / Errors on exit with SFML2 examples
« on: May 02, 2010, 11:44:10 pm »
I've built the SFML2 libraries and examples from the code::blocks project (why can't we have MinGW makefiles??).  They run fine but have errors on exit (this program needs to be closed etc.,).  

This looks like a return of the bad old default font error that I thought I read was fixed.  Is there something I'm doing wrong here, or has it returned and will be fixed before the official release of SFML2?

Running Windows 7 if that makes a difference.

Cheers,
Nick

3
Network / SocketUDP::Receive Buffer
« on: June 09, 2009, 11:57:39 pm »
Being new to this low level network programming there is something I'm not 100% clear on here and I have an inkling its causing me big performance problems.

I can't use the sfml Packet because all the SFML functions in my engine are wrapped in Lua and Lua doesn't have a suitable method of packing data into a Packet, so I've written my own lua equivalent and then use the raw reads and write to send it.  It works but its very slow and unreliable even on a LAN.

ANYWAYS, because I don't know how big the received data is I've made a buffer that is bigger than I'd ever expect it to be (4k!!) and then called receive as usual:


Code: [Select]
Socket.Receive(Buffer, sizeof(Buffer), Received, Sender, Port

Is there a performance hit by using large buffers even if the packet are  the same size (about 20 bytes, rather than 4096 that is the size of the buffer)?    Is the rest of the buffer filled with undetermined data or does it wait until the buffer is filled before returning a full 4096 bytes worth of data?  Is it automatically a null terminated char array thats received or should the sender ensure that a null character is added?  is the null character even taken into account?

I'm lost and confused.

Nick

4
General / SFML on a Mac using gcc instead of xcode
« on: April 19, 2009, 07:22:05 am »
Is this possible, or is there another good solution to development on a Mac.  Basically I'm using Netbeans for the Windows and Linux ports of my project and would love to be able to use NetBeans for the Mac port to keep everything as similar as possible.

I'm making some progress I think, but I'm drowning in dependency hell trying to get it to link properly.  I think the amount of errors relating to Cocoa mean I'm missing something critical.

Code: [Select]
Undefined symbols:
  "sf::priv::WindowImplCocoa::WindowImplCocoa(void*, sf::WindowSettings&)", referenced from:
      sf::priv::WindowImpl::New(void*, sf::WindowSettings&)in libsfml-window-s.a(WindowImpl.o)
  "_CGDisplayCurrentMode", referenced from:
      sf::priv::VideoModeSupport::GetDesktopVideoMode()     in libsfml-window-s.a(VideoModeSupport.o)
  "_CFArrayGetCount", referenced from:
      sf::priv::VideoModeSupport::GetSupportedVideoModes(std::vector<sf::VideoMode, std::allocator<sf::VideoMode> >&)in libsfml-window-s.a(VideoModeSupport.o)
  "_CFDictionaryGetValue", referenced from:
      sf::priv::VideoModeSupport::GetDesktopVideoMode()     in libsfml-window-s.a(VideoModeSupport.o)
      sf::priv::VideoModeSupport::GetDesktopVideoMode()     in libsfml-window-s.a(VideoModeSupport.o)
      sf::priv::VideoModeSupport::GetDesktopVideoMode()     in libsfml-window-s.a(VideoModeSupport.o)
      sf::priv::VideoModeSupport::GetSupportedVideoModes(std::vector<sf::VideoMode, std::allocator<sf::VideoMode> >&)in libsfml-window-s.a(VideoModeSupport.o)
      sf::priv::VideoModeSupport::GetSupportedVideoModes(std::vector<sf::VideoMode, std::allocator<sf::VideoMode> >&)in libsfml-window-s.a(VideoModeSupport.o)
      sf::priv::VideoModeSupport::GetSupportedVideoModes(std::vector<sf::VideoMode, std::allocator<sf::VideoMode> >&)in libsfml-window-s.a(VideoModeSupport.o)


Any ideas?

Cheers,
Nick

5
General / Contributions
« on: April 24, 2008, 12:32:41 am »
Hi

I've noticed several times that help is not needed on the core features of SFML, but I was wondering if you have a place or accept community contributions in the form of add ons etc.,

I've ditched SDL in favour of SFML as SFML is easier, in C++ instead of C and runs fast.  One small feature I used in SDL was SDL_Config a library compatible with SDL that reads and writes .ini style files in a cross platform manner.  This is not something that I've seen for SFML and something that's really useful for storing and retrieving user preferences.

I'm going to make the module for my own (closed source) project but I'd be happy to contribute this to the community under an open source license if there is any interest.

Is there a contributions section that I've missed?  While I'm not going to release my full project as open source I'm happy to release useful thing like this as and when I get them completed.

Cheers,
Nick

Edited to subscribe to replies :)

Pages: [1]
anything