Jump to content


Member Since 22 Jun 2008
Offline Last Active Jun 23 2016 07:31 AM

#4883595 Midi Input: Detect Midi Keyboard/Piano Activity

Posted by Davve on 30 September 2015 - 09:21 AM

The downside is that I get an error compiling when it tries to define the external functions (unable to find function "external_define").


You need to change the target from "Steam workshop" to "Windows" (the workshop doesn't support DLLs). I'm glad to see that people still find this useful. :)

  • 1

#4851311 D3d_transform_pivot _axis

Posted by Davve on 01 August 2015 - 07:18 PM

I have tried to explain that this works ;). But if you change the value of bd this code is obsolete. I already know how to rotate the car from another pivot. But I want it to change which pivot while "in" game. I'm trying to learn from your code but its not the right result I want :(


What's the value of bd? It should be relative to your object.

  • 1

#4841591 3D object rotation

Posted by Davve on 16 July 2015 - 09:46 PM

With d3d_transform (in the NPC draw event):

// render NPC model at 0,0,0 here!

With matrices:

// render NPC model at 0,0,0 here!

  • 1

#4838762 Flooring to nearest half integer.

Posted by Davve on 12 July 2015 - 01:49 PM



Ha. Yea, that'd do it.

Maths isn't my strong suit.



Here ya go :)

/// snap(value,x)
/// Returns a new value, limited to multiples of x.

if (argument1=0)
    return argument0
return round(argument0/argument1)*argument1

  • 1

#4838754 Flooring to nearest half integer.

Posted by Davve on 12 July 2015 - 01:42 PM


  • 1

#4838696 sprite_trim / sprite_crop

Posted by Davve on 12 July 2015 - 10:52 AM

You should probably delete that buffer and surface.

  • 1

#4810882 3D Point Light Dynamic Shadows

Posted by Davve on 24 May 2015 - 02:02 PM

Hi davve, I found a problem with the shader. There's this almost vignette dark shade of gray surrounding every point of light in the map and I suspect it's a product of the shdr_shadows3D_shadowmap shader. I made an illustration below, what can I do to achieve the ideal picture below?


Also, the dark shade is a problem because it makes the environment look darker.


This problem also exist in your original example:




It's mostly got to do with the attenuation factor of the light, pixels further away get dimmer according to the light range. The crappy filtering could also be to blame.

I've made some optimizations to the code since this was released, I might update the file in the first post.

  • 1

#4776807 Does GML have resizable (vector) arrays?

Posted by Davve on 29 March 2015 - 02:34 PM

What you're looking for are ds_lists.

  • 1

#4762593 draw polygon

Posted by Davve on 06 March 2015 - 01:45 PM


  • 1

#4738958 For function

Posted by Davve on 28 January 2015 - 09:10 PM

What's up,

  • 2

#4723400 Default IDE is terrible !

Posted by Davve on 06 January 2015 - 12:52 PM

The appearance is the least of the IDE's problems. It's painfully slow with big projects, the room editor is a joke, the resource tree is buggy and has the functionality of someone's first VB.Net project (for instance, you cant select multiple items and moving things around is kind of dodgy) and multitasking is a pain (YYG can't seem to implement a proper tabbing system like Notepad++ for the code editor or allow multiple sprite editors open at once).

  • 3

#4722599 how to use trig in code?

Posted by Davve on 05 January 2015 - 10:18 AM

theta = arctan(gradient)

or theta = darctan(gradient) if you want to work in degrees.

  • 1

#4715648 Advice on text input

Posted by Davve on 24 December 2014 - 06:19 PM

This might be what you want: http://gmc.yoyogames...opic=592186&hl=

  • 1

#4679078 Need optimisation for that code if dv=100 or dv=15

Posted by Davve on 21 October 2014 - 09:36 PM

if (dv mod 50=0 && dv>=100 && dv<=1000)

  • 3

#4678954 my draw_sprite won't...Draw a Sprite!

Posted by Davve on 21 October 2014 - 06:40 PM

You can only draw in Draw events.

  • 1