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

Pages: 1 ... 34 35 [36]
526
SFML wiki / sfeMovie project [v1.0 RC1 available]
« on: May 08, 2011, 10:04:58 pm »
Quote from: "Ceylo"
Hello Haikarainen,

Th.. blablab text.


Ok, shouldn't be too hard. If I ever get the code working perfectly on a linux platform I will notice you :)

527
SFML wiki / Awesome
« on: May 07, 2011, 10:14:57 pm »
Where can i get my hands on this?

Im working on a project for my car, basically an embedded computer. Writing the shell in SFML, and i need video playback support. It will be running Linux Debian on ARM Architecture, is linux supported?

How much work would it be to be able to seek the videos? If its not too hardcore lowlevel coding i might be able to pull it off.

528
Graphics / Looping/scrolling sf::View?
« on: May 05, 2011, 12:33:55 pm »
Quote from: "Wizzard"
You should attempt to master views and the solution will hopefully become apparent.
SFML 1.6 "Using Views" tutorial

Getting real-time mouse input will be necessary to set the center position of the view
SFML 1.6 "Handling Events" tutorial (scroll down to the "Getting real-time inputs" section)


I've been using views alot before, also realtime input. The problem im having is to have a SEAMLESS looped view.. so if(mousex > rightedge){mousex = leftedge} wont work,

529
Graphics / Looping/scrolling sf::View?
« on: May 04, 2011, 09:57:50 pm »
Hey, im working on an application, that will practice ppl's FPS-Aiming skills.

I need a fixedsize "surface", that will seamlessly loop/scroll. the centerposition of everything will be the mouseposition.

Basically i want to simulate a firstperson-shooter view in 2d, on a flat surface. I hope you get my point here.

My question is; Does anyone have a clue or hint how this could be done? im not asking you to write it for me, just asking for tips because i really dont know where to start on the whole seamless loop/scroll thing.

530
General discussions / Hey Laurent! SFML Uploads? ;)
« on: April 24, 2011, 08:32:41 pm »
Quote from: "Laurent"
That's a good idea but I can't put it on the official domain, since it's not official ;)


Hehe, ok, understandable. I do have a notice-text on the mainpage that explains that it's not related to the official sfml project, if that changes things?

Cant afford anohter bought domainname, so i have the options of either make a subdomain to haikarainen.se (wich is using a swedish .se domain, and also the domainname is a hardpronounced/rememberable finish name ^^) or to make a free .no-ip.com or something..

531
General discussions / Hey Laurent! SFML Uploads? ;)
« on: April 24, 2011, 08:02:17 pm »
Hey, this message goes out to Laurent mainly;

I'm working on a site called "SFML Uploads", dedicated to people using this forums/sfml to upload their projects(rar,zip,gz) and also codesnippets with syntax highlightning(with support for anyone to alter them into a new version of it).

Currently you can just login and logout, but in a day or two the site will be finished, so heres my question: What do you think of this idea in general? I started it because all the megaupload links here make me sad.

I will run it on my private server, unless anyone else with better serverspecs/dedication feel like running it. Notice for that guy: It runs PHP and MySQL, filecache in a directory with full permissions will be needed.

It would be awesome if you could also create a subdomain like "uploads.sfml-dev.org" and just redirect it to my IP (wich i will give you in mail). :)
If you like this idea, send me an email : fredrik@haikarainen.se , if not: please reply this thread so i can just change the name of the site or something !

532
Graphics / Just gonna borrow this thread a little..
« on: April 23, 2011, 10:18:54 pm »
.. When will SFML2.0 officially be released? How much stuff do you have left to change ?

Im using 2.0 in my development atm, and i really love a lot about it compared to before (Especially how you converted rects from top left right bottom to position and size, so much easier to wrap your head around)

