Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drawing (advanced) shapes #105

Open
Appsurdgames opened this issue Dec 13, 2024 · 2 comments
Open

Drawing (advanced) shapes #105

Appsurdgames opened this issue Dec 13, 2024 · 2 comments
Labels
feature ✨ For feature requests and implementations

Comments

@Appsurdgames
Copy link

Appsurdgames commented Dec 13, 2024

Drawing shapes in GameMaker is relatively easy, but GM supports by default only several shapes. This is a suggestion to add functions for drawing more shapes. In particular, this issue aims at adding:

  • Change the figure border type (functions ending on *_ext below) based on draw_primitive_begin();
  • Draw figure with thick border (functions ending on *_width)
  • Draw filled figure (functions ending on *_filled)

I agree that this issue is rather broad, so I opted to make a start. This is my list so far (please find the implementation here:
drawing_lib.zip

  • draw_circle_ext
  • draw_circle_width
  • draw_ellipse_ext
  • draw_ellipse_width
  • draw_line_dashed
  • draw_rectangle_dashed
  • draw_rectangle_width
  • draw_regular_polygon
  • draw_roundrect_dashed
  • draw_roundrect_filled
  • draw_roundrect_width
  • draw_star_dashed
  • draw_star_filled
  • draw_star_width
  • draw_triangle_width

My questions: (a) is this relevant for this toolbox and (b) if so, what is the best way to proceed?

@Appsurdgames Appsurdgames changed the title Drawing shapes with different borders, filled or think border width Drawing (advanced) shapes Dec 13, 2024
@Alphish Alphish added the feature ✨ For feature requests and implementations label Dec 13, 2024
@Alphish
Copy link
Owner

Alphish commented Dec 13, 2024

Personally, I find these functions on the specific side, especially the *_ext functions and stars. Myself, I'd more likely try to use sprites for these, especially with SVG becoming supported.

I don't see specific plans for dashed strokes (which is what could handle *_dashed functions, and probably in a neater way too), but I see the feature plan for supporting strokes in general, so I guess dashed/dotted lines might be mentioned there: YoYoGames/GameMaker-Bugs#8275

It's one of those "might implement if people demand it, but seems specific otherwise" kind of feature request.

@Appsurdgames
Copy link
Author

Once SVG is supported, the need for these functions decreases. But I recently built an application where the user could place figures and increase/decrease its shape (similar to Microsoft Paint). Without SVG support, these functions provided for me a nice alternative.

I agree that some functions may be very specific, but I considered them sufficiently general to mention here. But let's see what others think about it :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature ✨ For feature requests and implementations
Projects
None yet
Development

No branches or pull requests

2 participants