|
Allegro.cc site tour |
Thomas Fjellstrom
Member #476
June 2000
|
Yet, it'd be just as demanding on resources, and take MUCH longer to capture and turn into a nice interactive video walkthrough. -- |
CGamesPlay
Member #2,559
July 2002
|
Quote: Why does it take so long to load each time? If you are referring to the "Loading..." screen, then it's because it has to perform an RPC to Allegro.cc. If you're not referring to the "Loading..." screen, then keep in mind that the tour bubble won't pop up until the page has finished loading (including all images). Quote: And why are you hiding the bulk of code? "Hiding"? http://cgamesplay.com/bin/tour/ is all of the javascript. json.js (available via google) is JSMin'ed, the rest is there, uncompressed and neatly formatted. Is my coding style that bad? -- Ryan Patterson - <http://cgamesplay.com/> |
Kibiz0r
Member #6,203
September 2005
|
I think he meant because you only paste in a tiny snippet in your custom JS box..? --- |
Matthew Leverton
Supreme Loser
January 1999
|
Quote: else{dryrun = false;var d = new Date();document.write('<script type="text/javascript" src="http://www.allegro.cc/js/user.js/2559?'+((d.getTime()-d.getMilliseconds())/1000)+'"></script>');} I just would like to point out that no one can see your private user.js file. (That would be a privacy breach.) The user id parameter is completely ignored and really only exists in case multiple people share the same browser. |
CGamesPlay
Member #2,559
July 2002
|
Quote: I just would like to point out that no one can see your private user.js file. (That would be a privacy breach.) The user id parameter is completely ignored and really only exists in case multiple people share the same browser. Yeah, I drew that conclusion. In either case it still works out because the correct user JS file will be returned (the current, uncached one, with dryrun defined). The problem was that the user JS file was cached, so when I perform the RPC to update the tourConfig variable, the browser uses the cached value (well, Opera did. Firefox refreshed on document.location.reload()). By varying the URL with the current time it always gets updated. Of course it's slower. If you feel like adjusting the cache settings for the user JS, I'd appreciate it -- Ryan Patterson - <http://cgamesplay.com/> |
bamccaig
Member #7,536
July 2006
|
Thomas Fjellstrom said: Yet, it'd be just as demanding on resources, and take MUCH longer to capture and turn into a nice interactive video walkthrough. I wonder how long it took to get this much done... We've seen it's still buggy... As well as unresponsive and slow loading... And unless I missed something it's still very short. I'm not trying to put down your efforts, CGamesPlay. It's really rather cool, but this might be a good application for Flash... CGamesPlay said: "Hiding"? http://cgamesplay.com/bin/tour/ is all of the javascript. json.js (available via google) is JSMin'ed, the rest is there, uncompressed and neatly formatted. It seems odd that you would have us load code from your custom js (even though what appears to be happening per Matthew Leverton's rule is our own user.js file is loaded again... ) and from a file on your domain. Why didn't you just post all of the code (all 1471 lines of it )? -- acc.js | al4anim - Allegro 4 Animation library | Allegro 5 VS/NuGet Guide | Allegro.cc Mockup | Allegro.cc <code> Tag | Allegro 4 Timer Example (w/ Semaphores) | Allegro 5 "Winpkg" (MSVC readme) | Bambot | Blog | C++ STL Container Flowchart | Castopulence Software | Check Return Values | Derail? | Is This A Discussion? Flow Chart | Filesystem Hierarchy Standard | Clean Code Talks - Global State and Singletons | How To Use Header Files | GNU/Linux (Debian, Fedora, Gentoo) | rot (rot13, rot47, rotN) | Streaming |
Samuel Henderson
Member #3,757
August 2003
|
I like the tour and refuse to comment on the soon-to-be argument...;D;) ================================================= |
CGamesPlay
Member #2,559
July 2002
|
Quote: I wonder how long it took to get this much done... The entire thing has taken roughly 10 hours of work. I originally wrote the balloon library and wanted to test it and show it off a bit. So I made this. Quote: We've seen it's still buggy... Could you please be more specific? Quote: As well as unresponsive and slow loading... See my above post, I need more information. Also, what browser and machine specs? Quote: And unless I missed something it's still very short. Well, there's the front page chapter, which takes you through the news, the front page, the IOTD, and the resources section. Then there's the manual chapter, which includes a short breakdown of the manual page. Then there's the forum chapter, which goes through the thread list as well as the actual thread page. All in all it'll take about 15 minutes to go through if you read everything. Quote: It's really rather cool, but this might be a good application for Flash... It's not possible to do the balloon tips in Flash, or to provide the interactivity part, or to navigate to separate pages on the site. Also the upcoming Posting chapter will really be inappropriate for Flash (it's going to make sure you've selected a good topic, used good writing style, not posted code without code tags, etc). Quote: Why didn't you just post all of the code (all 1471 lines of it )? Ideally, the finished product will have all the ugliness of packaging and distribution worked out. Unfortunately, there's going to be at least 200 KB of javascript, even if it's compressed. I want to keep the steps part on my server so that updates happen without reinstalling. And with that vein in mind, tour.js, balloon.js, and json.min.js just follow suit. Btw, "hiding" was a bad choice of words. You can navigate to any of the URLs to read the source yourself. You can copy them to your server, too What I'd like to happen is have a newbie come to my tour installer, put in their user and password, and have a script copy the necessary code into their custom JS field. Of course, I will also include directions for manually installing, for those who don't feel like giving away their user information. I'm also going to write an uninstaller directly from the tour (after you've seen everything there is to see it will prompt to automatically uninstall itself). Thanks for everything you guys have said; I'll definitely keep working on it. I'd really appreciate it if you guys kept the bug reports coming in! -- Ryan Patterson - <http://cgamesplay.com/> |
BAF
Member #2,981
December 2002
|
Quote: I wonder how long it took to get this much done... We've seen it's still buggy... As well as unresponsive and slow loading... And unless I missed something it's still very short. I'm not trying to put down your efforts, CGamesPlay. It's really rather cool, but this might be a good application for Flash... After it loads, it's not unresponsive at all. But go ahead and make one in flash if you feel you can do it better. Quote: It seems odd that you would have us load code from your custom js (even though what appears to be happening per Matthew Leverton's rule is our own user.js file is loaded again... ) and from a file on your domain. Why didn't you just post all of the code (all 1471 lines of it )? Because it's easier not to do that, and also much cleaner and easier to paste, not to mention it saves space on a.cc from multiple copies of the same code. |
CGamesPlay
Member #2,559
July 2002
|
Let me break the process down in pseudo-code: User custom JS is loaded (possibly from cache) User custom JS is loaded with caching disabled JS files from my domain are loaded (possibly from cache) If the tour has not been run before Put up the loading screen Open the theme-css page in an iframe Set the configuration variable specifying that the tour has been run Save the page Close the iframe Show the welcome screen Else if the cookie tourWhenPageChanges is set Go to that tour page The second step is necessary because the user JS file is cached by the browser, so tour configuration values are cached, so it will assume the tour has never been run before until the cache expires. That's why the post goes to "my" user javascript: it's loading a non-cached version of the current user's javascript, so the configuration is guaranteed to be updated. It's very hackish, but without very much thought going towards it I can't see any other way. Well, I could store the tour configuration off-site, but that's evil. -- Ryan Patterson - <http://cgamesplay.com/> |
bamccaig
Member #7,536
July 2006
|
CGamesPlay said: Could you please be more specific? Apparently I was mistaken. A coworker was actually in control of the interface at the time (I was bragging about Allegro.cc again ) and without reading the IOTD bubble we saw only a close [X] button to interact with. Upon clicky we were suddenly alone in the scary world of Allegro.cc... So the bug I thought there was wasn't (missing controls in the bubble). It might assist the tour to explain all of the ways you'll navigate the tour at the beginning so users know the tour includes actual A.cc links as well as it's own. There is also the text that is displayed at the top of the custom js page when your JavaScript is loaded... It also seems to have duplicated the csmiley smiley counter, though mine is slightly modified and I don't know where the fault is... {"name":"592355","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/6\/a\/6a14c02f776288fc0ca1cf83beef2b1c.png","w":896,"h":244,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/6\/a\/6a14c02f776288fc0ca1cf83beef2b1c"} Going through it a second time I wound up stuck in the Manual section... Am I mistaken or was I supposed to navigate to the blit function? I did that (twice) and the tour never came back up... My only real complaint as of yet is that for a n00b it might be more difficult to navigate. And unfortunately, a simple mistake will close the tour. It might be more user-friendly to keep a Tour icon in a standardized place. If possible it would be more user-friendly to use Flash, which requires no 'installation' and no guessing, but I don't know how feasible it is with your model... CGamesPlay said: It's not possible to do the balloon tips in Flash, or to provide the interactivity part, or to navigate to separate pages on the site. Also the upcoming Posting chapter will really be inappropriate for Flash (it's going to make sure you've selected a good topic, used good writing style, not posted code without code tags, etc). I'm not really experienced with Flash so I don't know it's limits for interacting with a Web page. It could be done in a literal tutorial/tour like movie that takes them through the site. If you can load the Web site into the Flash interface you could still make it live, but I don't know about that... CGamesPlay said: Btw, "hiding" was a bad choice of words. You can navigate to any of the URLs to read the source yourself. You can copy them to your server, too Of course you can. If it executes client-side then I can obviously see it. Hiding is actually a pretty good word. Consider hidden files in a file system. You can actually get complete access to them, however, they're [by default] hidden from normal viewing. It's really a similar concept. BAF said: After it loads, it's not unresponsive at all. From home, it functions very nicely (Pentium D Duo Core 3.2 GHZ, 2 GB RAM). From work (Celeron 1.0 GHz, 384 MB RAM - or something) it was very poor. BAF said: Because it's easier not to do that, and also much cleaner and easier to paste, not to mention it saves space on a.cc from multiple copies of the same code. That's true, but it's not very wise to execute code from a random user on a Web domain... For a n00b coming to Allegro they might not want to do that. :) It is a lot cleaner though. He could have just attached it to this thread and linked everybody to that (which would only be one copy on Allegro.cc). It might not hurt for Matthew Leverton to actually add the tour/tutorial to the site after it's completely finished and polished. In any case, I'm biased about JavaScript so I hate when it's used for really cool things. :) -- acc.js | al4anim - Allegro 4 Animation library | Allegro 5 VS/NuGet Guide | Allegro.cc Mockup | Allegro.cc <code> Tag | Allegro 4 Timer Example (w/ Semaphores) | Allegro 5 "Winpkg" (MSVC readme) | Bambot | Blog | C++ STL Container Flowchart | Castopulence Software | Check Return Values | Derail? | Is This A Discussion? Flow Chart | Filesystem Hierarchy Standard | Clean Code Talks - Global State and Singletons | How To Use Header Files | GNU/Linux (Debian, Fedora, Gentoo) | rot (rot13, rot47, rotN) | Streaming |
23yrold3yrold
Member #1,134
March 2001
|
Quote: It also seems to have duplicated the csmiley smiley counter, though mine is slightly modified and I don't know where the fault is... Seems the top row is counting the smilies below the reply box .... -- |
BAF
Member #2,981
December 2002
|
The top row is counting the bottom row's smileys. |
bamccaig
Member #7,536
July 2006
|
23yrold3yrold said: Seems the top row is counting the smilies below the reply box ....
BAF said: The top row is counting the bottom row's smileys. There shouldn't be a top or bottom row. The user.js file is being loaded twice, hence a second csmiley bar is created, which also counts the smileys in the first row... -- acc.js | al4anim - Allegro 4 Animation library | Allegro 5 VS/NuGet Guide | Allegro.cc Mockup | Allegro.cc <code> Tag | Allegro 4 Timer Example (w/ Semaphores) | Allegro 5 "Winpkg" (MSVC readme) | Bambot | Blog | C++ STL Container Flowchart | Castopulence Software | Check Return Values | Derail? | Is This A Discussion? Flow Chart | Filesystem Hierarchy Standard | Clean Code Talks - Global State and Singletons | How To Use Header Files | GNU/Linux (Debian, Fedora, Gentoo) | rot (rot13, rot47, rotN) | Streaming |
Thomas Fjellstrom
Member #476
June 2000
|
Matthew recently fixed that afaik. -- |
BAF
Member #2,981
December 2002
|
CGames's javascript loads it a second time... |
Thomas Fjellstrom
Member #476
June 2000
|
Quote: CGames's javascript loads it a second time... Oh. Silly CGames. -- |
CGamesPlay
Member #2,559
July 2002
|
Matthew fixed the "There is also the text that is displayed at the top of the custom js page when your JavaScript is loaded...", but I've explained why I load the user JS file 3 times so I'm not going to do it again. Quote: Going through it a second time I wound up stuck in the Manual section... Am I mistaken or was I supposed to navigate to the blit function? I did that (twice) and the tour never came back up... Did you get the "Tour Exited" balloon? Btw, if you go back to the control center, press the "Begin Tour" link by the Log Out link to skip to a particular chapter. -- Ryan Patterson - <http://cgamesplay.com/> |
ImLeftFooted
Member #3,935
October 2003
|
Quote: Ideally, the finished product will have all the ugliness of packaging and distribution worked out. Yeah I've been wanting to make a js 'platform' to allow 1 click (maybe 2) installation of various scripts without leaving the page. Also, you mentioned that tour config can't update itself without reloading the js file. Is there a reason you can't just store the information in a cookie? |
CGamesPlay
Member #2,559
July 2002
|
A cookie isn't persistent. Short-term things like the next page in the tour can be stored in a cookie, but whether or not a user has ever seen the tour before needs to be stored in a manner that will affect all browsers he connects to the site from. -- Ryan Patterson - <http://cgamesplay.com/> |
ImLeftFooted
Member #3,935
October 2003
|
Hm I see what you're saying. Maybe store it in the "About Me" in the profile. |
CGamesPlay
Member #2,559
July 2002
|
Matthew seems to have added a field for me [append] -- Ryan Patterson - <http://cgamesplay.com/> |
bamccaig
Member #7,536
July 2006
|
CGamesPlay said: Matthew seems to have added a field for me Wow, that's awesome. -- acc.js | al4anim - Allegro 4 Animation library | Allegro 5 VS/NuGet Guide | Allegro.cc Mockup | Allegro.cc <code> Tag | Allegro 4 Timer Example (w/ Semaphores) | Allegro 5 "Winpkg" (MSVC readme) | Bambot | Blog | C++ STL Container Flowchart | Castopulence Software | Check Return Values | Derail? | Is This A Discussion? Flow Chart | Filesystem Hierarchy Standard | Clean Code Talks - Global State and Singletons | How To Use Header Files | GNU/Linux (Debian, Fedora, Gentoo) | rot (rot13, rot47, rotN) | Streaming |
CGamesPlay
Member #2,559
July 2002
|
Now the script is nice and simple. It uses the new User Data feature of Allegro.cc, so it doesn't require any weird hacks. Here's your new JavaScript: Test this one out, let me know if anybody has any bugs. Tomasu, does it work in Konqueror? -- Ryan Patterson - <http://cgamesplay.com/> |
Thomas Fjellstrom
Member #476
June 2000
|
Does nothing. No error, no tour. Js is in my user js just fine as well (viewed source, and took a look at "/js/user.js/476"). -- |
|
|