Author Topic: Ask something - We can help.  (Read 144790 times)

Stupot

    • I can help with play testing
    •  
    • I can help with proof reading
    •  
    • I can help with story design
    •  
    • I can help with voice acting
    •  
Ask something - We can help.
« on: 19 Dec 2008, 20:06 »
I have a question I want to ask but I didn't feel it was important enough to warrant it's own thread clogging up gen-gen.  So I thought I'd create this thread for all those niggling questions which pop up from time to time.

You know when you can remember parts of a film or a song but can't for the life of you remember the title?  Things like that.

So if you think about it in the future and have a niggling question which you don't feel deserves it's own thread (often the query is solved within the first few posts, anyway), then remember this thread lingering around waiting for your posers.  You guys are normally pretty good at these kinds of question.

-------------------------------------------------

So anyway.  Here's my question.

Back when the net was young, you would type in some random website names such as "www.ilovepizza.com" or "www.rhubarbandcustard.co.uk" and it would take you so a website who provided free email addresses based on hundreds and hundreds of such domain names...  I'm assuming they bought the domain names first and then dished out the corresponding email addresses for users... for example I could request "stupot@ilovepizza.com"

I can't remember what the actual website was called, I used to just type in random URLs and i'd eventualy find it...  But this was 10 or so years ago and I havent seen this website for ages...

Can anyone else remember the site that I am thinking of and does it still exist?
If not, what happened to the hundreds of URLs they owened?

cheers

RickJ

  • fix'n one thing and break'n two ...
    • I can help with scripting
    •  
    • I can help with story design
    •  
Re: Ask something - We can help.
« Reply #1 on: 20 Dec 2008, 04:41 »
There's always the wayback machine : http://web.archive.org/collections/web.html

Re: Ask something - We can help.
« Reply #2 on: 20 Dec 2008, 14:52 »
Ok, a question that has bothered me for a while.

In C, when you set a pointer to point to an unknown memory slot (either by adding to it or simply setting a number to it), is there any possibility to cause a segmentation fault or any problem at all?

Note I'm talking about pointing somewhere, but not reading/writing over there.

I personally think there should never be a problem, as long as you don't attempt to read/write over it, which may or may not produce a segmentation fault depending on how lucky you are. Some people seem to disagree, one of them being my professor.

Ghost

  • Guest
Re: Ask something - We can help.
« Reply #3 on: 20 Dec 2008, 15:22 »
I personally think there should never be a problem, as long as you don't attempt to read/write over it, which may or may not produce a segmentation fault depending on how lucky you are. Some people seem to disagree, one of them being my professor.

What you describe is the equivalent of leaving a loaded shotgun lying around. As long as you're alone in the room, nothing will happen because you know that shotguns are harmful things. But as soon as people come in, one of them *will* shoot himself in the foot(*).
You can get errors by using a pointer that way, and also memory leaks and all sorts of other nasty stuff, but you yourself know about that and will be careful. Others using your code will not. And since there is the common saying that code should always be fool-proof, I understand your professor's concerns.  ;)

(*) Heaven knows I always do that ;)
« Last Edit: 20 Dec 2008, 15:24 by Ghost »

Re: Ask something - We can help.
« Reply #4 on: 20 Dec 2008, 15:55 »
well, basically, we were having an example on how to use pointers instead of arrays.
Code: Adventure Game Studio
  1. //p is a pointer
  2. for (i=0; i<MAX; i++)
  3. {
  4.     *p++ = i;
  5. }
I know it's convenient to just say p[i ]=i, but this is for the sake of an example. Note that p is never used again after this code. This shouldn't ever produce a segmentation fault, right? Even though, when the loop ends, the pointer points to a place we don't know... But my professor insists that the above code might cause a segmentation fault.

Ghost

  • Guest
Re: Ask something - We can help.
« Reply #5 on: 20 Dec 2008, 22:46 »
But my professor insists that the above code might cause a segmentation fault.

I'm not rock-steady on the whole pointer issue, but as long as he says MIGHT, he's right. Because at the end of the loop, the pointer could point anywhere, even to a segment of memory another bit of your code is already using. That's where a violation might happen, though the chance is small, and grows smaller the more RAM you have.

« Last Edit: 20 Dec 2008, 22:48 by Ghost »

Re: Ask something - We can help.
« Reply #6 on: 21 Dec 2008, 01:47 »
Sorry for taking over the thread, but...

I'm not convinced. Every variable, including pointers, has a value when declared (which is what was left in the memory from other programs). Pointers having a "random" value when declared never generated any problems. So why now?

My other professor says that the above code never produces a segmentation fault. As long as you don't access that memory slot in any way (either read or write over it), it's all good.

Another opinion I heard is that it can only produce an error in some operation systems but not all.

I know it's pointless knowing anyway, because nobody would even want to have stray pointers, but it has been bugging me a lot :P

LimpingFish

  • Mittens Serf
  • Boink!
  • LimpingFish worked on a game that was nominated for an AGS Award!
