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

Pages: [1]
1
General / Pushing around things on the stack
« on: April 22, 2010, 07:07:09 pm »
Another question:

After seeing this: (http://gamedevgeek.com/tutorials/managing-game-states-in-c/), I noticed that the author of the article mentioned "pushing and popping" objects  on the stack. What does that mean? How is it accomplished?

From what I understand, the stack is part of the memory used by the program, and objects can be loaded into it. When an object is "pushed" it moves up or down on the stack, right?

Thanks again!

-Cyrano

2
Graphics / Sprite Rendering, bit blitting, and other questions
« on: April 22, 2010, 07:54:46 am »
SFML is a fine library, but once again, I have some questions regarding one of its core areas: Sprite manipulation.

My Questions:

What is the fastest way to render a sprite? (I'm not entirely sure what people on this site mean by "render"; from what I understand, it's fairly similar to bit blitting.)

What's the deal with "arrays of pixels?" I keep seeing this term, but do not fully grasp what it means. Is it perhaps referring to all the pixels in an individual image?

Why do some people say bit blitting is slow?
Is there some faster method I was not aware of?

What is the screen tear effect?
Is this the phenomenon that occurs when update cycles are faster than the monitor's refresh rate? (Dumb question, but I just want to make sure I get it). Is there a way around it?

Can a screen (game screen) be updated in part? (Ex: A character sprite is updated, but not the whole background with it.)


These are some questions I've wanted answers to for a while, but did not know whom to ask. I put all these questions together so that I don't have to spam other people's topics or create a bunch of topics of my own.

Thanks in advance. Happy programming!

-Cyrano

3
Audio / Multiple audio channels that can be individually managed
« on: April 22, 2010, 07:33:07 am »
I'm highly impressed with SFML, but I have some questions regarding its sound libraries:

How is a multi-channel sound que/array done? (Ex: Que has .wav1 & .wav2 stored in it. Channels A & B can have sounds sent from the que to them via, say a function in the application's code. In this way, sounds are loaded into a storage area for ease of reference within the program.)

Is there a built-in way to route sounds to different channels depending on situation? (Ex: A .wav1 normally plays on channel A, but .wav2 is currently playing on channel A. Can .wav be routed to channel B?)

Can individual channels be individually managed?
(Ex: Channel A is to be at 100% volume, channel B needs to be at 50%.)

I've heard that playing multiple sounds simultaneously lowers the volume in some circumstances. Can this be averted by using multiple audio channels? (Ex: .wav1 on channel A plays at 100%, .wav2 plays on channel B at 100%. Both need to sound like they do at full volume.)

Is it possible to give a "priority tag" to a sound, so as to determine what channel it plays on? (Ex: Channel A is at 100% volume, Channel B is at 50% volume. .wav1 has a rank of 5, so it outranks .wav2, which is a rank 2 sound. If both sounds try to play simultaneously, .wav1 will always get Channel A, the priority channel. However, if .wav1 is not playing, .wav2 can use Channel A.)


I do not have any source code at this time, but decided to post this to see if there are answers to my questions, before I get into a tangled programming mess.

Thanks in advance.

-Cyrano

Pages: [1]
anything