# Announcement: Beta code release

## Recommended Posts

##### Share on other sites
Good work!

One gripe though: you should not use hard tabs to indent code.

##### Share on other sites
Quote:
Original post by BBB
Quote:
 Original post by Anonymous PosterOne gripe though: you should not use hard tabs to indent code.

Yhea, I agree with you (not sure about the rest of the team but I think they would too).

Um BBB, perhaps you forgot we had a vote on this and most of us voted for tabs, not spaces [wink]. But if that's the only criticism on the code, I'm very glad though..

##### Share on other sites
Nice job guys [smile] Code looks solid.

##### Share on other sites
Quote:
 Original post by Anonymous PosterOne gripe though: you should not use hard tabs to indent code.

well it was discussed in one of our earliest design meetings.
The main argument against hard tabs are that they indent to much (up to 8 characters), and this is especially a problem in heavily nested code (and code shouldn't really be that nested), however, this is only a problem in some editors as the majority of (c++) editors takes this in consideration and only use like 4 characters.
On the other hand in heavily nested code you also would need a LOT of spaces, like 9-12 compared to 3-4 tabs, there could literally be more spaces than code, there is also the problem of extra spaces when copying code.
Hard tabs are also auto formating in editors like VC++ meaning comments line up nicely even while editing the code(slightly), this might be possible with soft tabs, but it would make the whole thing a bit more complicated.
Ultimately we decided on hard tabs, though it is really a matter of taste(like Pepsi vs Cola or VI vs Emacs) and will not actually impact the code at all except for the formatting issues.

Edit: Besides my typewriter teacher always said "use tabs instead of spaces", but then again she also claimed that ordIII on the ABC 806 computer in a terminal server config was the ultimate word processor.

##### Share on other sites
Seriously, that source code is lightyears ahead of the old NeHe code.

I wonder, if the tutorial sources are that good, then what will the actual tutorials look like?

##### Share on other sites
Good to see so far we have a positive response. Even though it’s only been out for a short time frame. The idea of using tabs was decided early on in the design process when we were devising a coding standard. It will most likely stay that way in order to have consistency.

##### Share on other sites
Well on the subject of tabs, I think most people will be fine with whatever, as long as you are consistent... which you have not been so far it seems. Most of the files have a mix of both tabs and spaces, and some comments are lined up, and some are not (which looks a bit messy to me). Many people like a tab size different to 4, and at the moment that messes some of the code up a bit.

Also it would be nice if you were consistent with the end of line characters. I would suggest you stick with the windows ones (like you have in main.cpp) and remove all the unix eol characters.

Anyway, those kind of problems aren't too important.

More importantly I think you should be focusing on the comments etc... which I think are a bit lacking, unless you plan to add a bit more? The comments throughout the methods are ok, but I think you really need some overview type comments, explaining the flow, what the purpose of each method is etc. This is particularly important for the early lessons, so people don't get lost, and also for the more complex lessons so people can have a quick glance through and find the parts they are interested in.

It's a good start though.

##### Share on other sites
Quote:
 Original post by ThorgrimMore importantly I think you should be focusing on the comments etc... which I think are a bit lacking, unless you plan to add a bit more? The comments throughout the methods are ok, but I think you really need some overview type comments, explaining the flow, what the purpose of each method is etc.
I believe the intent is that this will be explained by the accompanying lesson text, rather than cluttering up the sample code with too many comments that wouldn't actually be there in production code, but if there are specific areas that could be better commented I'm sure the team will be open to suggestions.

##### Share on other sites
Code looks good to me guys, great work!

##### Share on other sites
Ok, I think code indenting and EOLs, as some method comments are not a big deal, we'll fix that before release.

It's true, OpenGL and OOP newbies will need some more orientation in our code..

##### Share on other sites
Quite simple and readable code. It looks quite good

I can't wait to see more complex lessons

##### Share on other sites
Quote:
 Original post by Anonymous PosterI can't wait to see more complex lessons

Same here, and i will probably write most of them.
But even so, i think we have a pretty even phase of lessons planned, sure there are a handful of them that constitutes a larger step than most, like tga texture loading(05) and model loading (for now 16) since we can't split them in to smaller bit's, but all in all it shouldn't be that intimidating or complex compared to the previous one.

##### Share on other sites
First of all i'd like to say:

very very very nice work guys!

I am working on a Portable Game Engine for Win64 and Win32 atm and found some portability issues.
They're not critical but give ugly compiler warnings when compiling for WIN64.

The compiler complains about the OnKeyXXX(int ...) functions maybe you should change them to OnKeyXXX(WPARAM ...) .

this leads us to the nehekeydef.h:

the definitions have other values when using WPARAM (eg. NK_F1 = 112)

and last but not least in the neheWin32Window.cpp file you should replace

GWL_USERDATA with GWLP_USERDATA to avoid compiler errors when compiling for a WIN64 target.

that is about it and you're almost ready for 64bit ;-)

But besides this your new tuorial codes look very good.

##### Share on other sites
The thing about keys on win32 is a known issue, the thing is that for the ascii keys all systems return the same value, but F1 is not an ascii key and therefore we need to add a translation matrix in there for each system, and for win32 that has not been done yet, but it's not that hard.

##### Share on other sites
I knew there was something I meant to give feedback on;

// Really Nice Perspective CalculationsglHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);

Get rid of this.
It is redundant and all vaguely modern hardware and drivers completely ignores it anyways.

##### Share on other sites
I made a port of nehebeta to Lazarus/FPC. Currently only SDL window manager has been ported (Win32 and GLX will be ported later).

##### Share on other sites
Hi,

I was just wondering if this code has been run on Vista in fullscreen mode?
I have tried running old NeHe basecodes on Vista, and found them to run fine in wondowed mode but in fullscreen just display a black screen!

Is this a known issue at all?

Hybrid

##### Share on other sites
Is there an estimated time of completion? Winter or next Spring maybe?

##### Share on other sites
We can't give you an exact date for completion because we all are rather busy at the moment, but due to the fact that we only have to fix some bugs in the code, add some more comments and review all the lesson texts I hope we'll release before next winter [wink]..
(Well.. apart form that we're having 2 inches of snow right now, thats why I wrote next winter..)

@Srki: The Lazarus/FPC port looks good and runs fine, but much slower than the C++ code, did you notice any speed losses? (Mandriva 2007, FPC 2.0.4)

##### Share on other sites
I have tested FPC port only on Windows, and performance is nearly the same as original C++ code.

Maybe someone that has Linux could debug FPC port and find that slowdown.

##### Share on other sites
Everything seems to work fine in both fullscreen and windowed mode on Vista 32-bit running on a nVidia 8800GTX card.

##### Share on other sites
Sorry, I forgot to mention that. Yes, I was running the Win32 backend.

##### Share on other sites
Quote:
 Original post by Willbo_Everything seems to work fine in both fullscreen and windowed mode on Vista 32-bit running on a nVidia 8800GTX card.

with some changes compiles and runs flawless on Vista 64 bits too.

##### Share on other sites
Quote:
Original post by Shadowrom
Quote:
 Original post by Willbo_Everything seems to work fine in both fullscreen and windowed mode on Vista 32-bit running on a nVidia 8800GTX card.

with some changes compiles and runs flawless on Vista 64 bits too.

It would be great if you could submit those changes. [smile]

## 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

• ### Forum Statistics

• Total Topics
627700
• Total Posts
2978690

• 20
• 14
• 12
• 10
• 12