Allegro.cc - Online Community

Allegro.cc Forums » Allegro.cc Comments » OS update

This thread is locked; no one can reply to it. rss feed Print
OS update
Eric Johnson
Member #14,841
January 2013
avatar

Better yet, include the hard drive and tell them the computer belonged to my grandmother, and that she used it primarily for online banking. Someone would surely buy it in hopes of digging up some old lady's banking information. :P

By the way, I took a look at your Tetrist code. It looks very clean. Nothing about it jumps out at me as being the cause of any memory leaks though.

bamccaig
Member #7,536
July 2006
avatar

By the way, I took a look at your Tetrist code. It looks very clean. Nothing about it jumps out at me as being the cause of any memory leaks though.

I'll take that as a compliment. >:( I also appreciate you looking. But yes, it's the kind of leak that likely requires a tool to identify. I'm not sure if valgrind is available on all platforms, but try running it through a tool if you have one. What blows me away is that it seems to start around 200+ MB of RAM according to a "system monitor" app. I may well be overlooking something stupidly obvious, and it has been a few months since I was actively hacking on it, but I think I'm sharing bitmaps data between instances so there really should be negligible graphic data.. And after so many pieces fall, since there is no winning condition yet, piece stop being created. The only thing left is collisions. Based on some poor man debugging and a hack of a Perl program to aggregate the results it seems I have two types of data leaking: lists and collisions. I need to dig into the code to try to figure out how, but hopefully valgrind will guide me.

Erin Maus
Member #7,537
July 2006
avatar

Seems like all you need for 2-D games is... the most basic trig. You rarely need integrals or derivatives, though understanding them can help things like physics and networking.

https://www.microsoft.com/en-us/research/wp-content/uploads/2005/01/p1000-loop.pdf

pg 1003-1006

I once implemented that algorithm from reading that paper. It was not easy.

---
ItsyRealm, a quirky 2D/3D RPG where you fight, skill, and explore in a medieval world with horrors unimaginable.
they / she

Chris Katko
Member #1,881
January 2002
avatar

Duh, I'm not talking about edge cases like NURBS and Bézier curves. ::) :P

Sprites != Tessellated Meshes

-----sig:
“Programs should be written for people to read, and only incidentally for machines to execute.” - Structure and Interpretation of Computer Programs
"Political Correctness is fascism disguised as manners" --George Carlin

Erin Maus
Member #7,537
July 2006
avatar

Edge cases are the worst cases. >:( (Fully implemented that algorithm was full of them, it makes me anxious thinking about it).

This game is 2D and I (once) used that algorithm in it. Of course, realizing it was patented, I had to revert to the simple triangulated meshes...

---
ItsyRealm, a quirky 2D/3D RPG where you fight, skill, and explore in a medieval world with horrors unimaginable.
they / she

Chris Katko
Member #1,881
January 2002
avatar

Of course, realizing it was patented, I had to revert to the simple triangulated meshes...

That's such bullshit. >:(

Algorithm patients are a huge realm of complicated bullcrap. Like, I get it, someone spent tons of time to build it. But then you get someone who independantly invents the same "obvious" algorithm, and you have some asshole big company buying the patent and suing anyone who uses it. So the whole world suffers instead of actually fostering innovation.

-----sig:
“Programs should be written for people to read, and only incidentally for machines to execute.” - Structure and Interpretation of Computer Programs
"Political Correctness is fascism disguised as manners" --George Carlin

Eric Johnson
Member #14,841
January 2013
avatar

bamccaig said:

I'll take that as a compliment. >:(

I meant it as a compliment. :)

Quote:

I'm not sure if valgrind is available on all platforms, but try running it through a tool if you have one. What blows me away is that it seems to start around 200+ MB of RAM according to a "system monitor" app.

It looks like Valgrind is available on most platforms. I've never used a memory management tool before. And what starts with 200+ MBs of RAM? Your game or Valgrind?

@Aaron: Just wanted to say that I really like your Web site. It's so clean and easy to read. :o I also think your Algae.Canvas project looks pretty cool.

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

@Aaron Bolyard
I love your vector graphics. Makes me want to use your Algae.Canvas project and render some SVGs!

Destructible terrain? Awesome. You've been doing some pretty cool stuff.

Regarding your website, I like it, but navigation is a little cumbersome. I also tried out a bunch of your stuff and it's all pretty neat. I tried the Brightside demo, but the keys weren't obvious and I couldn't really navigate through the game. Shooting laser beams into the building was pretty fun too. And I ran your Algae Canvas demo as well. It was taking between 12 and 16ms per frame though, which doesn't leave much room for logic and 60FPS at the same time. But it's amazing that you can render resolution independent graphics like that. Well done.

