Giter Site home page Giter Site logo

Zig development about cdogs-sdl HOT 2 OPEN

erlend-sh avatar erlend-sh commented on May 23, 2024 1
Zig development

from cdogs-sdl.

Comments (2)

malespiaut avatar malespiaut commented on May 23, 2024 1
$> scc (fd -t f -e h -e c)
───────────────────────────────────────────────────────────────────────────────
Language                 Files     Lines   Blanks  Comments     Code Complexity
───────────────────────────────────────────────────────────────────────────────
C                          297    106736     9116     10148    87472      15459
C Header                   219     52709     4699     13038    34972       4346
───────────────────────────────────────────────────────────────────────────────
Total                      516    159445    13815     23186   122444      19805
───────────────────────────────────────────────────────────────────────────────
Estimated Cost to Develop (organic) $4,206,585
Estimated Schedule Effort (organic) 23.74 months
Estimated People Required (organic) 15.74
───────────────────────────────────────────────────────────────────────────────
Processed 4902161 bytes, 4.902 megabytes (SI)
───────────────────────────────────────────────────────────────────────────────

According to scc, the code base is 122k lines long. It's going to be a fun experience for those who want to dive in. But bear in mind that it won't be trivial, because while C can easily be translated by hand into Zig, Zig offers new features that you need to be aware of to simplify the software architecture.

I support this approach, because I'm doing it myself on a relatively small C project and it's an excellent learning exercise. I also think that translating your C code to Zig will allow you to discover new bugs and help you fix them! I wish you the best of luck!

from cdogs-sdl.

erlend-sh avatar erlend-sh commented on May 23, 2024

Cheers :) Do note this particular comment from Congus above:

Personally I wouldn't rewrite existing C parts into zig unless there are significant benefits, like memory safety, much simpler code.

The game is already feature-complete. This issue is mainly about making it capable of being extended with Zig contributions by getting the build pipeline in order.

from cdogs-sdl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.