Jump to content


Dreamsequence

Member Since 17 Feb 2011
Offline Last Active May 08 2013 09:21 PM

Topics I've Started

New sound engine not working

02 January 2013 - 10:49 AM

This has been a problem for many months now, probably since just after the beta, but my memory is a bit fuzzy so I'm not 100% on that. Originally, sound in my game worked just fine, but one update messed it up and it's been screwed ever since.

I'm using the new sound engine, and importing short .wav sound files. So far I don't have enough going on in my game that there should be any sort of audio or visual slowdown, but the sound always plays the same. The first sound effect will start out normal, at full volume, then quickly act as if the speaker playing it was muffled. Some sounds will barely squeak through, and most don't play at all, or play so quietly they can't be heard. Whether there's one sound playing or hundreds at once, this issue persists. It's happened on my desktop and laptop, on multiple versions of both Windows 7 and 8, in run mode, debug mode, and as a standalone .exe. Originally I thought this was a GM Studio issue but this was supposedly a problem with a fix in the works around September, so I waited for a patch that never helped anything. Or never came.

I'm wondering, for anyone who suffered this similar sound issue with the new sound system, is it still a problem or was it fixed in an update? Am I possibly using the new system wrong?

Just now, I tried messing with some settings (changing number of channels) and converting my sounds to .ogg at 80 quality in case that was the issue. Same results as before. Previously I was letting GM:S convert them to whatever defaults they normally came with, I think 192 kbit/s MP3 or 21 quality .ogg 'normal sounds'

My sound initializer code:
Spoiler


I don't really see anything wrong with my code. It might make sense if the sounds were being cut off because I'm reaching the limit, but considering the very first sound to play gets cut off within a few steps, it seems extremely unlikely. If anyone can shed some light on what might be happening here I'd love you forever. I've been bothered by this pesky sound glitch for months and it's taking a toll on my nerves...

edit: I'm using the Steam version of GM:S if it matters. 1.1.750, Windows exporter.

Latest Studio update broke new sound engine

02 October 2012 - 11:59 PM

Ever since I downloaded the newest GM: Studio update (1.1.469) the new sound engine has been wonking out on me. It was working perfectly before, playing dozens of sound effects just fine. But now, it's really acting up. Sound effects are going randomly in an out of sounding muffled and quiet, they seem to be only coming out of one speaker now, and there's just no explanation for why. When I export an executable, it continues to fail in the exact same way on my laptop, so I'm fairly sure it's not this specific machine.
Is anyone else experiencing this problem? Or something similar?

Checking if an instance has a certain parent

19 August 2012 - 09:13 AM

This should be a simple one but I'm finding it hard to search it up. I'll probably facepalm when someone tells me the answer since it's probably super simple.

I have a lighting setup that draws ambient light over sprites using the magic of surfaces and advanced blend modes. It's awesome, but currently when enemies fly through walls their sprite draws on top but the lighting of the wall is drawing over the enemy sprite, assumedly because the wall was created before the enemy. The script simply uses a With statement to go through the lighting sprite draw script for every instance of objEnemy, which includes walls.

Here's how the parent object relationship goes right now:
objWall --- various wall objects
/
objEnemy --- objBoss --- various boss ships
\
objEnemyShip --- various enemy ships

The reason I made walls "enemy" objects is because they follow the same rules of eating player bullets, moving globally with the level (they may have motion of their own) and causing instant death on impact. They have their HP set to 0.1337, though, a specific value that I have bullets and attacks check for to keep from dealing damage. Mostly, it just means less collision checks to deal with.

I've tried checking object_get_parent(self)=objWall but that seems to return false for the wall instances as well as enemy ships. Also, object_index=objWall seems to return false as well.

All I'm looking to do is have it draw lighting for objWall instances first, then move to objEnemyShip instances.
Thanks in advance~

Best way to make a game scalable?

30 July 2012 - 03:47 AM

Ok, so I'm about to get back into coding on my game full-force, but I'm running into a snag that I kind of skipped over in my initial engine building. I need to make my game look good on a 1080p PC screen and any of about ten billion different smartphone screen resolutions. It's a disaster in the making, I know.

I'm talking Game Maker: Studio, 60 FPS, 1080p on PC and possibly Ouya, and a variety of ~720p and lower smartphone screen resolutions. I'm building assets to work best at 1080p, 90x90 tiles in a grid that's 12 spaces high at that resolution.

With Game Maker, I've never worked with multiple resolution options before. But people expect it in professional games, and I'm holding nothing back for mine. But I'll be working with a lot of strange resolutions. 960x540 is just half of 1080p so that is fine. 480x800 also divides nicely. But some phones, like the ever-popular iHate To Use Mere Mortal Resolutions, don't play so nice with the number 12, which makes me worry how GM will handle it, since it can only draw objects on pixels, not in between them.

I'm also not sure about how to manage assets for my game. Just on PC, I have to worry about a lot of different native resolutions, and I'd like it to work on any of them. Do I have to make some 8 different versions of every asset, repacked for a different resolution? Is it possible to use the full HD versions (or half-HD, for screen sizes 960x540 and lower, to conserve processor power) just scaled down for smaller screens?

Basically what I'm looking for is any tips you might have, do's and don'ts and such for someone who's never done a scalable game before.

Custom key bindings

31 May 2012 - 02:18 AM

Ok, so in my game I want to have the ability to play with game pads or keyboard controls instead of touch/mouse, and I'd like to let the player set their own controls. When the game starts for the first time it will prompt whether the player wants to use physical controller controls. If you select yes, it starts asking you to press the corresponding button for the control. (press up, press down, left, right, Fire, Special, Slow, Pause)

What I want is to have the script ask for each individual button necessary for gameplay one at a time, and it should record and save data for which one was pressed, and have that button activate that action from then on in the game until the player changes the setting manually.

I have created global variables for each type of input, but I get stuck on a few things:

-How can I have it check for any keyboard or joystick button press? Do I have to have it check if any keyboard or joystick button is pressed, then go in and check each individual possibility one by one? I'd rather avoid doing this because it could be pretty annoying.
-Once I return which keyboard or joystick button was pressed, how do I then assign that to my global value checker so it checks for the right button press? (if it helps anything, this is the Studio beta still)

Considering PC and Android/iOS users may have a variety of different kinds of hardware or preferred configurations, I can't expect everyone to have a setup that works with a pre-set default. I'm hoping it's possible to do keyboard and joypad all in one, but if not there might be a workaround to do them separately and just have the user specify which they're using.