EDIT
I don't think valgrind comes on Windows.

Chris Katko
Member #1,881
January 2002
avatar

I don't think valgrind comes on Windows

Is Windows considered a real operating system yet? I know it's been alpha forever. I don't play around with toy operating systems that much.

;)

-----sig:
“Programs should be written for people to read, and only incidentally for machines to execute.” - Structure and Interpretation of Computer Programs
"Political Correctness is fascism disguised as manners" --George Carlin

bamccaig
Member #7,536
July 2006
avatar

It looks like Valgrind is available on most platforms.

All of them except WinBlows it seems. :-/ Still, there are a few free options available to use if you were so inclined. That said, it's probably just something I'll have to track down the hard way. I wouldn't go to the trouble of setting up and learning a new tool unless you're doing it for you. :)

Quote:

And what starts with 200+ MBs of RAM? Your game or Valgrind?

Turns out I'm just a noob. Upon closer inspection the 200+ MB was the process' VIRT (virtual) size which appears to include things like GPU memory and memory mapped files (not that my code does any of that) and anything else under the Sun. I don't know why it's over 200 MB, but I suspect it has nothing to do specifically with my program. The RES (resident, physical memory) is only about 38 MB, and SHR (shared memory) is about 27 MB. I think that means my program is only using approximately 10 MB which seems far more reasonable. Still probably more than it should need, but much less cause for alarm.

Is Windows considered a real operating system yet?

The vendor doesn't want it to be a real operating system because then they can't profit from the lack of features or function or reliability anymore and might have to actually contribute to the world again.

torhu
Member #2,727
September 2002
avatar

Just curious, what's a "real operating system"? ::)

bamccaig
Member #7,536
July 2006
avatar

