Is Cplusplus.com doing well?

Pages: 123
andywestken wrote:

Out of interest, which system are you referring to?
Windows 7 64 VS2012.

And when you say it's 4 bytes, are you talking about the size of the Boolean itself, or the space it occupies?
I'm not quite sure what you mean, I tested with
1
2
3
4
5
6
7
8
9
10
11
Imports System
Imports System.Runtime.InteropServices

Module Module1

    Sub Main()
        Dim b As Boolean
        Console.WriteLine(Marshal.SizeOf(b))
    End Sub

End Module
I haven't touched VB in almost a decade and found this method with a quick search so I wouldn't be too surprised if it isn't the correct way of checking. I did check against the values listed here http://msdn.microsoft.com/en-us/library/47zceaw7(v=vs.110).aspx and got all the same result except Char is giving a value of 1.
Mitch wrote:
I really dislike downloading a game that is over 16 MBs...
Those days are just about over bud.
Mitch wrote:
I (sadly) have to disagree. I was using dial-up until just this past year.
The market has moved on from this. Only 6% of US adults use still use dial-up (I can't speak for other countries). My point being, your target audience is the majority. It might seem rude, but if I'm a large company developing a game, I don't care about dial-up users. I'll tailor my product to the needs of the 94%.
Mitch wrote:
You don't need Lua to do dynamic, ANYTHING, you can do it yourself in C/C++;
Well of course you don't need it. That doesn't mean it can't be useful.
Last edited on
I suppose this makes the Cry-Engine a crap engine that makes terrible games because it uses lua.
(More about Booleans...)

I have to admit that I haven't found MSDN or any of the assorted newgroups discussions on the subject that much of a help....

But it appears that the size reported by Marshal.SizeOf is what is needed to store the value in the appropriate unmanaged type, so you know what space is required when calling native code directly. The various integral and floating point types map directly. But the Unicode .Net char is mapped to a C-style (1-byte) char and Boolean becomes an 4-byte int (I assume because this can again be used by C, etc).

As VB's Boolean is an alias for the .Net System.Boolean, its actual size should be the same as for all other .Net languages; the CLI specification states that "[a] CLI Boolean type occupies 1 byte in memory".

But the amount of room it actually takes up depends on alignment, and it does appear that it is often aligned on a 2-byte, 4-byte (and maybe even 8-byte?) boundary for performance reasons, so sometimes it might as well be the bigger size.

To confuse matters further, VB's (deprecated) Len function still reports 2 for Boolean. This is apparently to provide backward compatibility with data files written by the older versions of VB (VB6 and earlier) which stored Boolean values in 2 bytes when serializing data.

Back in the days of VB6 (and earlier) the Boolean was stored internally using 2 bytes. But this came from OLE Automation, which defines the type VARIANT_BOOL (a typedef of short). Of course, this just shifts the question to why did the OLE Automation guys decide that a 2-byte Boolean was a good idea...

Andy
Last edited on
But this came from OLE Automation, which defines the type VARIANT_BOOL (a typedef of short). Of course, this just shifts the question to why did the OLE Automation guys decide that a 2-byte Boolean was a good idea...
The name suggests there was a union in there somewhere.

Load the file, put the data in classes, with some function pointers to Scripts...
It's like an interpreted language, but without the interpreting.
This is waste of man-hours. In a properly designed game engine, gameplay code doesn't need to run as fast as resource handling or rendering code. It's essentially human-bound.
Interpreted languages also offer features that are hard to implement in C++, like dynamic reloading (a.k.a. hot swapping). Lua could even be modified to save the state of the entire virtual machine e.g. for debugging purposes.
I suppose this makes the Cry-Engine a crap engine that makes terrible games because it uses lua.

You said it, not me! But really, I was mostly thinking about small projects (indie).
Though truthfully I dislike "engines" and prefer to write games without one.


Helios, how is that a waste of man hours?

Honestly, I think the Lounge is a waste of man hours, not optimizing anything.

Though I REALLY dislike interpreted languages inside games,
it is also a very easy way to hack the game...
Last edited on
I think this guy is trollin. Just saiyan
I'll second that
Honestly, I think the Lounge is a waste of man hours, not optimizing ANYTHING.


>_>
@ResidentBiscuit
I agree. I thought that from the beginning and didn't even bother replying to his posts.
VB's Boolean use 2 bytes. How stupid is that?
Looking at C:
1
2
3
printf("%d", sizeof(
!TRUE //We want to see size of type used by logic operators
));
4
I believe I could increase it to 8 by selecting right compiler and options.
Last edited on
Lachlan Easton wrote:
I suppose this makes the Cry-Engine a crap engine that makes terrible games because it uses lua.

Main Cry-Engine Rendering Loop:

1
2
3
4
5
6
7
while(IsWindowActive())
{
    RenderEverything();
    ExecuteLua();
    unsigned long i = 0;
    while(i < 0xFFFFFFFE) { WastePreciousRenderingTime(); ++i; }
}
Last edited on
Tut, tut, tut, should've used a for loop;
@EssGeEich does that mean you are for or against Lua in the Cry-Engine?

Honestly, I think the Lounge is a waste of man hours, not optimizing ANYTHING.

If you dislike it so much, please be kind enough to not click the link in the left hand side of your screen labeled "Lounge". Otherwise, just keep quite about ridiculous opinions, because if you haven't noticed this thread was started by you inside the lounge!
I dislike the Cry-Engine itself, not the LUA side of it.
Otherwise i'd be showing you a LUA script.
[EDIT]
This has been proved to be a fail as you can see in the next posts from Script Coder and me, but you can read and laugh at it too:
[/EDIT]
Script Coder wrote:
If you dislike it so much, please be kind enough to not click the link in the left hand side of your screen labeled "Lounge".

Is the lounge a Cry-Engine dedicated section?
Script Coder wrote:
Otherwise, just keep quite (quiet) about ridiculous opinions

Isn't this the reason why the Lounge exists?
Last edited on
Edit, double comment (it just didn't post until I refreshed).
Last edited on
I think this guy is trollin. Just saiyan


I dislike the "trolling" internet slang. And I am not trying to provoke anyone.
However, I really don't mean to seem that way, and I plan to come here often.


If you dislike it so much, please be kind enough to not click the link in the left hand side of your screen labeled "Lounge". Otherwise, just keep quite about ridiculous opinions, because if you haven't noticed this thread was started by you inside the lounge!


I really didn't mean it like that... I am just saying that there are more productive things to do.
I really like the Lounge and although my thread is strange, I really just felt like talking.
Sorry if I upset you, the forum really is cool.
@EssGeEich My comments that you quoted were not directed at you, sorry for any miscommunication on my part. Also, thank you for the English correction :)

@Mitch Ah, I see your point. But the lounge is not meant to be "productive" in the normal sense, but it is productive in allowing users to express other opinions outside the realm of C++.

I think this guy is trollin. Just saiyan

Very ignorant question: What is the exact (or if none exists, your personal) definition of the term "troll" with reference to internet forums? And could someone please (preferably the people who made the above comment) please refer to both the definition and examples of Mitch's posts that confirm that he is a troll.
Script Coder wrote:
@EssGeEich My comments that you quoted were not directed at you, sorry for any miscommunication on my part. Also, thank you for the English correction :)

LOL I JUST NOTICED Hahahahahah Sorry lol
This guy doesn't seem like a troll at all.

#fuqumean

Yea I really never want to use Lua, mainly because everyone does. Ruby seems different.

(For small indie games)
Last edited on by Fredbill30
Pages: 123