Is it possible to write Tower Defense in C/SDL [closed]

孤者浪人 提交于 2019-12-13 11:27:00

问题


I have to write Tower Defense game in ANSI C using SDL library, but the deeper I go into LazyFoo's tutorial, the more I got this feeling that's impossible to write it in pure C due to limitations. So my questions is - am I in big trouble or I'm just panicking. It has to be a simple tower defense game, nothing fancy, but is it possible to do it using only C?


回答1:


C is a Turing-complete language so anything you can do in some other language can be done in C, too. And SDL provides you with a graphics API which is commonly used for (usually small/indie) games.

Of course it might be more pleasant to write it e.g. in C++ or a higher-level language such as C# or Python - but it's possible in C nonetheless.

TL;DR: Yes, it is totally possible.



来源:https://stackoverflow.com/questions/14031784/is-it-possible-to-write-tower-defense-in-c-sdl

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!