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

Pages: 1 2 [3] 4 5 ... 9
31
General discussions / My plans for the website tools
« on: March 18, 2011, 06:48:04 pm »
Quote from: "Laurent"
Yep, sounds good. However I hope that it won't become too complicated to retrieve and compile all those separate things, compared to the current situation where everything is at the same place.

You could issue a pull into the master on every major version (i.e. 2.0, 3.0 etc) or the maintainer of the binding could issue a push-request to master (which you then accept or not) when the binding is supposedly stable? Kinda like how Torvalds does it with Linux.

Any thoughts on user-made addons in all of this?

32
Window / Mouse movement causing framerate drop
« on: March 18, 2011, 02:40:35 pm »
Quote from: "Groogy"
Well just thinking, even though if it is not the problem, isn't it more desirable for most developer to only handle the latest mouse moved event?

Not really - especially if you use the buffered input for gesture recognition and the like.

What would be useful though is a way to limit the amount of messages processed per frame. I.e. a way to manually loop through the internal messages and save anything that takes too much time to a later frame.

That way you might end up with a serious backlog of events - if the computer playing the game is too slow - but the same computer would choke even with the current system. What it lets you do is smooth out framerate over time instead of having stalls.

33
General discussions / My plans for the website tools
« on: March 18, 2011, 02:36:44 pm »
I for one welcome the change to GIT. It's far better for managing code - but SVN still has its strengths (like large binary data like media files that aren't easily mergable - requiring locks on files to prevent people from doing work in vain).

You should celebrate the move to GIT by getting the ATI fix out on it ;)

34
Graphics / How Can i Draw a Map??
« on: March 17, 2011, 02:40:07 pm »
Yes, you could use the same subrect from the same image on either multiple sprites - or having a lookup-table and draw the same sprite several times at different positions.

35
Window / Mouse movement causing framerate drop
« on: March 17, 2011, 02:38:26 pm »
Movement should generate at least one message * CPI for every inch the player moves the mouse. Some of the newer mice are 5500+ "DPI"... which could easily flood a message loop if they move the mouse more than a few inches at a time - if the eventhandling is non-trivial and their computers slow.

36
Window / Input::IsKeyDown problem
« on: March 16, 2011, 05:41:41 pm »
Quote from: "iSkull"
Well, i don't really care which method i am using, just want it to process multiple keys.

Right now, if i hold the left arrow and press the up arrow to jump, the character will jump, but it will stop moving left, and i have to release and re-press the left arrow to make him move again.

I just want to fix this.

This is a problem with your game logic, not IsKeyDown.

We'll need to see the "..." stuff that you commented out earlier - and for the Up Key as well.

Even better would be a minimal compilable code example that reproduces the problem.

37
General / App.Draw() trouble
« on: March 16, 2011, 05:39:53 pm »
Minimal compilable code that reproduces the problem?

You can't expect us to guess what your code does. :)

38
Window / Mouse movement causing framerate drop
« on: March 16, 2011, 03:35:08 pm »
Well - I haven't looked at the DotNet bindings for SFML - but I do know that Application.DoEvents() will suspend the current thread while processing all waiting window messages.
Unless of course the DotNet bindings use PInvoke of the Peek/Translate/DispatchMessage instead of DoEvents to limit the amount of messages processed any one frame.

I bet Groogy is onto something - high dpi mice generate an awful lot of WM_INPUT messages, if any substantial work is done on those messages - it will slow things down.

39
Window / Mouse movement causing framerate drop
« on: March 16, 2011, 08:54:28 am »
What does your mainloop look like?

It could be that their computers are "drowning" in events from the mouse movement and thus it's just looping through those events instead of updating your game.

40
SFML website / New section desirable?
« on: March 15, 2011, 07:21:05 pm »
I've noticed a lot recently the type of questions posted are either compiler related or newbie related (not talking SFML in particular - but with for instance c++ in general - i.e. why does my compiler shout at me).
I'm not using the word newbie in any derogatory way, as everyone's a newbie when first starting out.

Wouldn't it make sense to create a "For Beginners" forum where such questions could be posted and answered by other forum users; in order for us to help you get (slightly) more free time to focus on SFML2? :)

41
General / Problems with GetImage()
« on: March 15, 2011, 07:12:25 pm »
The problem doesn't lie with GetImage, but with your syntax.

SetImage returns void, not bool. You can't use the result in an if-clause.

42
Network / Data sent over UDP gives me strange ports
« on: March 15, 2011, 08:29:15 am »
You're only listening on port 6000 on the server.
The operating system is using a random port to send with from your client. (as it should be)

43
Network / Blocking sockets and multithreading
« on: March 15, 2011, 08:27:45 am »
You could use a lock-free queue to push messages to be sent that's produced by several threads and consumed by only one.

Similar you could use another lock-free queue to produce incoming messages from one thread (with the listener socket) and consume from several others.

44
Audio / I need to limit the number of recorded samples
« on: March 15, 2011, 08:25:23 am »
Code: [Select]
bool MyRecorder::OnProcessSamples(const sf::Int16* Samples, std::size_t SamplesCount) {
    SamplesCount = this->samplesCount;
    emit processFinished();
    return true;
}

Ehm, the first line won't do a thing - will it? You're not passing it by reference into the function - so won't be able to read it from the outside. Or did you intend to do the assignment the other way around?
(Sorry if this is completely wrong - haven't dabbled in the Audio parts much - but that part stuck out like a sore thumb to me)

45
General / Slow down game without altering user experience
« on: March 13, 2011, 05:57:18 pm »
Well - to get the snake clamped to the tiles - I would suggest some good old fashioned bitshifting.

int Xi = (int)X;
Xi = (Xi >> 5) << 5;

And use Xi to render the sprite, rather than X.

What this does is first turn an X position of say 145.23 into an integer of 145. (if you're worried about proper rounding, do ((int)X+0.5f).

Then it takes the value 145 and divides it by 32. (shift the value right 5 times - use /32 instead if you don't know what it is and don't trust me.) You now end up with the value 4,53125 which will be rounded down to 4.

The next part of that line multiplies by 32 (shifts the value left 5 times - use *32 instead for the same reasons as above). You now end up with the value 128.

What all this does is make sure your snake will "jump" one tile at a time - while still maintaining float positioning internally.

Pages: 1 2 [3] 4 5 ... 9
anything