.NET is evil.

wyrd

Well-known member
Joined
Aug 23, 2002
Messages
1,408
Location
California
.NET is evil. It has lured me into its claws by providing such simple and elegant ways to accomplish tasks, which would of taken hours upon hours to do in another language. In the end, it has seduced me in such a way that I cannot refuse it. And now I am proud to call myself a lazy programmer, because if I can help it, Ill never program in another language again, as I would obviously not have the patience to deal with such ugly syntax.

This could only be the work of evil.

Today I was toying around with my DX utility class library, and was adding resize logic (which later I found out that I didnt need to). Just for fun, I fiddled around with the WindowState of the form that I was using, and resized it to FormWindowState.Maximize. I know it was mentioned a few times on these forums, but I totally forgot that it was a cheap way to simulate fullscreen for a game.

My GameSurface (holds primary and buffer) has been greatly improved in the flexibility it can handle, all because of what .NET does for me. You can resize the window at will, move it around, set it to a control on a form, or even set the form to fullscreen to get the "fullscreen" effect. All of this is basically done for me, and has saved me the pains of adding my own code to handle such features. Heck, it even has some helper methods such as Control.PointToClient. LOL. Yet more code I didnt have to write.

I know this is not ideal for "real" games, but Ill take a small performance hit any day to have a flexible class that I can use in any situation, which didnt take me long to code at all.
 
Hey wyrd!

you need something to make your app "real" fullscreen? try this:

a form with a Button "button1" - "button1_Click" Handles its Click-Event...

Code:
private bool m_FullScreen = false;
private Size m_RestoreSize = new Size(300,300);
private Point m_RestoreLoc = new Point(10,10);

private void button1_Click(object sender, System.EventArgs e)
{
	if(m_FullScreen)
	{
		this.FormBorderStyle = FormBorderStyle.Sizable;
		this.Location = m_RestoreLoc;
		this.Size = m_RestoreSize;
		this.TopMost = false;
		m_FullScreen = false;
	}
	else
	{
		m_RestoreSize = this.Size;
		m_RestoreLoc = this.Location;
		this.TopMost = true;
		this.FormBorderStyle = FormBorderStyle.None;
		this.Size = Screen.FromPoint(this.Location).Bounds.Size;
		this.Location = new Point(0,0);
		m_FullScreen = true;
	}
}

Hope this helps!
 
While I appreciate your help, there wasnt a single question in my post. My post was about how easy .NET is to use and how its spoiled me as a programmer.

To switch between "cheated" fullscreen and windowed, all you need to do is this (with the border set to none, obviously);

this.WindowState = FormWindowState.Maximized;
this.WindowState = FormWindowState.Normal;

Thats what I mean by .NET being evil, its just too darn easy.
 
Liu, how does it not benefit users? Are they not getting their products developed faster and with better features and so and so on and...........?
 
I coded a software and a game in C#. But little people use them
because they use windows 98,2000,XP and they are not willing to install .net framework of 20M in order to use a software below 2M.

I also feel that .net program runs much slower than C++.

You can download my software at:
http://www.funnyok.net/rufi/Software.htm
http://www.funnyok.net/rufi/Game.htm

The information is given in Chinese. But I think you can find the link to download.
 
Hmm, funny how people will download huge DirectX updates in order to play games and such, or even Windows updates that can be much larger than 20 megs.

And by the way the Framework is already part of XP service packs, and will be shipped with all future releases of Windows.

I simply dont understand all complaining. :(
 
You coded a game in C#? Maybe its just coincidence that the game looks almost identical to mine, but with minor changes.
 
Originally posted by wyrd
You coded a game in C#? Maybe its just coincidence that the game looks almost identical to mine, but with minor changes.

Yes, the the game is based on your source code, only minor changes and render engine with directdraw. I once informed you via email, have you forgot that?
 
I remember, but I didnt remember who it was. Still, what you said is misleading.

Now back to the subject at hand. :P

20 megs isnt that much in this day and age. Plus, future versions of windows will ship will .NET installed, and its already on the windows update site.

For a real application that is shipping on a cd, it could just check to see if .NET is installed, and if not go ahead and install it. It doesnt take the user any longer then hitting the "next" button and waiting 1 minute.
 
I love .NET. I love Microsoft. I love all the help files that keep me from polluting this board with all but the more difficult questions (wish others had that mentality). I used to do VB6 before .NET; I thought it was cool at the time. Then my friend told me about C#. Something C based but not so intemidating as C++. I did take a C++ course once, got a 102% as a final grade (extra credit)... but I didnt pursue it. I dont miss messing with pointers, function declaration, worthless help files that basically give you the syntax and if your lucky that syntax is correct. I dont know how many time the help file would tell me that it was looking for an address and Id get an invalid parameter run-time error, but once I changed it to a pointer or a static object it worked just fine, or some crap like that. Yes C# is the ultimate language for me. Low-level enough to do cool things and keep the idiots out, but high level enough that you dont spend a day just get the objects on your window to show up, much less work correctly. Now C++ (and Assembly for that matter - yes I fiddled in that a little bit for fun) are something I play with as a hobby. C# is what I moonlight with.

Thank-you Microsoft!

-Microsft Tool
:)
 
.NET is slow.

I can not recall to ever have worked with an IDE that needs to contemplate 10 seconds over simple cut & paste questions. :(

Apart from that ... it*s ok ;)
 
2003 didnt look much better in our tests.
But that was way back in March.

Do I understand you correctly? There have been significant improvements?
Or is this a hint to upgrady my hardware :) :)
 
Back
Top