|
961
|
Developer / Technical / Re: Screen tearing in Game Maker
|
on: November 22, 2008, 11:33:23 PM
|
I tried this: surface_reset_target(); draw_clear(c_black); draw_all();
screen_wait_vsync(); mil = current_time; dummy = 0; while (current_time < mil+11) dummy +=1; //sleep(11); screen_refresh(); The keys are working properly again now, but the tearing is back. And it's moving around rather than in a fixed place. I need to clear the screen (or the buffer) before drawing everything again. Is there a better way to do this than using draw_clear?
|
|
|
|
|
962
|
Developer / Technical / Re: Screen tearing in Game Maker
|
on: November 22, 2008, 11:19:37 PM
|
have you tried detecting the monitor's refresh rate and just changing the fps to that?
Not yet. That sounds like it will need precise timing. However, this works: screen_wait_vsync(); sleep(11); screen_refresh(); Each millisecond of sleep I put in there moves the tearing down the screen a little bit. 11 milliseconds is enough to move it to the fixed part of the display. But now the game isn't detecting keypresses properly.
|
|
|
|
|
963
|
Developer / Technical / Re: Screen tearing in Game Maker
|
on: November 22, 2008, 11:11:23 PM
|
Okay, now the main loop looks like this: typewriter_step(); phrases_step();
time +=1; time_minute = floor(time/300);
surface_reset_target(); draw_clear(c_black); draw_all();
screen_wait_vsync(); screen_refresh(); It's still tearing. At the moment the tearing is at a fixed spot, about an inch from the top of the screen. Maybe I should just tweak the interface so that the top inch of the screen is a static image. Or fiddle with the timing to move the location of the tearing?
|
|
|
|
|
964
|
Developer / Technical / Re: Screen tearing in Game Maker
|
on: November 22, 2008, 11:03:57 PM
|
I turned off vsync in the game options, put set_automatic_draw to false, and put the lines screen_redraw(); screen_wait_vsync(); screen_refresh(); at the end of the step event of my main object. But it's still tearing.  The vsync is doing something; if I put it in the code, and also leave it on in the options, then the game noticeably slows down. edit: hang on, maybe I'm using screen_redraw wrong...
|
|
|
|
|
965
|
Developer / Technical / Re: Screen tearing in Game Maker
|
on: November 22, 2008, 04:29:24 PM
|
And no, GameMaker is terrible for causing tearing, any modern app should be able to avoid it. V-sync should stop it in most places, as this synchronizes drawing to happen right after the screen is finished updating. The fact it is still tearing means it is drawing too slowly. As a guess, this would be because it is not doing any double buffering.
I tried shifting things around so that the only thing that happens at the drawing stage is that a previously-drawn buffer surface is drawn onto the screen (just in case GM wasn't already doing this), but this didn't seem to make a difference. My best fixes so far have been turning off vsync and making the background paler so the tearing is less noticeable.
|
|
|
|
|
966
|
Developer / Technical / Re: Screen tearing in Game Maker
|
on: November 22, 2008, 03:13:33 PM
|
|
Hm, it does look better with vsync turned off. I still see the tearing, but now it's in a different place each frame so it's a bit less distracting. Thanks for the suggestion.
The typing is supposed to mimic using a typewriter, so you can't hit the keys too fast or they jam. I've tried to set it up so you can still type pretty fast if you pace yourself a bit, but it's possible the whole thing is a mistake.
|
|
|
|
|
967
|
Developer / Technical / Screen tearing in Game Maker
|
on: November 22, 2008, 08:21:26 AM
|
This is about a problem with my CPB competition entry, which I'm writing in GM 7.0 pro. The entry thread is here: http://forums.tigsource.com/index.php?topic=3692.0The game looks like this:  At the moment, I get horrible, very noticeable tearing when the vertical edge of the paper moves around as you type. I've checked the "synchronization" box in GM, and I've tried it on the (oldish) ATI graphics card at home and the nvidia one at work, and it hasn't gone away. I want it to run at 60fps, and the game isn't doing much and will run faster if you set the room rate faster, so it's not that my computations are lagging things. Changing the room rate to 30 or 1000 doesn't help. Any ideas on how to fix this?
|
|
|
|
|
969
|
Community / Commonplace Book / Re: The Clatter of the Keys
|
on: November 21, 2008, 02:22:36 PM
|
|
Thanks for the kind words. It shouldn't be too tough to put in another keyboard layout, if the game turns out to be worth it. Although if I end up using symbol keys things could get hairy.
Gainsworthy: thanks very much for the feedback, that's helpful. I was wondering about putting some images in the background, maybe to provide a bit of a scare if they changed when you weren't expecting it. But time is probably too short to get that working nicely.
Current to-do list: -get some scoring system for your current weirdness level. Maybe it ticks down all the time, but matching words at a good enough rate will keep bumping it up. I should find out how the one in guitar hero works. Put in a time limit of 2-3 minutes. -get an adequate sample of lovecraftian words, for three or four weirdness levels. For the moment, try to take each level from a certain kind of environment (study, new england woods, temple, gibbering darkness), to leave open the possibility of mixing and matching these to give varied flavour to replays, if there ends up being time. -make these come down the screen in simple patterns -spice up the scoring system. weirder words, longer phrases and perfect typing should score more, maybe getting two phrases simultaneously should score more. Ideally reflect this by some scribbles appearing on the paper around the typed words, to give the screen a bit of life -put in enemy words. These will hang around and scramble the phrases that pass near them, until you get rid of them -sort out the graphics - put in a background and give some sort of style to the typewriter. Make the palette less glaring and put in vignette and grainy effects or suchlike. -front end with at least high scores and instructions.
|
|
|
|
|
970
|
Community / Commonplace Book / Re: The Clatter of the Keys
|
on: November 21, 2008, 12:54:33 AM
|
I've been looking forward to this competition, but ended up not having much free time this November. So I'm going for a typing game. The basic gameplay will be to type phrases as they come down the screen towards you. I'm hoping I can squeeze in a whiff of things like Guitar Hero and Space Invaders.  My hazy idea of the plot is that you are a writer, who needs to churn out stories of the weird to earn money from a magazine. To generate enough weird ideas before the deadline, you decide to try the latest theories of those crazy guys from Vienna. Perhaps there is something interesting that you can recover from your memory, or your racial memory, through free association? So the phrases that come to you will start off as commonplace thoughts, but as you progress through the game and some kind of meter increases, stranger ones will turn up, and should suggest some kind of lovecraftian plot. I put a prototype in the first post. F4 switches between window and full screen, esc quits, type with the keys, use cursor keys, backspace, return and tab to navigate. Use tab a lot. Pressing both control keys at once will erase the letter under the cursor (although at the moment just overwriting letters works). The graphics and sounds are not final (I hope). Let me know whether the typing feels too annoying. I don't know a lot about typewriters, but toyed around on one for a bit while thinking about the game. I've made it less forgiving than a keyboard, but you can type pretty fast if you're smooth about it. Also I get terrible screen tearing; does anyone know how to fix this in gamemaker? I've ticked the checkbox that's supposed to fix it, but it doesn't seem to have any effect. And I'd be happy to get some suggestions of gameplay ideas. At the moment I'm thinking about the following: - some sort of "cents per word" meter that goes up when you are doing well, and results in weirder phrases appearing - I want the layout of where you type things on the page to be important for gameplay, so that you feel like you are constructing something more than one word at a time, but am not sure how to do this. One idea is that some phrases are dangerous and will erase the things beneath them as they float down; maybe you have to type a line of underscores _____ to block them? - phrases score more if you wait till they are near the bottom of the screen to match them - at the moment how phrases appear is random. I don't want to do design completely deterministic levels, but it would be good to have things appearing in interesting patterns - there should be other different kinds of phrases with different effects. Maybe there are bad words that, if you let them get to the bottom of the screen, will drip into your keyboard and jam it?
|
|
|
|
|
971
|
Community / Commonplace Book / The Clatter of the Keys [FINISHED]
|
on: November 21, 2008, 12:54:13 AM
|
 - Explore the unconscious in a 1920s type 'em up.
- Journey deep into the weird, without leaving your desk.
- Discover how many cents you can earn in four minutes (beat $25.70).
Download hereHow to playType the thoughts that come down the screen towards you. If the words you type line up well enough with the thoughts, you will catch them and earn cents. Weirder, more valuable thoughts will appear later in the game as your weirdness level increases. Long thoughts are worth more than short ones. You can correct typing mistakes by holding down both Ctrl keys, but to catch a thought your typing does not need to be perfect. However, if you type with no (uncorrected) mistakes, you can build combinations of thoughts. These must contain at least three words and are only scored when they are completed, which happens when you make a mistake or lose a thought off the bottom of the page, or if one of the words in the combination is about to move off the top of the screen. Combinations are valuable and increase your weirdness rating. On the other hand, your weirdness goes down whenever you lose a thought. Move around using Tab, Enter, Backspace, Del and the cursor keys. Del will move you back one letter and Backspace will move you back to the previous tab position. Holding down Del will bring you quickly back to the left margin. Most thoughts start at a tab position. You cannot move back up the page. When the small pointer at the very bottom of the screen is all the way to the right, a bell will ring and you may activate the red ink ribbon by pressing Ins. This will allow you to deal with thoughts by typing at random. Press F4 to switch between fullscreen and windowed, F10 to end the game and Esc to quit straight to the desktop. Edit 29/11/08 - readme file updated with clearer instructions
|
|
|
|
|
972
|
Developer / Technical / Re: Game Maker For Beginners: Part I
|
on: November 13, 2008, 11:39:17 PM
|
Skofo is right about the full screen stretching mode. Either switch the resolution to a dedicated resolution or use windowed mode, never stretch to full screen mode. Not only does it make it terribly blurry, but it also reduces the fps and slows the game drastically. They really should not include that option in GM, and if I were Overmars I'd remove it immediately, since as a result of it most GM games look horribly blurry and it gives a bad impression of GM for people who play those games. Even some of the "100 GM games in 10 minutes" games used that stretching thing, although thankfully most didn't.
As for the sound engine, use fmod, bass, or supersound dll's. Any works fine. GM's own sound ability is severely lacking:
- there are huge delays between when you tell a sound to play and when it plays, due to it uses windows media player as its output - when playing midi's, there's often a horrible scratchy sound that you get - when playing mp3's, it re-loads the mp3 each time it loops, causing a delay in the looping rather than a smooth loop - it can't play mod's, ogg's, or any other format other than wav, midi, and mp3, which are (except for wav) not formats you should ever use in a polished game
Thanks! I've been playing games that are deliberately a bit blurry, so that hasn't registered as a problem yet. I'm interested in the sound problems, because the game I'm hoping to find time for for the competition needs carefully timed sounds. But these will be small .wavs, so does this delay problem still turn up there? I thought that gamemaker only used the media player for things like mp3s.
|
|
|
|
|
973
|
Developer / Technical / Re: Game Maker For Beginners: Part I
|
on: November 11, 2008, 11:12:07 PM
|
People familiar with GM quickly learn a few things about it: never use execute_string(), never stretch the game to full screen, never use the GM's built-in sound functions for anything (use a dll), and never use arrays.
Thanks for the helpful posts. What do you mean about full screen - I found that pressing f4 in game to switch to full-screen seems to work fine - and what's wrong with the sound functions and a good dll to use instead? And, if you do use arrays, is there a way to initialize their size? I couldn't work this out from the manual.
|
|
|
|
|
974
|
Developer / Playtesting / Re: Game Name Clinic - I will rate your game's name
|
on: November 04, 2008, 01:13:28 PM
|
I need a title for a game which is a remake of an old game I made called Inferno of Anger. That title is just...  . This is the story: Pan's on a quest to end globalization because his heart grows weak from the sight of outsourced CG movies with soulless assets done by Indians and jobs in industry lost because of the Chinese so he travels to China to trash the epitome of outsourcing, the Buddha Gundam from Rohan Industries, led by Rohan Sankar. The Buddha Gundam not only is the greatest instance of outsourcing to third party companies, but it is built to preserve “peace” by breaking up riots so that the world’s companies can impose lower wages on the proletariat. Payback Nothing to lose Going Global Are you local? Which side are you on?
|
|
|
|
|
977
|
Player / General / Re: TIGS Epic Thread of Metaphysics
|
on: October 24, 2008, 06:32:03 AM
|
Elementary combinatorial, geometrical, and arithmetical theorems and hypotheses can be quite handily tested and investigated using real, physical objects (or even abstractions of them, like numbers). Admittedly, if the real experiment produces results contradicting a well-verified theorem, the the criticism will probably lie with the model, rather than the underlying logical structure which created the theorem. Experimentally-based results are not accepted as proof, and for good reason, but at the same time that doesn't render them entirely meaningless. There is also the field of experimental mathematics, about which I don't know too much, but in principle I find it quite interesting in and of itself. ( Constructivism is something I've always been meaning to learn a little about. The little I know I got from the topos-theoretic end of intuitionism). The whole word of mathematical logic and set theory is achingly distant from my specialisation, alas. The first paragraph of your post sounds very foreign to what I do, but I don't want to disagree with it entirely. For the rest of the post, I work on something which is connected, at least historically, to constructive mathematics. I'm interested in very weak theories of arithmetic, some of which you could call, if you wanted, polynomial time reasoning. In particular, anything that these theories prove exist can be constructed in polynomial time. But the theories are very natural from the point of view of the foundations of mathematics. So this allows you to prove things about foundations, using 'experimental' evidence from cryptography. For example, it is believed that it is not possible to factor numbers in probabilistic polynomial time; this allows you to construct models of these theories in which a large number n is the same size as 2n (with an otherwise natural, well-behaved definition of 'size') and to say some things about the difficulty of proving some statements from computational complexity theory.
|
|
|
|
|
979
|
Community / Commonplace Book / Re: Morpheus
|
on: October 23, 2008, 03:34:59 AM
|
|
I love the sprite. It gives me the urge to play more games where you stroll around with your hands in your pockets.
|
|
|
|
|
980
|
Player / General / Re: TIGS Epic Thread of Metaphysics
|
on: October 22, 2008, 01:08:43 PM
|
I am an expert on infinity.  The infinite things I work with most (nonstandard elements of models of arithmetic) actually behave a little bit like what GeneralValter is describing in the first half of his second paragraph. They have all of the first-order properties of the normal, standard numbers, but are also bigger than every standard number. So if a is such a nonstandard number, you can do arithmetic with it. 1<a, 2<a, 3<a and so on, so 1/a<1/2, 1/a<1/3, 1/a<1/4 and so on, so 1/a is smaller than any standard rational, but is not 0; it's "standard part" is 0. But a obeys the rules of arithmetic, so (1/a)*a = 1. And also a+1 is different from a etc. Basically if there is some property of the natural numbers you are interested in, it's generally possible to extend the numbers by some new elements that behave in a similar way with respect to this property, in order to learn interesting things. You can call these new elements "infinite numbers" if you want. But the kind of thing you get depends on the property - if it's size, then you get infinite cardinals; if it's how they are ordered, you can get infinite ordinals; if it's their arithmetic properties, you get nonstandard numbers.
|
|
|
|
|