Allegro.cc - Online Community

Allegro.cc Forums » The Depot » [SH15] The Human CPU Experiment

Credits go to amarillion, Bruce Pascoe, devo_au, Edgar Reynaldo, Elias, GullRaDriel, Mark Oates, Peter Hull, and SiegeLord for helping out!
This thread is locked; no one can reply to it. rss feed Print
 1   2 
[SH15] The Human CPU Experiment
Bruce Perry
Member #270
April 2000

The Human CPU Experiment

Do you take your computer for granted? Have you ever wondered what it must be
like to be your computer? Now you can try it. (Some programming experience may
be required to get the most out of this game.)

Title screen

{"name":"11130-1","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/3\/f\/3f318a9e6da261c5293d8b0840bb3789.png","w":1031,"h":762,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/3\/f\/3f318a9e6da261c5293d8b0840bb3789"}11130-1

Gameplay :o

{"name":"11129-1","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/1\/8\/18ffed44d16212016d0825522627dcf3.png","w":1031,"h":762,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/1\/8\/18ffed44d16212016d0825522627dcf3"}11129-1

Don't let that daunt you. Give it a go.

{"name":"11094-1","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/a\/c\/ac7d4c5fa3f819c149494126ce6346a6.png","w":1040,"h":806,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/a\/c\/ac7d4c5fa3f819c149494126ce6346a6"}11094-1

Links

Download - Blog

--
Bruce "entheh" Perry [ Web site | DUMB | Set Up Us The Bomb !!! | Balls ]
Programming should be fun. That's why I hate C and C++.
The brxybrytl has you.

Bruce Pascoe
Member #15,931
April 2015
avatar

Hey, this is pretty creative! :D

GullRaDriel
Member #3,861
September 2003
avatar

Well done, Bruce !

I liked the way it go all pesky when wrong ^^

I played it 4 times in a row.

I don't want to spoil those who're gonna play it, but it's worth the try !

Mathematics would have been more pleasant to learn fo me if I had learned them in your entry ;-)

"Code is like shit - it only smells if it is not yours"
Allegro Wiki, full of examples and articles !!

amarillion
Member #940
January 2001
avatar

Hiscore: 9A6F: I beat HAL 9000!

I really like the steadily increasing difficulty of it. Towards the end it gets really creative doing boolean operations on base 4 numbers with two calculations on the stack. And for the CHR$/ASC conversions, that's just guessing for me.

For the hiscore table. The only one I don't recognize is MCP - are you really referring to Microsoft Certfied Professional?

edit: looking at the source code, I'm taken by the use of unicode in variable names:

From hyperparticles.d:
version = usePoincaréBall;

:D

GullRaDriel
Member #3,861
September 2003
avatar

Master Control Program, you punk.

"Code is like shit - it only smells if it is not yours"
Allegro Wiki, full of examples and articles !!

amarillion
Member #940
January 2001
avatar

Duh of course :-X

Bruce Perry
Member #270
April 2000

Indeed! I had to remove an é from my SpeedHack blog because it didn't render correctly :-X

Glad you like it :)

--
Bruce "entheh" Perry [ Web site | DUMB | Set Up Us The Bomb !!! | Balls ]
Programming should be fun. That's why I hate C and C++.
The brxybrytl has you.

GullRaDriel
Member #3,861
September 2003
avatar

M. Poincaré was French. The accent made his name so it is never spoken like 'Point car' (point voiture). A comical French to English translation could have been UseSquarePointBall ;-p

"Code is like shit - it only smells if it is not yours"
Allegro Wiki, full of examples and articles !!

Bruce Perry
Member #270
April 2000

I just got E4D9, which makes me feel beating Data is just about achievable on a good day with some practice.

When I was tired from staying up all night, I couldn't get close. The tiredness was a bit of a problem given I was trying to balance the scoring so that beating all the robots was a good balance of challenging but achievable. I think I must have got it about right though, at least for us lot. :)

--
Bruce "entheh" Perry [ Web site | DUMB | Set Up Us The Bomb !!! | Balls ]
Programming should be fun. That's why I hate C and C++.
The brxybrytl has you.

Elias
Member #358
May 2000

I can't figure out the "computer says NO" ones :P

--
"Either help out or stop whining" - Evert

Peter Hull
Member #1,136
March 2001

"Computer says no" is from a TV program called Little Britain (but maybe that's not what you meant?)

I was interested to see that Ben and Siegelord wrote their entries in D and Rust respectively and I'd love to hear about how you found that, compared to C/C++.

amarillion
Member #940
January 2001
avatar

When computer says no
no, you have to respond no for exactly as many times, using the correct form (no n0 No etc.)... except when it's prefixed with sudo...

devo_au
Member #15,282
August 2013

Text based math game with old monochrome feel. Had 2 gos. First until it started asking me mod questions, then I ran out of time. Second, I ignored the mod, then the hex, then the Binary ??? and I noticed your particle engine kicked in. Well done mate, very good effort.

it wasn't me, it was other kids

Bruce Perry
Member #270
April 2000

Thanks :)

As always, D is a breath of fresh air. Basic conveniences like GC built into the language, not to mention random acts of syntactic sugar all over the place (like $ inside [] to refer to the length of the current array). I do of course have one or two reservations about it as a serious language: difficulty avoiding the GC if you need to, and a slight case of 'only one compiler really works so far'. That's DMD, and while it excels on executable size, it isn't the best for generated code speed. Then again, these things are always improving. There's also Visual D which helps a lot with the editing process, although one or two things could be slightly nicer with very little effort (like autocomplete looking at substrings anywhere instead of only matching the beginning). One other thought is that you do have to know D's semantics, and if you aren't entirely clear, it's possible to shoot yourself a bit (e.g. 'foreach' loops if you don't know to use 'ref' at the right times). A language like C# might be marginally better in that regard because the spec is smaller. But compared to C/C++ in terms of language usability - no contest. (Of course C/C++ have widespread support and tooling on their side though, despite STILL requiring header files - really, in this day and age? Why wasn't it C++11's PRIMARY focus to get rid of those monumental wastes of time?)

I'm also looking forward to hearing SiegeLord's Rust review :)

--
Bruce "entheh" Perry [ Web site | DUMB | Set Up Us The Bomb !!! | Balls ]
Programming should be fun. That's why I hate C and C++.
The brxybrytl has you.

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

Crashes right away with an access violation.
{"name":"609556","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/f\/6\/f67be5faf2f19b27ecc958abe7eb5bc5.png","w":294,"h":165,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/f\/6\/f67be5faf2f19b27ecc958abe7eb5bc5"}609556

I don't have a working D compiler installed so I can't really test it further. gdb fails to recognize it as an executable file format it knows.

Bruce Pascoe
Member #15,931
April 2015
avatar

@Bruce Perry
I don't mind headers so much in C, I view them as a necessary evil of the compiler/linker dichotomy, but they are THE primary reason I hate using C++. Want to write a library in C++? Good luck hiding your dependencies from the outside world because all your private members have to go in the public header! (I realize the pimpl idiom solves this, but it should be built into the language.)

The biggest problem with C++, I think, is that it strives for backward compatibility with C at all costs. It would benefit greatly from breaking that shackle, I think.

SiegeLord
Member #7,827
October 2006
avatar

Now I feel bad about making my computer do all this math stuff :-[.

I'm also looking forward to hearing SiegeLord's Rust review :)

Not going to highjack this thread... I'll make some comments on my own thread ;).

"For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18
[SiegeLord's Abode][Codes]:[DAllegro5]:[RustAllegro]

Mark Oates
Member #1,146
March 2001
avatar

{"name":"609559","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/4\/0\/401ffc07da9b7ccacd21a33432b1964d.png","w":1919,"h":1079,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/4\/0\/401ffc07da9b7ccacd21a33432b1964d"}609559
it's gametime 8-)

[edit] nerd credit is also obliged to the fact that Data is the boss of this high score table. #completelyagree

--
Visit CLUBCATT.com for cat shirts, cat mugs, puzzles, art and more <-- coupon code ALLEGRO4LIFE at checkout and get $3 off any order of 3 or more items!

AllegroFlareAllegroFlare DocsAllegroFlare GitHub

Bruce Pascoe
Member #15,931
April 2015
avatar

I think that's considered cheating... ;)

SiegeLord
Member #7,827
October 2006
avatar

It's called a lookup table, nothing wrong with that ;).

"For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18
[SiegeLord's Abode][Codes]:[DAllegro5]:[RustAllegro]

Bruce Perry
Member #270
April 2000

Edgar, sorry to see that. You did extract it from the zip before running it, I assume? Shame there's no stacktrace - there normally would be, under the dashes. If you do have time, you might be able to install Visual Studio 2013 Community Edition (it's free) and attach it as a debugger and find out more. You might even not need D, although you will probably have to start it with the debugger attached (somehow) rather than running it and attaching later.

Mark, how did you do with your cheats in place? Did you get to some questions you weren't prepared for? :)

--
Bruce "entheh" Perry [ Web site | DUMB | Set Up Us The Bomb !!! | Balls ]
Programming should be fun. That's why I hate C and C++.
The brxybrytl has you.

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

gdb says its not an executable file format. And I can't install VS2013 because it needs like SP3 and .NET 4.5 or something.

I tried running it through VS2010 and this is all it gives me - there's no debugging info.

Quote:

Unhandled exception at 0x00000000 in HumanCPU.exe: 0xC0000005: Access violation reading location 0x00000000.

Bruce Pascoe
Member #15,931
April 2015
avatar

That's a null dereference. Something failed to load properly. I wonder if it's that XP XInput initialization bug that was recently fixed...

Bruce Perry
Member #270
April 2000

Will it not even show you a stack trace?

--
Bruce "entheh" Perry [ Web site | DUMB | Set Up Us The Bomb !!! | Balls ]
Programming should be fun. That's why I hate C and C++.
The brxybrytl has you.

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

 1   2 


Go to: