Tuesday, July 14, 2009

I need help in game programming in C?

I want to know if it is possible to program a game such as snakes and ladders in C..How do i make use of graphics?ive heard about SDL..can it be used in C?If yes,how??

I need help in game programming in C?
It's possible.


You can try OpenGL(open source) SDKor the DirectX(M$) SDK for the graphics. Both are free. Most people use directx since it is the windows system. http://msdn2.microsoft.com/en-us/xna/aa9...





There will be alot of documentation and tutorials on the internet for both. That's probably where you should start looking.
Reply:YES!!!!





it is VERY possible to write a simple snake game in C





most of the games you play are written in C\C++(some use assembly for time criticle functions)





in windows, you use DirectX to deal with graphics, sound and input, all using the COM interface in OLD DOS, you wrote to a specific address location, that corosponded to video memory. as for the actual graphics, you just need to know how to read for a picture file(choose any format you can edit, and can read) then display it!





This is a HUGE topic, I have 4, 4 inch thick books on this, all talking about game and graphics coding in C and it's daughter languages, then I have 5 other 4 inch books about General C\C++ coding





SDL is an interface, like DirectX is an interface,(just looked it up) Yes, it can be used with c. interface you can use with C++ can be used with C(with some syntactical differences)





Just include the header files, set the linker to link the library you are using, then call the functions to use as you will
Reply:Try openGL


No comments:

Post a Comment