A clever person might point to an RTOS, while a snarky one might say an operating system that real men would use! >:(

I might just say an operating system that is efficient and reliable and lets the administrators and users do what they need to without stupid limitations or blockers. >:(

torhu
Member #2,727
September 2002
avatar

Basically, you like getting software worth millions of dollars for free, with no limitations? Who doesn't. ::)

bamccaig
Member #7,536
July 2006
avatar

No, I like for the software to actually do what I tell it to, instead of displaying obscure errors and crashing or refusing to obey me. The fact that gratis (free as in beer) software exists that is more reliable than the software you are paying for is laughable to me. The fact that you're defending the vendor instead of outraged is even more amusing.

torhu
Member #2,727
September 2002
avatar

So, basically, you want UtopiaOS? If Linux is giving you too much trouble, how about trying Windows? It's pretty good. The obscure error messages are rare, it's pretty stable, lots of quality software is available, and most of the time it just works 8-)

bamccaig
Member #7,536
July 2006
avatar

torhu said:

If Linux is giving you too much trouble, how about trying Windows? It's pretty good.

Your ignorance is not very becoming of you. :-/

Quote:

The obscure error messages are rare, it's pretty stable, lots of quality software is available, and most of the time it just works 8-)

I can clearly see that you sir do not develop on Windows professionally. :-/

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

Trolls!

{"name":"medieval-madness-pinball-machine-trolls.jpg","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/5\/9\/5935f96718d4bbfbc7c98ef2b8fd8a46.jpg","w":640,"h":452,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/5\/9\/5935f96718d4bbfbc7c98ef2b8fd8a46"}medieval-madness-pinball-machine-trolls.jpg

L0L you guys are funny. Use whatever works for you.

EDIT
Bonus points if anyone knows the pinball game in the image above.

Chris Katko
Member #1,881
January 2002
avatar

bamccaig said:

I can clearly see that you sir do not develop on Windows professionally. :-/

FML. :'(

Two words. Visual. FoxPro. (Or NAV / C/AL, or any other enterprise Microsoft product like CRM or AX)

::gunshot::

-----sig:
“Programs should be written for people to read, and only incidentally for machines to execute.” - Structure and Interpretation of Computer Programs
"Political Correctness is fascism disguised as manners" --George Carlin

torhu
Member #2,727
September 2002
avatar

bamccaig said:

Your ignorance is not very becoming of you. :-/

Thanks, I do my best. :-*

Quote:

I can clearly see that you sir do not develop on Windows professionally. :-/

But I do, only it's a .NET Core web app ;D

bamccaig
Member #7,536
July 2006
avatar

torhu said:

But I do, only it's a .NET Core web app ;D

I've been developing Classic ASP and ASP.NET Web applications for about 12 years. The amount of breakage in the Microsoft technologies is laughable, and the poor quality of documentation/community support is even worse. When .NET works it's great. When it doesn't work good luck figuring out why.

Actually the latest issues I've been having is with memory. RAM tests fine, but the Windows OS keeps choking itself. It claims to have 5 GB "available", yet processes are crashing because they can't allocate memory. It may be related to the virtual memory (paging file). The OS (C:) was installed to a 120 GB SSD. I did everything I could to move and install software to the TB HDD (D:), but lots of very large Microsoft software forces itself to C:. When you select "D:" during a Visual Studio install (which is now like 12 GB or something crazy) it installs about 75% of that to C: anyway. :-/ At least, that has been my experience. For a while, I couldn't even upgrade Visual Studio because I couldn't free enough space.

To do it, I manually configured the paging file to be on D:. Windows 10 does not care for this one bit. It freaks out every time you boot and displays a warning to the user. Eventually, I opted to give it back a "1 GB" paging file on C: to shut it up, but kept a 32 GB paging file on D:. That still didn't make it happy. It would ignore the D: paging file space, and only allocate the 1 GB on C:. It basically ignores what you tell it to do, and has a mind of its own. Wonderful. That was causing lots of instability so I finally decided to try switching back to fully automated management of the virtual memory. Somehow, somewhere, C: has manged to free itself up to about 20 GB free so I figured sure, let Windows use C: again if it wants to. Ever since I switched back to automatically managed virtual memory the system has been less stable than ever.

On the other hand, Chrome has started using even more insane amounts of memory than usual. It's like pushing 4 GB of memory for the same set of ~20 tabs that I've had open for months. I don't know if Chrome is the culprit for the instability of late or Windows is or both, but it's all just ridiculous.

In Linux, you setup a fucking swap partition and Linux uses it. The only time it gets hairy is with fancy encryption setups since I don't think the developers have quite figured out how to make that user friendly. I'll readily throw the Linux installer developers under a bus (or maybe the encrypted partition developers) because their support for encrypted partitions during install is pathetic in 2018. If you have anything more complicated than a single drive with an automated layout good luck.

Neil Roy
Member #2,229
April 2002
avatar

bamccaig said:

It's like pushing 4 GB of memory for the same set of ~20 tabs that I've had open for months.

Hmmm... maybe you need fewer tabs open? I see tons of RAM used on all the browsers I tried for just a couple tabs. I can't imagine how much RAM 20 would need (well, I can imagine now... about 4 gigs! ;) )

---
“I love you too.” - last words of Wanda Roy

bamccaig
Member #7,536
July 2006
avatar

Neil Roy said:

Hmmm... maybe you need fewer tabs open? I see tons of RAM used on all the browsers I tried for just a couple tabs. I can't imagine how much RAM 20 would need (well, I can imagine now... about 4 gigs! ;) )

10 years ago I used to run 120 or so tabs at a time for months at a time. And I didn't have 8 GB of RAM to do it with! Web browsers are hungry beasts and enough is enough! Most of the memory is wasted trying to track me and delivery me ads and other junk I don't actually use or want or benefit from. It's MY computer, not theirs.

Neil Roy
Member #2,229
April 2002
avatar

Website images etc... were much smaller and often used 8bit GIFs back then to, not huge 32bit images and all the various programming languages. You could also watch them load and draw sometimes. I suspect more RAM is used for the larger images, all the various web languages and just for speed. There's more to all that RAM than JUST the website. There's all the support stuff in t he background which has grown quite a bit. You can't compare the two. To expect website to use the same amount of RAM 10 years later with 20+ tabs open?? Learn to close your tabs and use bookmarks.

I like how Firefox does things now, with multiple processes. I find it much smoother and faster than before.

Might be time to upgrade your system with more RAM. :) Welcome to the future. It will only become more demanding as time passes.

---
“I love you too.” - last words of Wanda Roy

Chris Katko
Member #1,881
January 2002
avatar

Yeah, I've got 32 GB of RAM. Even when I had 8 GB, I'd hit 100 tabs easily by time my work day was over.

With each window representing a "topic" with individual tabs being different compare-and-contrast materials on the subject.

-----sig:
“Programs should be written for people to read, and only incidentally for machines to execute.” - Structure and Interpretation of Computer Programs
"Political Correctness is fascism disguised as manners" --George Carlin

bamccaig
Member #7,536
July 2006
avatar

If I'm watching pr0n you can waste my RAM with high quality images. Otherwise, fuck off. The problem is that the entire Web is running amok with Web 2.0 fanciness done wrong, trackers, advertising, etc.. If you use script blockers and adblocks you'll realize that every Web page you visit is downloading scripts from 20 different sites and then downloading images and other resources from 20 sites to basically harass you for profit. On your own fucking machine. I don't believe for a second that it has to do with higher quality images. Most Web sites aren't covered in images.



Go to: