Live data from Hacker News

Handmade Hero: C game from scratch

handmadehero.org

41–50 of 60 posts

Re: Handmade Hero: C game from scratch

#41

Lost interest when it became Windows-only. Writing C on Windows is a nightmare and the chance of portability plummets if you aren't targetting a POSIX system from the start.

That's just silly. C is standard everywhere. Writing it on Windows is a matter of your facility with the IDE you choose, which can be a portable one if you wish.

The chance for portability depends on the graphics engine you choose or write. Our project (Sococo) is portable across Windows, Mac, iOS, Android and several versions of Linux. The Windows/graphic part is a tiny part of the code.

Re: Handmade Hero: C game from scratch

#42
post #39
post #7

Wow. I can't even begin to express how much the premise behind this series resonates with me. I've been looking for something just like this. My only issue is that, although in C, the preview/introduction video seems pretty centered around visual studio[0]. In the FAQ you say that multi platform support for *nix systems will be added later. How exactly will this work for those of us who want to follow along, but don'…

Good luck writing anything but C89 with visual studio. This project sounds amazing and I'm going to probably try it but Microsoft has abandoned C for a while now so visual studio is a complete turn off for this use case.

I'm reasonably certain that this has started to change in MSVC 2013. They have stated that they have improved the C99 library support and unless I'm mistaken they have finally permitted mixed code and declarations.

Re: Handmade Hero: C game from scratch

#43

Lost interest when it became Windows-only. Writing C on Windows is a nightmare and the chance of portability plummets if you aren't targetting a POSIX system from the start.

That's just silly. C is standard everywhere. Writing it on Windows is a matter of your facility with the IDE you choose, which can be a portable one if you wish. The chance for portability depends on the graphics engine you choose or write. Our project (Sococo) is portable across Windows, Mac, iOS, Android and several versions of Linux. The Windows/graphic part is a tiny part of the code.

He's going to write his own renderer, he's not using SDL or anything. He's going to be opening his own windows and drawing to them directly. The chance at portability is extremely slim, and on top of that those of us who use saner operating systems won't get to enjoy it for a long time.

Re: Handmade Hero: C game from scratch

#44

Earlier quoted context omitted.

That's just silly. C is standard everywhere. Writing it on Windows is a matter of your facility with the IDE you choose, which can be a portable one if you wish. The chance for portability depends on the graphics engine you choose or write. Our project (Sococo) is portable across Windows, Mac, iOS, Android and several versions of Linux. The Windows/graphic part is a tiny part of the code.

He's going to write his own renderer, he's not using SDL or anything. He's going to be opening his own windows and drawing to them directly. The chance at portability is extremely slim, and on top of that those of us who use saner operating systems won't get to enjoy it for a long time.

SO the portability effort is - opening a window and drawing? How is that difficult. Writing his own renderer means its pretty easy to be portable. He'd have to make a special effort to include platform code in what's normally a pure-math engine, right?

Re: Handmade Hero: C game from scratch

#45

Lost interest when it became Windows-only. Writing C on Windows is a nightmare and the chance of portability plummets if you aren't targetting a POSIX system from the start.

Taken directly from the website:

Will the game support multiple platforms? Yes! Windows will be the first platform, since it is currently the most common gaming platform, but the series will later cover (at least) Mac, Linux, and Raspberry Pi. Portability will be a major topic in the series, so all the code will be structured to demonstrate how to write code that is easy to port to new platforms.

Re: Handmade Hero: C game from scratch

#46

I'm amazed that people are totally unaware how a game works.

the devil is in the details: physics, path finding, matrix multiplication, space partitioning, graphic pipeline, and many other algorithms.

I don't think those feeds will teach how those things work.

Re: Handmade Hero: C game from scratch

#47
post #20

Earlier quoted context omitted.

Which only recently added support for C99...

C++ and .NET Native are the future of native code programming on Windows. C is for compatibility with older code, or code coming from other platforms.

You can still link in C libraries, right?

Re: Handmade Hero: C game from scratch

#48

Earlier quoted context omitted.

He's going to write his own renderer, he's not using SDL or anything. He's going to be opening his own windows and drawing to them directly. The chance at portability is extremely slim, and on top of that those of us who use saner operating systems won't get to enjoy it for a long time.

SO the portability effort is - opening a window and drawing? How is that difficult. Writing his own renderer means its pretty easy to be portable. He'd have to make a special effort to include platform code in what's normally a pure-math engine, right?

[deleted]

Re: Handmade Hero: C game from scratch

#49
post #7

Wow. I can't even begin to express how much the premise behind this series resonates with me. I've been looking for something just like this. My only issue is that, although in C, the preview/introduction video seems pretty centered around visual studio[0]. In the FAQ you say that multi platform support for *nix systems will be added later. How exactly will this work for those of us who want to follow along, but don'…

Judging by the initial video, you won't be able to follow this without a Windows machine. The author plans to implement a game from scratch (no third party library will be used) in C on Windows, which means he will use Win32 functions (OS specific code) for creating a window, reading/showing image files etc ... If you want to follow along from day one I suggest you install Windows in a virtual machine (you can downlo…

You can actually use an unactivated copy of Windows 7 for longer by using "slmgr /rearm" in cmd (which needs to be run by right clicking cmd.exe and choosing the "run as administrator" option). You can extend the license 3 times (leading to 120 total days). It should be noted that you can apply it after the temporary licensing has expired.

I'm not sure if this applies to Windows 8 or 8.1, however.

Re: Handmade Hero: C game from scratch

#50
If he knows he will be porting the game, why does he not abstract away the OS layer and perhaps even the graphics library? Then implement it behind some interface with for example SDL2 and OpenGL depending on platform.

Would not that save lots of time and ensure it works cross-platform from the start? To me, it just seems that you re-invent the wheel by not doing this.

Post reply on HN