Jump to content
Sign in to follow this  
jeffnz

I wasted several days on fixing this, and look how easy the solution is

Recommended Posts

Over the past several months, I feel like my head is going to explode, and after many wasted mornings, afternoons and evenings, I finally solve my own problem: http://www.gamedev.net/topic/680900-i-need-help-again-with-codeblocks-and-sdl-setup/

It shows how useless people are on help forums. I read Jazon Yamamoto's book, I read Lazy Foo tutorial, I read the Code::Blocks guide, and they all suck! The reason it infuriates me is because programming should be accessible to everyone, and setting up your environment/IDE should be the easiest part. Often it's the hardest part. Here's the trick:

editscript.png

All you do is find instances of SDLmain and change it to SDL2main. Also find instances of SDL.dll and replace it with SDL2.dll - and BAM you can configure SDL to work with Code::Blocks and your compiler can find all the stuff it needs. I asked questions on gamedev.net and nobody could figure this out for me, so after much frustration I figured it out myself. Again I reiterate what I've said previously: programming from scratch beats modding by a long shot. About that argument that you have to make your own engine from scratch... total BS. You can use an engine like Unity or Cocos and then strip out the components you don't need. Then you have an engine that's up to date, instead of using something like the Battle Zone: Combat Commander engine, that was designed in 1998... using 1998 tools. So with some spare money, you can make a "mod" of Unity... which is essentially an original game... that uses a modern game engine that's a little more "2016". Much nicer!

 

I used to be one of those guys who'd install every Dune II clone that I could find. I tried modding one of them once (Dune Legacy) and it still used .dat files which is an old DOS format. I tried to open the .dat files with a specific program but it didn't work. I thought to myself: "couldn't they just use .txt files". Of course part of the problem was me using .dat editors via WINE in Linux :P

 

Another thing about Dune Legacy: it sucks. The main game file is about 10,000 lines long and I don't know what any of the code does! About a year ago I realised that remaking old stuff is largely a waste, especially if you become dependent on old tools and old formats. So now, I've proved to myself that it is possible to build "from scratch" or at least beginning with the Unity 3D engine. The benefits of this method avoids the pitfalls that come with mods. I can't wait to update my website and make my own tutorials with this stuff I've learned. Programming in c++ is supposed to be fun, but the advice I receive on game dev comes from hardcore people and I can't relate to their advice. Their advice often misses the point.

 

Never rely on advice from experts until you are at their level.

 

I can empathise with people who get angry with the advice they receive on forums. It's easy to be discouraged from programming. I'm probably going to volunteer for Code Club sometime later this year, or at least make tutorials, and have them ranked on search engines, so folks can find them.

 

Anyone else got a story about ragequit with regards to programming?

Share this post


Link to post

Can't... stop... laughing... gaah... gotta ... breathe.

 

best thing is still "it still used .dat files which is an old DOS format."... I can just see the scene... you're flailing with your arms because of the insanity while everyone around is facepalming.

The ending .dat has no indication of itself of what it contains. dat is just a short for (binary) data, and the usual convention is to have only 3 letters after the dot.

Share this post


Link to post

You still haven't responded to questions and feedback in some places where you were pretty determined to talk about things. Still waiting for you to respond jeffnz.

Guess even here he doesn't want to answer ^^

Share this post


Link to post

best thing is still "it still used .dat files which is an old DOS format."... I can just see the scene... you're flailing with your arms because of the insanity while everyone around is facepalming.

The ending .dat has no indication of itself of what it contains. dat is just a short for (binary) data, and the usual convention is to have only 3 letters after the dot.

 

There's my mistake then. I was using Windows programs in WINE when there was no doubt a native linux program for opening binary files.

Share this post


Link to post

There's my mistake then. I was using Windows programs in WINE when there was no doubt a native linux program for opening binary files.

What you just wrote doesn't even make sense.

Share this post


Link to post

What you just wrote doesn't even make sense.

 

Probably it doesn't make sense, because in c you can open binary files with stdio or whatever, no need for applications :P If you open those DAT files from Dune II, it shows gibberish in your text editor right? Why don't the Dune Legacy devs just use ASCII?

Share this post


Link to post

Because:

1. it takes up a lot more space

2. you need to parse it

3. there is no need to make it human readable

4. don't change a running system

 

Sure they could do something else, but what's the gain? Why don't people store audio files in ascii? Or images?

Edited by Lauren
  • Upvote 1

Share this post


Link to post

My previous post:

 

I can't wait to update my website and make my own tutorials with this stuff I've learned. Programming in c++ is supposed to be fun, but the advice I receive on game dev comes from hardcore people and I can't relate to their advice. Their advice often misses the point.


So I got around to making an update. Pure HTML/CSS is great! This little page is extremely vague but the idea was to cover the FFFUUUUUUUU rage quit scenarios that new users may find themselves in. I'm going to add that sub-domain to my signatures on various forums. Maybe at some stage I'll write a proper tutorial with screen shots, and do a book review of Jazon Yamamoto's book. In the meanwhile I'm making my CSS style sheet available, along with all my example code.

 

I compiled my programs for both Windows and Linux. The programs are small, so I put all 3 in a single zip file. In the Linux version there's just a folder with a few BMP files, and there's the executable file. That's it, all the junk and Code Blocks files are wiped. I put the source code into its own folder so that everything is neat. World domination, here I come! Yesterday I wrote an email to every member of Parliament regarding Code Club and the lack of decent training in schools*. Even Code Club sucks. Their website is broken and it's so bloody slow. Go to http://www.codeclub.nz/ and select "I want to find an existing club" then select a region like Auckland or Canterbury and nothing even shows up. It says that no code clubs exist in New Zealand. Their database is wrecked.

 

*so far I have got responses from Andrew Little's office and Winston Peters' office, saying that they will pass the message. I may get a response in a month or two. FYI Andrew Little is leader of the Labour Party and Winston Peters is the leader of NZ First. Based on the media narrative (coverage of "housing crisis" etc) I'd say that Andrew Little will likely become PM next year. People are tired of John Key's endless reign.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×