Home » Community » Forums » » The Simple DirectMedia Layer from a WIN32 Perspective, Part 2: SDL Video
  Intel sponsors gamedev.net search:   
[Control Panel] [Register] [Bookmarks] [Who's Online] [Active Topics] [Stats] [FAQ] [Search]

Add Forum to Favorites |  Send Topic To a Friend | View Forum FAQ | Track this topic


 Last Thread Next Thread 
 The Simple DirectMedia Layer from a WIN32 Perspective, Part 2: SDL Video
Post Reply 
Nicely done... however in the example screenshots, the wrong pics are linked for both the random pixel and ball bouncing versions. Right now they just repeat the shot of the random rectangle filling.

I saw them anyway though, since the naming of the first jpg gave away the naming convention.

"Don't be afraid to dream, for out of such fragile things come miracles."

 User Rating: 1079   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

Oops. Fixed now.

 User Rating: 2088   |  Rate This User  Send Private MessageView ProfileView Journal Report this Post to a Moderator | Link

Good explanations of everything. The articles are pretty good, the only thing is that they don't really keep you hooked. He puts the information out in your face and gives you a great explanation of it. I guess this really isn't a problem because most people here like it better that way.

I learned a bit more "under the hood" kind of stuff from this tutorial, and that was what I was looking for. Good stuff

When will the next one be coming?

 User Rating: 967   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

I have a few questions. Right now I am in that "make it faster make it faster" stage of my development, and .05% matters to me. So, for the questions.

Is it slower to use the enum's variables as to just giving your own values to SDL_SetVideoMode?

Is the for( ; ; ) faster than the while () I usually use?

Is it better to declare SDL_Surface* pSurface (I actually use screen, but for the purpose of your article...) in the beginning or right when you are assigning SDL_SetVideoMode() to it?

Thats about it, and I am sorry if these questions are stupid but speed has been the biggest problem I have had with games, so..

 User Rating: 967   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

quote:
Original post by Drizzt DoUrden
Is it slower to use the enum's variables as to just giving your own values to SDL_SetVideoMode?

No. The enum values are just constants. Perhaps more important here is the fact that this isn't a place you'd want to waste time optimizing anyway. This function is going to be called once, at start up, and then possibly if the user changes the resolution - any gains you get here won't matter. At all.
quote:
Original post by Drizzt DoUrden
Is the for( ; ; ) faster than the while () I usually use?

There's probably no difference. The assembly should look exactly the same.
quote:
Original post by Drizzt DoUrden
Is it better to declare SDL_Surface* pSurface (I actually use screen, but for the purpose of your article...) in the beginning or right when you are assigning SDL_SetVideoMode() to it?

In terms of performance, there will be no difference. For readability, most people recommend putting variable declaration as close as possible to where the variable is used.

 User Rating: 2088   |  Rate This User  Send Private MessageView ProfileView Journal Report this Post to a Moderator | Link

Has this article series been cancelled due to the upcoming release of the SDL book in the Prima Game Development series?

 User Rating: 967   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

I have a quick questoin. Why is it that if I up the dx and dy to any int higher than 2, then the ball goes off the screen?

-Alex

 User Rating: 1015   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

good article about SDL, i would like to see more articles on the subject.

Thx again

 User Rating: 1015    Report this Post to a Moderator | Link

All times are ET (US)

Post Reply
 Last Thread Next Thread 
Forum Rules:
You may not post new threads
You may post replies
You may not edit your posts
You may not use HTML in your posts
Jump To:
Administrative Options: