Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

OoMMMoO

newbie question

This topic is 6926 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have two questions 1. Is making a for loop as fast as using memset for putting memory into certain addresses? 2. Where can I start to learn to program games fro windows, if I have no experience with direct x or direct draw?

Share this post


Link to post
Share on other sites
Advertisement
quote:
Original post by OoMMMoO
1. Is making a for loop as fast as using memset for putting memory into certain addresses?



Depends how you write it. It could be faster, slower, or the same. Memset is using a loop internally.

quote:

2. Where can I start to learn to program games fro windows, if I have no experience with direct x or direct draw?



There''s lots of tutorials on the net, lots of samples with the SDK, and some good books around (Tricks of the Windows Game Programming Gurus is a fairly decent one).

aig

Share this post


Link to post
Share on other sites
memset is often written in very optimized assembly and is very fast (faster than a for loop you could write)

but if you are only filling a few bytes, the overhead of using memset might not be worth it

for any sizeable memory blocks, use the memory functions... memset or memcpy..


adamm@san.rr.com

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!