Jump to content
xisto Community

Mordent

Members
  • Content Count

    424
  • Joined

  • Last visited

Everything posted by Mordent

  1. My New Year's Resolution is both realistic and I've stuck to it so far! Sure, that's only two days, but I'm working on making it into a habit. Basically, every so often I go through a spell of doing a bit of exercise each morning to work off a few pounds or tone up a bit. Nothing much, maybe ten pressups and twenty situps. Easy enough to do, and certainly not time consuming. For some reason, most likely forgetfullness or being a bit rushed as I wake up late for work or whatever, I never tend to keep up this routine for longer than a few weeks. Well...here comes attempt number sixty seven (or something like that). I figure if I make it a New Year's resolution then I should find it a bit easier to stick to, whether that be because I remember it more easily or due to wanting to say that I've suceeded. Conversations can go along the lines of: "So what's your New Year resolution?" "Oh, I'm doing a bit of exercise every day. Managed a month of it now!" As opposed to: "So what's your New Year's resolution?" "Well...it was to do a bit of exercise every day, but I kind of caved in after a week..." Nothing like avoiding an awkward or embarassing conversation that could happen as motivation to keep up with the exercise! As a side note: yes, I know it's quite possibly one of the most overused resolutions out there (or variations of it, like "lose weight", "build up some muscle" or whatever), but I personally reckon that making it much simpler than some arbitary goal (e.g. "lose X pounds") which has no time limit or regularity then you've got no real inspiration or motivation to do it. Keeping it short, simple and regular is not only making it more likely that I'll actually do it, but is quite probably a heck of a lot better for my body than "binge exercise".
  2. As a bit of a follow up question, I'm now working on trying to use the "unload" event. Again referring to this page, the code it suggests is something like this: Using the code above, I also get a strange number of alerts. When opening a new tab it says "page unloaded:about:blank", and nothing when I close it. Surely it should be the other way around? It also triggers a second popup when closing iframes and the like. My immediate response to this is to try to find a way to attach it to the tab in question, rather than the window as a whole. I'm currently storing a bit of information about each open tab that's from a particular domain in objects within my extension (myExtension.pages.page is a class, referred to by using myExtension.pages.objIdArray[#]). Each page object has a variable called doc which stores (I believe?) a reference to the tab it's open in, or at least something very similar. I'm using the code in my above post, so if it doesn't do that then I'd love to know. Anyway, I was thinking that I could add an event to the closing of the tabs that are on this particular URL (close, refresh, back, however it's closed doesn't overly matter to me. The important thing is that you're leaving the page) by doing something along the lines of "this.doc.addEventListener ( "pagehide", myExtension.pages.destroy(this), false );" within the page class and dealing with it within myExtension.pages.destroy (on the basis that I could work backwards to find out how to update my array and so on, the important thing is that I can trigger a function in a manner similar to this). Unfortunately, this doesn't seem to work all that well (i.e. it doesn't). One option I've considered is to use the code example shown above and doing some sort of checking within it to work out if the page closed was one of the ones I'm tracking, but it doesn't seem all that elegant. Any suggestions for this one?
  3. Hey again folks, once more I turn to you people for JavaScript-y help. So, I'm working on a Firefox extension and am using the AddEventListener method to work out when a new page has been loaded. If it's a particular URL then I do some stuff to it (preferably before it's shown to the user, but I gather that that may not be possible), I've got it semi-working, however there's some funky behaviour that I don't understand. With some severe "snipping", my code is as follows: var myExtension = new function (){ this.init = function () { /* initialise page load listener */ var appcontent = document.getElementById ("appcontent"); if ( appcontent ) { appcontent.addEventListener ( "load", myExtension.onPageLoad, true ); } }; this.onPageLoad = function ( aEvent ) { var doc = aEvent.originalTarget; alert ( "Test!" ); };}/* initialise window listener */window.addEventListener ( "load", function () { myExtension.init(); }, false );This is pretty much taken pretty much exactly from here. The one real change I made is changing the "DOMContentLoaded" event type to "load", as it made more sense to me at the time. I've got two real questions for you: firstly, why can't the external listener ("window.addEventListener(...)") point directly to the myExtension.onPageLoad function? I assume that it's something to do with what object triggers the event, and therefore how to access the "originalTarget" bit within onPageLoad, but a bit of an explanation would be grand. Secondly, what's the difference between "load" and "DOMContentLoaded"? Based on this page, it gives a pretty good explanation of what the difference is, so that's great. My main issue here is that, when using "load" and opening a typical page (e.g. Google) I get 4 alerts saying "Test!" when it's loaded. I even get 3 for opening a new tab! It's not a problem so much as a confusion. Why does opening a new tab trigger the "load" event three or four (or even more!) times, and the DOMContentLoaded event just once? Cheers in advance!
  4. Me again with another JavaScript question for you lot. I've started work on a Firefox extension that acts on a particular site, altering various properties of the pages and so on. I've got a semi-working version that needs a revamp to allow me to expand it, so as I hadn't got too far in to it yet I've decided to start from scratch, this time trying to understand a bit more about what's going on with the code. The initial template I used was taken from here, and also shown below: Assuming that the "messagepane" aspect is unnecessary in my case, I'm trying to work out how to translate this in to something that makes sense to me. My first attempt was this: window.addEventListener("load", function() { myExtension.init(); }, false); var myExtension = { function init () { var appcontent = document.getElementById("appcontent"); // browser if ( appcontent ) appcontent.addEventListener("DOMContentLoaded", myExtension.onPageLoad, true); } function onPageLoad (aEvent) { var doc = aEvent.originalTarget; // doc is document that triggered "onload" event // do something with the loaded page. // doc.location is a Location object (see below for a link). // You can use it to make your code executed on certain pages only. alert("test"); } }But it doesn't show an alert. As far as I can tell, the two are (nigh-on) identical, so can someone explain to me the difference between "onPageLoad: function ( aEvent )" and "function onPageLoad (aEvent)", as I assume they're the things responsible for it not working.
  5. Ah, gotcha. Yeah, I see how the $ thing isn't needed now, as what's after the last forward slash is pretty much irrelevant. Cheers for pointing that one out.
  6. Right, after a little bit of trial and error (as well as using various tutorial websites) I came up with the following expression: ^http://(www\.)?example\.com/.*$Seems to work like a charm. It also hasn't got the crazy "\/\/" at the beginning, because as far as I could tell the forward-slash doesn't need escaping. It worked, so if I'm wrong then clearly it's right in some quirky way. Also, I'm not sure why you had a forward slash at the start of your expression and an i at the end, nooc9. As far as I can see they have no significance in regular expressions. Care to comment, or just a slip-up? Any comments on my expression?
  7. Oooh, lots of responses. That's what I like to see! Cheers for the detailed overview there, but I get the impression you misinterpreted my bit about subdomains (I don't want a subdomain URL to be valid). Still, thanks for the suggestions and I'll definitely be looking some of them up! Fair point, though I mentioned it for clarification in case anyone tried to incorporate it in to their example. Looks pretty much the sort of thing I'm after, although what some of that syntax means is a mystery to me. Why the "\/\/"? I'm assuming that backslash is some sort of escape character? Also, nice find with the .match() method. I was simply planning on using .search() and checking if it returned greater than or equal to 0, but that's definitely more the sort of thing that I'm after. Looks like I better go dig up some regexp tutorials and try to decipher some of these expressions! As always, you folks at Trap seem to have the answer I'm looking for, so cheers for that. I'll let you know what I come up with as a final expression when I do. Thanks to all of you!
  8. Hi folks, me again with yet another JavaScript-y problem. Firstly, I have next to no experience with regular expressions, so apologies for any slow-wittedness on my part with this particular topic. I'm trying to use regular expressions (in JavaScript, if it's at all relevant) to work out whether a particular string (the current page URL, not that it really matters) is of the following form: http://(www. optional)example.com(anything else here)I've done a good few searches of Google, but anything that it turns up is either for checking if a string is in a URL format (not for a particular site) or full of strange, spooky regex runes that mean nothing to me. One other parameter for my expression that I should point out: if the URL is a subdomain of example.com (so http://forums.xisto.com/no_longer_exists/ or http://forums.xisto.com/no_longer_exists/) then I want it seen as invalid. I'm likely to be using the .search() method for comparison, if it makes any difference to the regular expression. Anyone care to help out the regex newbie? Extra cookies for anyone who explains their expression, as regular expressions are something that I'd really like to learn a bit of. Thanks in advance!
  9. Getting Pidgin to work for my accounts was a definite pain at first. Even more trouble with my GMail ones. Overall, though, as I use Linux (Fedora Core 11) rather than Windows these days I'm more than happy with it now that I'm over those first few hurdles. I'll admit I've never tried Empathy, but don't really feel the need to. If your IM's not broken, why try to fix it? I don't need any of the snazzy video and voice chats that people reckon Empathy works well with (though we all know that Linux and webcams don't get on), so I'm more than happy with sticking to Pidgin.Is it better than WLM? Tough to call, though in my opinion it feels a bit...cleaner.
  10. The only main issue I'm aware of with XAMPP is its incompatibility with 64-bit Linux (and possibly Windows, but I can't comment on that). There may well be a way to get it to work, but it's certainly not the friendliest thing to do, and doesn't work on it out-of-the-box, so to speak. Other than that, I can certainly recommend XAMPP as an excellent means of testing your PHP scripts before uploading them. Another good alternative is WAMP (only works on Windows, unlucky Linux and Mac users!)One thing I should point out about WAMP is that it stops some of the worries with other server software in that it has a "Go Online" setting that, when off, there's no way anyone can access the files by typing in your IP, firewall or not. If that's a big concern of yours (for whatever reason), go with WAMP just for that peace of mind.
  11. Bringing this topic to the surface again, your suggestion is not dissimilar to how I'm currently doing it. Rather than checking the page URL, I check whether a variable has been defined. If not, redirect them to the "you're not allowed to be here!" page. It works, no doubt about it, but contrary to the saying "if it's not broken, don't fix it" I'm looking for an alternative.Why am I posting here now? Because after all this time I've still not found out much about file permissions. By their very nature they sound like the exact sort of thing that I should be using for doing this. I've still yet to work out exactly how they work - and yet to get the domain for the hosting, but that's slightly besides the point - and would certainly appreciate a bit of help on the matter.Essentially, I'm after the file permissions (in the format ###, with # as a number) required to have a file with the following access attributes:Cannot be written to in any way (all changes must be made by uploading a new file to the server with the same name and replacing it)The server can access the file for include purposes (i.e. the server can read it)The file cannot be directly accessed by the user (generates a 403 error, which I will deal with using a .htaccess file)Any ideas? Other than writing some sort of test scripts for this, I figured this would be the easiest way of getting an answer. Is it in fact possible using file permissions, or is the current method (or the one suggested by Pankyy) a better solution?
  12. Not as such. I looked in to it and it seems that it's pretty much universally "off" unless the user manually (i.e. with a popup box) turns it "on" if the file is stored locally (doesn't work via http protocol), or can be turned "on" by your site being signed using a security certificate (again with a popup, but this time it's allowed online). Nice find with cURL there, looks quite nifty though, I believe, not quite what I'm after for use with frames. Yes, I'm aware that frames are "bad" in a lot of people's eyes, but as far as this objective is concerned they're certainly a fairly nice method. That said, I can most definitely see how it could be used (essentially have the "main" frame on my hosting, but as a .php file, and let it load the contents of the game page). I can then use a chunk of regular expressions and various other searching and replacing methods to alter the contents as I please, or alternatively just use JavaScript to do it. One minor qualm that I have with this approach is that it relies on a non-core extension to PHP, which just rubs me the wrong way. While I'm all for clever little libraries and so on, I definitely prefer not relying on some additional piece of software that I'd have to install on my hosting should I ever want to use my code. It's a little issue, sure, but I'm in favour of not using it nonetheless. For now I reckon I'll be sticking to a much more basic toolbar, then working out how I can get a security certificate (the various sorts, how I pay for it, etc.) that lets me use the functionality I want to (which is part of a default server build). Cheers for the suggestion, however, and it's one that I'll look in to as a cheaper means of doing what I want to do.
  13. Hi technoize! As far as I know, there's some sort of minimum number of posts before myCents starts working (not 100% sure on that, someone else can verify it either way). If there is a minimum, it's in the region of 5 or 10. Either way, you need to make posts to get myCents, and whenever the script updates (there have been a few problems with myCents updates lately, but they seem to have died out for now so it should be fairly regularly, daily at least) your myCents will change to reflect the number and quality of posts you've made.To see your myCents (once you've got them), they'll appear under your name (under "Member No.") in any forum posts you make, so you can simply check any thread you've posted in and find out how many you have. Another alternative is to check your profile. In the leftmost column of it (in the category "Other Information") it will show your myCents. Hope this helps, and welcome to Trap!
  14. Sounds like a definite plan, but I'm not entirely sure how to go about implementing it. When you say "wrap the game in PHP" what sort of method/function are you referring to? If it's possible then it's most definitely an excellent solution to my problem. Other than this, I've been looking in to a few other ways of achieving my goal, but so far with very limited success. Despite finding a very promising page that suggested you could read the URL of any page in the history. This would be pretty much ideal for what I need it for (simply check the last page's URL after loading the new one and storing it in a variable for later loading), however I haven't been able to get any meaningful output from it. Perhaps another set of eyes could make sense of this for me, or perhaps the quote below explains why I have this issue: I'm guessing that this is some client-side setting that essentially stops me from using this method at all? EDIT: After a lot of Googling (a surprisingly tricky subject to find proper information about, I have to admit), I've worked out what UniversalBrowserRead is, though I'll admit my definite uncertainty on the all important question: how do I get it enabled? I suppose this could be viewed as being a question for a different topic, but as it still pertains to my task I'll carry on the discussion here. From what I can work out, the most effective means of obtaining UniversalBrowserRead (as well as a stack of other permissions) is to have a security certificate. These (I believe) remove the concept of risk to the user (by not providing any warning?) and cost some amount ranging from the low tens of dollars to the high hundreds. For the sake of my bank balance, I'm not exactly in favour of this method. My alternative, or at least the only one that I can see assuming that it's provided, is to have a warning pop up every time I try to enable the permission, which isn't such a bad thing given that the site is only a basic one that a few users will actually use, and given that I can explain to them why I need the permission (which would also let me do a heap of other cool, snazzy things) then it's an acceptable workaround. I believe that there will be some serious browser-compatibility issues with it (three cheers for Internet Explorer! ...No? Anyone?), but again assuming that this isn't a problem for my user-base (all faithful Firefox users, as far as I know), the only real problem comes down to actually implementing it. Any suggestions as to alternatives, before I start delving in to this idea?
  15. I already have a link to the pages I need the most in the toolbar frame (with the main frame as the target). However, as I'm planning on letting others use the toolbar I'm going to let them customise it to the pages they need the most (as well as various other customisation options, but suffice to say an area as large as the main frame is needed). I currently have a working toolbar that has some of the features I want in the second version in it, and at the moment you can customise them in the toolbar frame (the div with the toolbar itself and another with the toolbar options toggle between display="none" and not), but already the amount of customisation has meant a scrollbar is pretty much a necessity unless you have an outrageously tall screen. In order to solve this, as well as have extra space for the additional customisation, I also want to have the main frame switch to the settings.html file and back to the last game page you were on when you press a certain button in the toolbar. As I mentioned in my edit, I realise that this can be done with the window.history.back method, but one of the additional functions of the toolbar that I want to introduce is, essentially, a scribble pad where you can write down any notes, pre-write any forum posts (as the game has an annoying tendency of refreshing the page half way through writing a long post and therefore meaning you lose it) and any other use people care to have for it. Naturally this should go in the main frame as well. In a nutshell, the toolbar will have its own navigation menu (which I have mimicking the appearance of the game one, to help it blend better), with links (via javascript) to change the contents of the main frame to the toolbar's settings page, the toolbar's scribble pad and the game page (last viewed page is preferable, to save you having to renavigate to it after changing, say, the toolbar's preferences). Only the relevant two links will be displayed at any one time (as clearly you're already on one of the pages). Whenever one of the links is pressed and the current contents of the main frame is the game then I want its location stored (or title, but I've worked out from my other topic that that's not really possible) so that I can have the "Game" link go back to that page when its pressed. Is this achievable using JavaScript?
  16. Somewhat linked to my previous topic, I thought I'd start another one with this separate question. If a mod disagrees with this, feel free to merge the two. A bit of context, first: I have two HTML files (index.html and toolbar.html), index.php containing a frameset with two frames (one with a name of "toolbar", the other "main") in it. The first frame has an attribute of "src=toolbar.html", the other has "src=http://forums.xisto.com/no_longer_exists/;, which is on another domain (that I don't own). Essentially I'm creating a toolbar for use with the game to perform some of the most common functions, like direct links to pages that require a few clicks in the game but are used often and timers you can use to remind you to perform certain actions. Background out of the way, here's my goal: to be able to have a button in toolbar.html that when clicked stores the page that the other frame is on (URL) and then changes it to "settings.html" (in the same folder as index.html and toolbar.html). Clicking the button again (or a separate button, haven't decided exactly which yet but doesn't really matter, I can build it in however after I know how) will change the other frame back to the page it was just on (which would be roughly of the format "http://forums.xisto.com/no_longer_exists/blah/blah/blah.php;). Any suggestions? So far I've tried the following basic approaches: var frameLastLocation = parent.main.location.href; parent.main.location.href = "settings.html"; (or frameLastLocation, the idea is the same)This allows me to change the contents of the frame to whatever I want (just put it in place of "settings.php"), which is fine. For some reason, though, frameLastLocation contains "about:blank" (tested by using "alert (frameLastLocation);" straight after it). As a test, arranging I arranged the JavaScript as below: parent.main.location.href = "settings.html"; alert ( parent.main.location.href );This didn't provide a popup box, which I assume happens when the argument provided to alert() is empty? As a further test, I changed the code to this: parent.main.location.href = "settings.html"; alert ( typeof ( parent.main.location.href ) );This had a popup box with "string" as its contents. It seems that you can write to parent.main.location.href, but you can read to it? Bear in mind that the initial URL of the main frame is "http://forums.xisto.com/no_longer_exists/;, and it displays that fine. One alternative to the location.href method I've looked in to is changing the src attribute of the frame itself, but after a bit of research (link) it seems that this approach won't work, making me believe I'm on roughly the right track with location.href, just it needs some more refining. If any more of the code (minimal as it is, I'm rebuilding the toolbar from scratch) is needed, just let me know. Cheers in advance! EDIT: Just had a bit of inspiration: rather than storing the previous location in a variable, simply using window.history.back() can work nicely. However, it's by no means ideal, as I plan on having a number of different sources available rather than just one. It's a temporary workaround that lets me get on with the rest of the work while I wait in anticipation of any answers you folks have!
  17. Nope, nothing. I reckon the problem with that method is that the file_get_contents returns nothing (I'm not sure, but it doesn't look like you can do anything cross-site, same as with JavaScript?). Cheers for the suggestion, though. Any others? EDIT: I have a related question posted up here, though thought it best to keep them separate and in separate topics.
  18. Hmmm...I think I see where you're going with this, but based off of the wording you've used I'm not sure. Time for a quick check: I create a page with the data in the code block above (not sure why that's needed, but anyway...) I go to http://www.dot.tk/en/index.html?lang=en, sign up to it and use the full URL of the game page as the "long URL", with whatever short URL I want. I can then treat it as my domain? If that's not the case, then I'm a little confused as to exactly what you mean. As far as I can tell, this is about the only way (assuming it works) that http://www.dot.tk/en/index.html?lang=en might actually be useful to me. I'm also fairly sure you're a bit confused as to what title I need to access. My current frameset structure is as follows: index.html (mine) - toolbar.html (mine) - http://thegamesdomain.com/ (not mine) I can change the title of index.html quite simply by altering it directly, or via JavaScript in either index.html (via document.title) or toolbar.html (via parent.document.title), though clearly I can't alter it from the game's domain as I don't have access to it. I'm more interested, now, in reading the title of http://thegamesdomain.com/ (not actually the url of the site, by the way ) so that I can show different information in toolbar.html based on what page of the game I'm on (each page has a different title). Hope this clears things up.
  19. Yup, a bit of testing and a chunk more time on Google led me to the same conclusion as the "can't manipulate with the frame" bit. I've worked with frames before, but only when altering or reading a value that's on another page that I've written, never on someone else's. This is roughly the approach I've been using to try and do it (though I've been trying to read the title of the page more than anything). So far it hasn't worked, so it seems that as well as not being able to manipulate anything that's in a frame that isn't on your domain you also can't read any values there. This bit doesn't quite make sense to me. How does having access to the HTML (bearing in mind that I can simply view the source needed to work out what values I'd like to read) make any real difference? Other than actually running the game via my domain (namely copying any game source code and essentially cloning the game), which clearly isn't really a feasible option, I can't really see what you mean by this. So, overall, it looks like it's impossible to either read from or write to a site that's not hosted at the same domain as yours using frames and JavaScript. Anyone got any other suggestions as to how to do it, or is it impossible? One option that I am exploring is trying to get the toolbar made official, namely hosted by the owner of the site so that I can access various other parts of it. Not had any feedback on this yet, but for now I'm working on the grounds that it's not going to happen.
  20. Hi all! A quick question for you folks, one that I expect should be able to be answered pretty simply though I can't find a definitive answer with Google. I play an online browser based game that's mainly text-based. I'm intending to create a toolbar for said game (I already have the permission of the game's owner) that essentially simplifies a few of the tasks in the game. In short, I will have a HTML file that has a frameset in it with both my toolbar and the game's page as its frames. The target for any links in my toolbar will be the other frame, so clicking on one of them will take you to the appropriate game page while leaving the toolbar as it is. Simple enough so far? The toolbar will also include various timers for actions in the game. For instance, there is a 3 minute delay between you being able to perform a certain action. Clearly it'd be fairly simple to write a piece of JavaScript that basically includes a timer in to the toolbar. You do the action, click the timer, then it counts down. When it hits zero it could pop up an alert to let you know you can do the action again. What I was wondering was whether it's possible to take the clicking on the timer stage out of the equation by altering the onClick event of the button in the game (from my toolbar) to also start the timer. I've had a few attempts at this, but so far I'm having a whole heap of trouble with the basics, and I think I've found my problem: I can't seem to access any information within the game's frame from my toolbar's frame. For instance: alert ( parent.gameFrame.document.title );seems to do nothing. No popup is generated. Is my suspicion correct, and am I unable to access anything within the game's frame (as it's on an external domain) from my toolbar? If not, how would I go about it? Thanks in advance! EDIT: A quick update and a link to a site that I found quite handy in some respects (link). It basically has one person stating that: So assuming that it's correct I now know that I can't change anything within the game page itself. Fair enough. However, given that I've abandoned the idea of removing the "click reset on timer" step from the process, I've still got a couple uses for knowing what page the game's on for my toolbar, meaning my question about why the alert code given above doesn't work still stands.
  21. Hey guys! Having a bit of an issue with updating Fedora lately. I've had it for a little while now, but updated around it rather than trying to sort it as I figured they'd be releasing a fix for it. The problem I get is below: Seems a bit strange as I don't think I should have the i586 version of the software installed (I'm running x86_64). Any suggestions as to how to get round this problem? Cheers!
  22. Mordent

    Isdate() ?

    Hmmm...okay, so this is an interesting conundrum for you: Yes, I use that function in the place it mentions, and yes, it worked fine when testing it locally. Only when I uploaded it to my Xisto hosting did I get that nasty error. My knowledge of PHP configurations is terrible, is there some flag or somesuch that I need to change to include that function? EDIT: Found a solution to the problem by brushing up on my French and reading this page. About 90% of the way down it says something about PHP versions, and the "date_parse" function. Any francophones amongst you feel free to enlighten me as to what it says exactly, but I can get the general idea.
  23. I'd hazard a guess that the games are sold to retailers or to a website that then hosts or sells the game on. Where do you think all of those Flash games on arcade sites come from? While some people are happy to create games for fun or to gain experience, a fair number of the better ones probably cost someone a fair bit somewhere along the line (along with the rights to sell it on or use it on their site). Essentially, the $100 is the development cost that is likely in the millions or tens of millions for the "award winning" games you mention.
  24. Ah yep, missed it first time through. Yup, you can. Game Maker makes its money from people upgrading to the "Pro" version (which unlocks a fair number of "advanced" features, as well as allowing you to not display any Game Maker reference in your game). Do bear in mind that the games you make are likely to be relatively simple, and although Game Maker certainly has a lot of excellent potential getting a game worthy of being sold requires a fair bit of work. The icons and sprites (as well as other resources), as well as any other of their resource packs, can be used however you see fit, though that's certainly not necessarily true of any images you find elsewhere on the internet. One thing I should point out is that the only type of game Game Maker is able to produce is .exe, so you won't be able to have these games running from your web browser like Flash games. Still, if you reckon you can make a decent game out of it and one that people will want to download to play then go for it!
  25. Not a bad little Game Maker tutorial (fond memories of spending hours tinkering with that in years past), though can I suggest you mention about Rooms (or at least that you need to have them!), as that's one major area that's slipped from your tutorial (easy enough to do for someone who has been using it for a while, filling in the room becomes almost second nature).You might also want to mention where you got your images from. Copyright issues and all that (though I suspect they came in some bundle of images that can be downloaded to go well with Game Maker, I'm a bit behind on what the current packs have in them).Also, as a bit of good practice you should probably have the if statements use "==" rather than "=". Although Game Maker accepts the latter, it's more because of it trying to be friendly to programming novices. Best to get the good habits ironed in from the start, eh? Same with semicolons. You don't strictly need them in Game Maker, but it's certainly good to get in the mindset of requiring them for the multitude of languages that do.Just one quick hole I've noticed with your code: as far as I can tell, the enemies will walk so that they will look like they're falling off of the edge of the ground before changing direction. It might perhaps be better to check if there's any ground up ahead (requiring one for left and one for right, or combining them if you're feeling a bit more clever - though certainly not recommended for a novice) and change direction before stepping off of your current one.If you plan on making another tutorial, can I suggest it be a more refined version of the platform to show a progression and using some more functions, perhaps some sound effects and possibly a few random factors (randomising the enemy's start direction and speed, for example). Just a handful of suggestions, hope they help!
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.