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 - Christopher Jozwiak

Pages: 1 [2]
General / Collision detection sfml 2.0
« on: December 13, 2012, 03:48:20 am »
How would i perform a simple box collision detection in sfml?

Network / SFML 2.0 Help?
« on: November 15, 2012, 05:41:12 am »
Sorry noob here.  Heard 1.6 had bugs and kinda turned me away from downgrading to it just to learn the ropes.  But i tried using the network example in the docs.  Copied the server code into a new project. Here is the code: 

 // Create a listener to wait for incoming connections on port 55001
#include <SFML\Network.hpp>
#include <SFML\Graphics.hpp>
#include <SFML\System.hpp>
#include <iostream>

using namespace std;

sf::UdpSocket listener;

 // Wait for a connection
 sf::UdpSocket socket;
 cout << "New client connected: " << socket.getRemoteAddress() << std::endl;

 // Receive a message from the client
 char buffer[1024];
 std::size_t received = 0;
 socket.receive(buffer, sizeof(buffer), received);
 std::cout << "The client said: " << buffer << std::endl;

 // Send an answer
 std::string message = "Welcome, client";
 socket.send(message.c_str(), message.size() + 1);

I'm getting a whole bunch of weird errors... errors with cout even though I have iostream included.  Confused help anyone?

EDIT:: Both socket.recieve and socket.send give me an error of this specifier has no storage class or type specifier  listener. listen same thing.  cout same thing and it the "<<" giver error expected a declaration.  This is the only file in the project. main.cpp.

General / SFML 1.6 with visual studio 2012?
« on: November 13, 2012, 09:57:18 pm »
Would I have to compile the library with vs 12 first or should it just work after I link stuff?

Window / Image wont draw...
« on: December 23, 2011, 11:35:54 pm »
No errors, I have my clear set too 0,255,255 and my image is black. Here's the code.

Code: [Select]
// SFMLWindow.cpp : Defines the entry point for the console application.

#include "stdafx.h"
#include <SFML/Window.hpp>
#include <SFML/Graphics.hpp>

int main()

sf::RenderWindow Screen(sf::VideoMode(1024, 768, 32), "SFML-Window");

sf::Image image;

sf::Sprite sprite(image);

sf::Event Event;
while (Screen.GetEvent(Event))
if (Event.Type == sf::Event::Closed)



Window / Simple open-window tutorial problem...
« on: December 22, 2011, 11:08:25 pm »
I got the window to finally open by adding all the correct things but now, the window opens and flashes abunch of colors and wont let me exit. I added a exit button (ESC key) But I have to force stop it. Any idea's?

Pages: 1 [2]