533
Graphics / Intersecting rectangles, help.
« on: April 23, 2011, 10:16:47 pm »
To begin with, sry if ive been posting a lot of threads here in a very short period of time, my head is just a mess atm :P cant think. I also have a little project coming up in a few days (tonight/tomorrow if youre lucky!) that will eliminate all dirty megaupload links on these forums ;)

To the point:
I'm working on a collision detection system, that checks a characters collisionrectangle to a pixel perfect image tile .

So say we have:
sf::Rect Body.CollisionBox;
sf::Image Tile; // using position and size as "rect"

Ive came so far to check IF theyre intersecting, but now i need a third sf::Rect from WHERE the 2 other "rects" are intersecting.

I need the third rect to begin checking pixels(have no problem with how to do that), so i need the intersecting rect -> rect on the imagepixels.

Please help me, as i wrote before my head  have been  a mess the past 2 days, been working on this function tooo long now :P

534
Graphics / Create new image from another image and rect ?
« on: April 23, 2011, 10:09:17 pm »
Quote from: "Nexus"
Take a look at the sf::Image::Copy() member function.


Thanks alot :) For those searching the forums with the same problem:
Remember you have to create the image first, with sf::Image::Create(int width, int height)

535
Graphics / Create new image from another image and rect ?
« on: April 23, 2011, 03:21:02 pm »
If i have:
sf::Image Image1;
sf::Rect rect(0,0,32,32);

sf::Image Image2;

How would i copy pixels from Image1 using the rect, into a new image on Image2?

So that Image2 contains the pixels in Image1 from 0 - 32 on both axes?

536
Network / How to avoid Selector.Wait() hanging mainloop?
« on: April 21, 2011, 02:34:52 pm »
Quote from: "Laurent"
Quote
wouldnt connect otherwise :S solution?

Which version of SFML are you using?


2.0

537
Network / How to avoid Selector.Wait() hanging mainloop?
« on: April 21, 2011, 02:19:59 pm »
Quote from: "Laurent"
Sockets are blocking by default, which means that a call to Receive() won't return until the socket receives some data.

You must either receive data in a separate thread, or switch your sockets to non-blocking mode.


Thanks for the fast reply :) got it just as you wrote tho, thanks anyway.

And btw; kudos on your work with SFML, never seen such dedication and awesome code before! Thanks for teaching me basics of game/network-programming :D

538
Network / Nevermind!
« on: April 21, 2011, 02:18:49 pm »
I got it, solved with setting blocket to 0 on all sockets (after connecting, wouldnt connect otherwise :S solution?), throwing away the selector and  :
Code: [Select]

sf::Packet p;
sf::Socket::Status status = this->Socket.Receive(p);
switch(status){
case sf::Socket::Disconnected:
std::cout << "Server disconnected.\n";
this->Connected = false;
return false;
break;
case sf::Socket::Error:
std::cout << "Connection error.\n";
this->Connected = false;
return false;
break;
case sf::Socket::NotReady:
break;
case sf::Socket::Done:
std::string ms;
p >> ms;
std::cout << "Server: " << ms << "\n";
break;
}
[/code]

539
Network / How to avoid Selector.Wait() hanging mainloop?
« on: April 21, 2011, 01:52:42 pm »
I decided to learn networking with SFML's networking package, by creating a server for a game i'm working on.

The serverpart is fine atm, and the client is not implemented in the game yet because im writing it in a separate project to debug the server before implementing the code into the game.

To the point: I have a mainloop on the client, wich simply recieves packets from the server throu a selector. But it freezes the mainloop at;
if(this->Selector.Wait()){ HERE IT FREEZES ... codeblabla. .. }

I tried making it without a selector first, then it freezed at Socket.Receive(), i basically just want to recieve packets while updating other code(in this example  updating a sf::RenderWindow).

I am not requesting that you write the code for me, i simply want a push in the right direction.

Code for Server: http://fredrik.haikarainen.se/server.cpp
Code for Client: http://fredrik.haikarainen.se/client.cpp

Thanks in advance, would love to know how to get around this !  :D

Pages: 1 ... 34 35 [36]