Re: Ask something - We can help.
« Reply #7 on: 21 Dec 2008, 02:03 »
How do they get the figs into the Fig Rolls? :-\

(deleted)

  • AGS Baker
  • (deleted) worked on a game that was nominated for an AGS Award!(deleted) worked on a game that won an AGS Award!
Re: Ask something - We can help.
« Reply #8 on: 21 Dec 2008, 12:02 »
(deleted)
« Last Edit: 28 May 2017, 11:52 by (deleted) »

bicilotti

  • Guest
Re: Ask something - We can help.
« Reply #9 on: 21 Dec 2008, 13:06 »
Quote
Next Question:
What are the... err, uhh... qualifying, requisite required requirements for an AGS game's eligibility for the 2008 AGS awards? I realize that I'm an idiot for asking, and that's why I'm asking here instead of somewhere else. (Not that anything with me on board is worth the sand in Nelly's sock heels. Just seeking deadline motivation, is all.)

Put it in the big database before 1st Jan 2009 and you're in!

RickJ

  • fix'n one thing and break'n two ...
    • I can help with scripting
    •  
    • I can help with story design
    •  
Re: Ask something - We can help.
« Reply #10 on: 21 Dec 2008, 15:55 »
Quote
I personally think there should never be a problem, as long as you don't attempt to read/write over it, which may or may not produce a segmentation fault depending on how lucky you are. Some people seem to disagree, one of them being my professor.
@Paper Carnival:  Your professor is wrong.  A "segmentation fault" is a hardware interrupt generated in response to a memory read/write to an address outside of a range specified by a register or RAM table of some sort.  The setting of a pointer variable to a value will cause a memory write to the address of the pointer variable but not to the address which it contains.   Read and write signals to the pointer's address are not issued until memory at that address is accessed.  Since there is no memory access there will be no interrupt and hence no segmentation fault.  This is all done in hardware so the operating system is irrelevant.   It's entirely possible to have a software segmentation fault checker but the overhead would be extremely high and I have never heard of it being done.

I agree with you that this should never be a problem and I'll give a couple of good reasons why.  First of all let us assume that we have an application that contains some code similar to the one you give.  Further let us assume that this is application is a closed loop controls system controlling the flying surfaces on a 757 Jumbo Jet.  And just to make things interesting let us also assume your professor is a passenger on the same plane flying at 35000 ft.

1.  Fault response - How should our application respond to a segmentation fault of the variety that you describe (i.e. the application is otherwise operating normally and will continue to do so if the fault is ignored)?  There are two obvious choices; abort the application or ignore the fault.  In this instance I believe your professor would prefer the control system ignore inconsequential segmentation faults be ignored rather
plunge to his death.   What about other applications?  Can you name any application where it is better to crash than to continue running normally?  So if the only reasonable response to a fault condition is to ignore it then what purpose does it serve to detect it.

2. Reliability/Maintainability - No suppose our application is very mature.  It has been in use on thousands of aircraft for over a decade.   With millions of total hours of operation our application has proven to be stable and reliable.     Now suppose that a single line of trivial code, unrelated to the pointer in question, is added and the application is recompiled.  What if over all these years that last p++ left p just a byte shy of the segment boundary and the new code pushed it just one byte past.    This is a horrible situation - In a complex application it could be a long time before such a bug finally revealed itself.  In this kind of situation any kind of changes made to the application, regardless of how small or trivial, would incur huge and unacceptable risks.

3. Redundant-Convoluted Code - In the scenario you give in the example the pointer value would have to be tested before incrementing it.   So either there must be a redundant if statement (there is already a p<MAX test) before incrementing the pointer or the loop must be restructured in a less obvious and understandable way (which would also likely involve redundant code in one way or another.   No useful purpose is served by requiring redundant and/or convoluted code.  In my opinion redundant, convoluted code fits Ghost's description of "...leaving a loaded shotgun lying around...." much better than a pointer containing an invalid address.

4. Runtime vs Compile Error - If the compiler were able to pick this up then it could be argued that knowing that a pointer contained an invalid address could be useful in some cases.   However this is not the case; segment faults occur at runtime and may not occur until long after the application has been released and in the field.

InCreator

  • Useless since 2003
    • I can help with AGS tutoring
    •  
    • I can help with animation
    •  
    • I can help with backgrounds
    •  
    • I can help with play testing
    •  
Re: Ask something - We can help.
« Reply #11 on: 22 Dec 2008, 05:22 »
My unanswered mystery of all time:

Is nerve impulse physical? I mean, is it an electric, bioelectric, anything material we could capture or transfer?
If so, can we redirect nerve impulse into something else? Like a wire? Third string of nerves, like animal ones?
I know that if you lose a finger, it can be sewn back and nerves too. So, it's likely. Why havent anyone then thought about...

-- Is is possible to connect nerves of two people so if one gets hammered onto toe, another one yells?

Also, another big riddle is - where could I actually get answers to questions like this? I mean, apart from having physics/anatomy/whatever professor as a friend? Internet might have everything, but sometimes seems to lack very basic knowledge of scientific progress. Wikipedia/howstuffworks/etc well-known sites are brief and other sites are either well hidden or non-existing.

Kind of sad that the flagship of information age can satisfy any crazy request for porn, but not knowledge...  >:(
« Last Edit: 22 Dec 2008, 05:29 by InCreator »

Ghost

  • Guest
Re: Ask something - We can help.
« Reply #12 on: 22 Dec 2008, 13:22 »
Is is possible to connect nerves of two people so if one gets hammered onto toe, another one yells?

Weird thought, but I can see that this should be possible. All a matter of finding the right nerves and connect those- but it would require a physical connection, wouldn't it? So you'd need to sew these people together somewhere, which has a very Hellraiser touch to it.
« Last Edit: 22 Dec 2008, 13:25 by Ghost »

Re: Ask something - We can help.
« Reply #13 on: 22 Dec 2008, 13:47 »
Thank you RickJ for clearing that up. My professor is often wrong with details like this, but at least the man knows how to teach. It's only my first semester in university and I'm glad I can understand when he's wrong (it's not the first time).

InCreator: I suppose it is possible, but still freaky. And Ghost, I don't think it would require a physical connection, both people could have some kind of transmitter/receiver that picks up the nerve signal and convert it to something else and vice-versa, like a modem works. I'm next to clueless with this stuff, so correct me if I'm wrong.

Oh, the transmitter/receiver idea would make the concept of a voodoo doll possible :D.

InCreator

  • Useless since 2003
    • I can help with AGS tutoring
    •  
    • I can help with animation
    •  
    • I can help with backgrounds
    •  
    • I can help with play testing
    •  
Re: Ask something - We can help.
« Reply #14 on: 22 Dec 2008, 16:11 »
Quote
Oh, the transmitter/receiver idea would make the concept of a voodoo doll possible

Man, think BIG! Think gaming!!!!

A wireless spinal impulse controller! Like play Crysis and actually feel tropical breeze on your face, taste salt water and smell gunpowder... whoah! And coming back to porn... eh
« Last Edit: 22 Dec 2008, 16:13 by InCreator »

Babar

  • Creator, Mutator and Defecator
    • I can help with proof reading
    •  
    • I can help with scripting
    •  
    • I can help with story design
    •  
    • I can help with translating
    •  
Re: Ask something - We can help.
« Reply #15 on: 22 Dec 2008, 16:12 »
I think I know how this movie ends...
The villain overloads the circuits, and kills everyone in real-life that he kills in VR. And then the hero comes and busts everything up.
The ultimate Professional Amateur

Now, with his very own game: Alien Time Zone

Re: Ask something - We can help.
« Reply #16 on: 22 Dec 2008, 16:18 »
Quote
Oh, the transmitter/receiver idea would make the concept of a voodoo doll possible

Man, think BIG! Think gaming!!!!

A wireless spinal impulse controller! Like play Crysis and actually feel tropical breeze on your face, taste salt water and smell gunpowder... whoah! And coming back to porn... eh

That's like... The Matrix.

But now you mention it, wasn't there some kind of experimental microchip they put on someone's brain, and he then was able to kinda move the mouse pointer with his mind ???

Stupot

    • I can help with play testing
    •  
    • I can help with proof reading
    •  
    • I can help with story design
    •  
    • I can help with voice acting
    •  
Re: Ask something - We can help.
« Reply #17 on: 22 Dec 2008, 16:34 »
There's always the wayback machine : http://web.archive.org/collections/web.html

Thanks Rick... I spent a while on that typing in the kinds of domain names the site would have used, but I'm not getting any results... does anyone else remember what I'm talking about [Re: first post] ?

Joseph DiPerla

  • Joseph DiPerla, Adventure Game Creator Wannabe!
    • I can help with backgrounds
    •  
    • I can help with characters
    •  
    • I can help with play testing
    •  
    • I can help with story design
    •  
    • I can help with translating
    •  
    • I can help with voice acting
    •  
    • I can help with web design
    •  
Re: Ask something - We can help.
« Reply #18 on: 22 Dec 2008, 19:19 »
I am looking for a c++ pathfinding library that is supported on atleast windows, mac and linux. Is there any out there that can work just by loading an image as a mask and making that be a pathfinding area? Basically the way any other engine works, just as a c++ library.
Joseph DiPerla--- http://www.adventurestockpile.com
Play my Star Wars MMORPG: http://sw-bfs.com
See my Fiverr page for translation and other services: https://www.fiverr.com/josephdiperla
Google Plus Adventure Community: https://plus.google.com/communities/116504865864458899575

Re: Ask something - We can help.
« Reply #19 on: 24 Dec 2008, 04:59 »
Someone here in this thread had mentioned something about someone making around 100 games a year, for some kind of competition or for school perhaps?  But the guys ended up not finishing them.

I've been trying to find the thread that someone had made mention of this.  They also supplied a URL to this persons website.  I'm trying to find that website.
I had bookmarked it back in the day, but I formatted not too long ago and it's gone.  I kept meaning to take a good look at the website and games.