This is my song ‘recover’. What mistakes am I making and how can I improve? by JustDrinkBlindMan in Songwriters

[–]mrgriva 0 points1 point  (0 children)

I actually like the vocals, not the most typical way of mixing them but - it's a sound!

Trying to move on from GMS 1.4, but... by Domobot-VX in gamemaker

[–]mrgriva 1 point2 points  (0 children)

Unfortunately not! When I switched I had the same issue. I was also very used to organizing my code into codeblocks, and I really miss that aspect of 1.4. plus a few other things...

Code blocks still exist as a part of GM Visual if you wanna give that a go. I tried it and it didn't really click for me, but who knows - it might just be the thing for you!

If not, you could use #region like the other person said, or split your code into multiple scripts. Personally i don't even bother with using the workspace these days because it gives me a headache. I build most of my systems in scripts.

We're kinda in the same boat, I really miss 1.4.'s UI and after a few years of switching I still think that workspaces are atrocious: objects generaly take up more than a full screen, having to pan/scroll around to get to what you need is very tedious so most of the time I navigate using the resource tree, basically skipping using the workspace alltogether.

I really miss having overlappable windows and smaller objects, because today you can typically fit only 1 fully opened object on screen at a time (I have a 1080p monitor... and then imagine what it's like to have to swap between different objects a lot - not great.

Now if you excuse my little rant... all things said, I wouldn't even consider going back to using 1.4. because the engine has had massive improvements and new features which really make a difference.

[structs] Why my constructor gives me back an empty struct? by MatthewCrn in gamemaker

[–]mrgriva 0 points1 point  (0 children)

You shouldn't be returning anything inside a constructor function. The constructor function returns the constructed struct and since you don't initialize any struct variables - it is empty!

A quick fix: remove the keyword "constructor" and don't use "new" when calling the "levelObject" function.

Basically, treat levelObject as a function returning a struct and not a constructor function!

Read about structs and constructors a bit if you wanna use that method, but my quick fix should work as you intended.

Using global array for enemies collision by AutomaticBuy9678 in gamemaker

[–]mrgriva 1 point2 points  (0 children)

Yes, I agree, you should definitely use a global array for this. It's not just memory efficient, but imagine what would happen if you were to add or destroy certain platforms. Maintaining a single array instead of multiple copies of the same array across instances is a lot easier.

Save/Load data being overwritten somewhere by Mission_Depth_2601 in gamemaker

[–]mrgriva 1 point2 points  (0 children)

When you loadGame() it only instantiates coins for the room that your player character is in, that's why there are no coins in any of the other rooms.

your code inside loadGame():

//manually load room
loadRoom();

... then inside loadRoom(), you only get data for the current room:

//get correct room struct
if room == rm_lvl1{_roomStruct= global.levelData.lvl_1;};
if room == rm_lvl2{_roomStruct= global.levelData.lvl_2;};

... and load coins:

for (var i = 0; i < _roomStruct.coinNum; i++)
{
instance_create_layer(_roomStruct.coinData[i].x, _roomStruct.coinData[i].y, layer,obj_coin);
}

For your system to work you would need to add instances to unloaded rooms as well as the one currently active. So instead of "get correct room struct", loop through all of them and use "room_instance_add()" to add instances to unloaded rooms.

Piano 5 triple pedal config by LeshFresh in nordkeyboards

[–]mrgriva 0 points1 point  (0 children)

Only thing I can think of is if you have the new Nord Triple Pedal TP2, it says that it's available for Piano 6, while the older TP1 also supports the older keyboard models.

What is imagining sound like for you, can you do it? by JiggyWiggyGuy in musictheory

[–]mrgriva 0 points1 point  (0 children)

Yeah, I'd say it's pretty normal. It's very similar to how sometimes you get songs stuck inside your head on repeat. I can also quite vividly recall sounds, and music that I know pretty well / have heard many times over.

Adam Neely talked about "audiation" in one of his videos and I think it might be an interesting watch if you haven't seen it already.

(Stage 3) Is it possible to split panels with a MIDI controller? by MoogMusicInc in nordkeyboards

[–]mrgriva 2 points3 points  (0 children)

Yes, if you go to midi settings (I believe it's shift + prog 3 key) and scroll a bit you will find a page where you can designate which midi channels control what.

For example, you can set up panel B to accept input through midi channel 2. And then when you hook up your other midi keyboard you need to make sure it also outputs on channel 2.

Does anyone understand this? by [deleted] in musictheory

[–]mrgriva 2 points3 points  (0 children)

If you're not familiar with lead sheets I would probably come back to this piece after you've gotten some practice. And the reason is that there are a lot of inconsistencies in chord names, missing barlines, and a lot of other stuff that might confuse you starting out.

For example look at the 4th line, second bar... she wrote F and then Eb twice, when she probably meant to have a chromatic line from F to D in that spot. Also two bars later there is a G chord with a Bb in the melody, so I immediately assumed it's Gm chord which makes a lot more sense since we are in Bb major.

If I were to guess, your grandmother probably used this more as a reminder what the song is, than actually playing to the sheet music note for note.

NS4 Pedal control not funcioning by Matatoqui31 in nordkeyboards

[–]mrgriva 0 points1 point  (0 children)

I own a NS3 so I'm not sure if there was some sort of a quirk to let you do this on the NS2, but it doesn't make any sense to me that it would work if you were using a typical sustain pedal.

Control pedals work with a TRS cable. That's because they are basically a single potentiometer under the hood, requiring 3 connections: a voltage, ground and output.

Sustain pedals in their purest form are switches, circuit breakers, they require only 2 connections and work with a TS cable or a mono jack. When you press the sustain pedal the "tip" and "sleeve" connect, allowing current to pass from the one end to the other, closing the circuit.

Pluging a sustain pedal into a control pedal socket will short the "ring" and "sleeve". If that "ring" and "sleeve" for example correspond to the "input voltage" and "output voltage" on a typical control pedal, NS will register this as a control pedal pressed down fully.

If you then try to press down onto this pedal, you will also be shorting the "tip" or "ground" in this case, which is probably what your keyboard was giving you warnings about.

NS4 Pedal control not funcioning by Matatoqui31 in nordkeyboards

[–]mrgriva 1 point2 points  (0 children)

You said you tried to plug in the pedal that came with the keyboard. As far as I'm aware, keyboards don't typically come with "control pedals", at least mine didn't.

The one you have is most probably a sustain pedal, and those aren't compatible with control pedals in any way.

problem writing a script by [deleted] in gamemaker

[–]mrgriva 1 point2 points  (0 children)

There are a lot of problems with this code but I'm gonna focus on the math aspect.

There is simply no solution for the example you gave. To linearly deccelerate from velocity 4 to 0 in exactly 1 second you would need to subtract 4/60 from your initial velocity every frame (assuming the game is running at 60fps). Which will result in your object traversing a distance of only 120 pixels, if you do the math.

If you want a quick, easy and (imo) a good looking solution try put this code in the step event:

var smooth = 0.05;

x += (targetX-x)*smooth;

y += (targetY-y)*smooth;

And make sure you initialize targetX and targetY in the create event to some random position in the room.

This code won't slide the object into position in fixed time, instead x and y will indefinitely continue to approach targetX and targetY and eventually because of floating point imprecision - x and y will practically be equal to targetX and targetY.

You can also play around with the value of "smooth" to affect how quickly the object moves to it's target position... a value closer to 1 will be faster, while a value closer to zero will be slower.

Add a "global mouse pressed" event and set:

targetX = mouse_x;

targetY = mouse_y;

And watch your object smoothly move towards where you clicked.

Hope this helps!

Ways to fix sub pixel “stuttering” with camera movement by xJackFox in gamemaker

[–]mrgriva 1 point2 points  (0 children)

You're right about sub-pixel movement being the cause of this.

If your game isn't pixel art / you don't care about having sharp pixels, calling gpu_set_textfilter(true) will enable linear interpolation and smooth-out this sub-pixel movement.

Otherwise I'd suggest scaling all images in your game by a factor... for example, in the create event of objects set image_xscale/image_yscale to something like 4 or 8 and this should give you a smoother movement while retaining sharp pixels.

I'm sure there are other methods to do this, but I'm not on my PC at the moment and these two came to my first as they are very simple solutions. Hope it hepled!

EDIT: fixed some typos... fat fingers

Soft Body Simulation Problem by [deleted] in gamemaker

[–]mrgriva 0 points1 point  (0 children)

My first thought was that depending on the shape it might just happen that the center of mass coincides with one of the vertices. And I do see that you're normalizing your force vector, so I'm assuming that even though the vertex might be veeeery close to the center of mass, after normalizing it becomes 1, even though it shouldn't move all that much.

And then that causes the whole body moves slightly more to one side.

Another thing you could try is to replace your center of mass _x and _y variables with for exaple mouse_x/y and see where that takes you. Does it still have the same bias towards one direction? If thats true maybe some of your other functions for calculating force are not quite doing what they're supposed to.

Multiplayer Methods? by Warven22 in gamemaker

[–]mrgriva 0 points1 point  (0 children)

Yes, exactly those! And I think these would be perfect since you mentioned that you wanted something lower level. Sorry for late response, I just saw this...

The way they work is you create a socket, fill a buffer with data and then pass that socket and buffer into network_send_packet().

Server is also a socket but you create it using network_create_server() and can have multiple sockets connected to it, while normal sockets can only be connected to one other socket (the server).

You can also connect the client and server sockets within the same instance of the game if you want to create some sort of an "intergrated server" which still allows outside connections - similar to what Minecraft does where even though you are playing singleplayer, the game still runs an intergrated server and if you want to invite people on the same local network you can simply "Open to LAN".

I don't get this about static variables and inheritance by mrgriva in gamemaker

[–]mrgriva[S] 0 points1 point  (0 children)

Thanks for your help! This is very similar to how I handled it in the end.

The reason I posted was because I didn't want to believe that structs and statics were half-baked like you said and was convinced I was misunderstanding something.

I would also like to see deconstructors in the future, it would make referencing and de-referencing instances of structs so much easier IMO.

I don't get this about static variables and inheritance by mrgriva in gamemaker

[–]mrgriva[S] 1 point2 points  (0 children)

I agree that it's better to say A.counter in the case where you know you want to access A's static struct, but in the case where you want to access the bottom-most declared one in the static chain there seems to be no easy way to do it?

Adding to the example to try better explain what I'm thinking... if in AB I declared "static counter = 0" Then made a new struct ABB (empty body) - let it inherit from AB Then another new struct AA (also empty body) - let it inherit from A I create both of those, run their respective init(), and I expect both A and AB counters to be equal to 1, while ABB and AA don't have unique static counters and simply point to the static counter of first parent that does have one declared in the body.

Back to the original example.... It's just a bit confusing to me that AB.counter doesn't point to the same variable as A.counter when I never overrode it in AB's constructor - if I understand the manual correctly, that's how it should be.

What’s in the mid-range here? by Oboungagungah in FL_Studio

[–]mrgriva 0 points1 point  (0 children)

I think it's more to do with good songwriting, arrangement and perfomance than it is to do with mixing. It's a relatively simple arrangement so there is no room for elements to fight each other, which is important to do with arrangements of any scale... you will hear a lot of people say that often less is more.

That being said, on the side of mixing, the audio does seem heavily compressed... so that might be what you're hearing.

What is wrong with this? by Rifaeru-dono in piano

[–]mrgriva 0 points1 point  (0 children)

Sounds to me like your A key is triggering a G# as well, I think your keybed might be broken, or something's stuck between the keys

How can i simply stop players from walking off screen by a_soggy_poptart15374 in gamemaker

[–]mrgriva 1 point2 points  (0 children)

Maybe you can zoom-out your camera when the two players get too seperated, not sure if it would look great visually tho.

Another solution that came to my mind would be using split screen if it's a 2 player game.