Advertisement

New NeHe basecode - SFML port

Started by January 27, 2009 06:03 PM
5 comments, last by EmrldDrgn 15 years, 9 months ago
I was looking at the new NeHe basecode, and it's excellent, of course. However, lately I've been playing around with SFML, and I like it a lot better than SDL. So, I figured a good exercise would be to port the basecode to SFML, trying to maintain as close a parity as I could. There were a few sticky spots - I couldn't find an SFML equivalent of the color buffer settings, and the keyboard event system is kind of a hack, ironically because SFML provides a much better way to handle such things that is incompatible with the current basecode (at least without more work than I really wanted to put in...). But hey, it works! I'm looking for some people to try the code out, play with it a bit, see if I screwed anything up. You can download it here, for Visual Studio 2008 Express. Let me know here if you notice anything wrong with it. Thanks! P.S. I'm new at SFML, like I said, so if I've done something unconscionably stupid that doesn't actually break the code, I'd love to see how someone else solves any given problem! [Edited by - EmrldDrgn on January 31, 2009 2:00:43 AM]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~I program in C++, on MSVC++ '05 Express, and on Windows. Most of my programs are also for windows.
Hey!

I prefer SFML to SDL, too, and I've used it for several small apps..
Unfortunately it doesn't support GL 3.0 yet (or did I miss something?), which is not surprising because this would screw all their Fonts and Sprite rendering so they have to use Vertex Buffer Objects.

I'd love to give your code a try (and see whether it runs on linux too [wink] ) but your link doesnt seem valid.

Cheers
Carsten
Advertisement
My apologies! I have edited the first post so that it now contains a correct, tested link. Here is the URL just in case that doesn't work...

http://rapidshare.com/files/190883078/NeHe_Basecode.zip
~~~~~~~~~~~~~~~~~~~~~~~~~~~~I program in C++, on MSVC++ '05 Express, and on Windows. Most of my programs are also for windows.
I don't have comments for you on the actual NeHe port, but I do have some comments for you on distributing projects (in case you want to do more ports [smile]):
  • Delete the *.ncb files as Visual Studio will rebuild them on a per user basics.
  • Delete the Debug/Release folders as they contain excessive files that do not need to be distributed, *.obj, *.pdb, and *.ilk for example.
  • Including a compiled exe nowadays is usually not preferred due to security issues, people can always delete it if they do not, but it still adds extra space to download.
  • Delete the *.user file as a new one will be generated per computer the project is opened on.

Just a few tips, it will definitely save you on your uploads and our downloads [wink]
Well thanks for that. As you can tell, I'm rather new at sharing my work. In the past I've simply distributed .zip or .tar.gz files with the source files, but I figured this time, it wouldn't hurt to try handing out a project file. I'll make the changes you've suggested and re-upload a little later on today. Thanks again!

EDIT: It's been re-uploaded, and the link has been updated.

[Edited by - EmrldDrgn on January 29, 2009 6:11:59 PM]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~I program in C++, on MSVC++ '05 Express, and on Windows. Most of my programs are also for windows.
Hey EmrldDrgn,

just tested your code, it compiles and runs perfectly on linux (if I remove GLee, there are some known issues with Glee and SFML thats why I use glew there, but not needed here anyway).

Would you mind if I put a version of your code complete with VS project, CodeBlocks project and Unix-Makefile online on the NeHe website? Anything I should include in the readme to credit you?
Advertisement
Of course not! I'd be very happy to have that happen. Just a mention of my GameDev screen name is sufficient for credit... I don't attach much importance to such things. Thanks!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~I program in C++, on MSVC++ '05 Express, and on Windows. Most of my programs are also for windows.

This topic is closed to new replies.

Advertisement