-4

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?

ThiefMaster
  • 310,957
  • 84
  • 592
  • 636
Deith
  • 133
  • 2
  • 9
  • What are these limitations you speak of? – Mark Dec 25 '12 at 15:12
  • 1
    If in doubt, you can embed assembly code in C. So any compiled code written in any language can be embedded as assembly code into C code. Granted, that's probably not practical... – Daniel Dec 25 '12 at 15:13
  • The original Rollercoaster Tycoon was written in 99% assembly language! (Count yourself lucky!) – Mapsy Jul 21 '16 at 03:28

1 Answers1

8

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.

ThiefMaster
  • 310,957
  • 84
  • 592
  • 636