Comments

Log in with itch.io to leave a comment.

I'm trying to add mobile controls like for example a joystick, but how do I draw that on the screen?

There's an official GameMaker tutorial for this you might be interested in:

https://gamemaker.io/en/tutorials/multi-touch-joystick

(Sorry for not explaining everything myself, but... Matharoo is a better teacher than me, anyway)

Most of it should just work as-is since it uses the GUI layer, which works like normal in 3D mode. The one thing you might want to change here is to create the joystick instance yourself via code instead of placing them in the room editor (e.g. in obj_gamecontrol's room start / create event) to make sure it's aligned properly in every room, and run setup_gui_fog() before drawing the joystick and setup_game_fog() afterwards to turn off and on the lighting effects so they won't affect the GUI elements. 

How would I change the collectable from a 3d model to a 2d sprite?

Draw it with draw_mode7sprite (one of the engine's scripts). The obj_antagonist draws itself that way, so you could just copy its drawing code:

d3d_set_lighting(false)
draw_set_color(c_white)
draw_mode7sprite(spr_antagonist,0,x,y,z)
setup_game_fog()
(Keep in mind that it assumes the sprite's origin is in the bottom center when aligning it to the 3D world)
(+1)

Thanks yal, Your kit is amazing! I'd love a Horror Engine: Escape. basically granny except simplified.

Hello are all your games made by the gaming engine?

All of them are made in GameMaker:Studio, if that's what you're asking. (Some of the old ones like Gun Princess use GameMaker 6 / GameMaker 8.1 instead, Studio is their direct successor)

(+1)

Very nice game engine I have a similar game engine from the same people

Hello Yal! Very interesting! Does it support 3d models and ability to add some pathfinding for AI? Thanks!

It's a Game Maker:Studio project file, so it has about as much support for those things as GMS has innately (there's no code for either of those at the moment - the level is a 3D model generated randomly, the enemy just teleports around randomly).

I dug up a bunch of learning resources that could be useful:

(1 edit) (+1)

Ok!) Thank you!

Dear Yal! Its all nice working but im facing some issue with terraincontrol object, when i click Play button my game freezing for 10 sec :(( I'll try compile with YYC but it didnt help. In the debug screen i saw just
"Pause event has been registered for this frame"
and "Pause event has been unregistered" after that
Please, how can i fix this? Thanks!

gms2 (ide 2.2.4.474, runtime 2.2.4.374)

For some reason d3d_model generation is a lot slower in GMS2 than it is in GMS1. The easiest workaround would be to just add a loading screen and display that for the first step as the model is being built, a harder one would be do change the generation code to use vertex buffers instead.

(+1)

I looked into how the vertex buffer system works (I try to avoid everything that has a scary name :P) and it seems to not be super difficult to convert the game to use it. Sorry about the delay with the code fixes, it took some time to research it. Based on the example code on the GMS2 manual page on building primitives...

1) Define a vertex format (you'll need position data, texture data, and normal data - you should add them in the same order they're provided as arguments in the d3d_model_vertex/.../ functions)

2) Find the compatibility scripts for the various d3d_model scripts. If you've done any changes to the project, make a backup now, because we'll hack the compatibility scripts.

3) Change d3d_model_create() so it will create a vertex buffer and start a primitive using your custom format:

v_buff = vertex_create_buffer();
vertex_begin(v_buff, global.my_format);
return v_buff;

4) Change d3d_model_vertex_normal_texture() so that it will add vertex data. It's important you add this data in the same order you defined the different data in the vertex format.

vertex_position_3d(v_buff, xx, yy, zz);
vertex_texcoord(v_buff, tx, ty);

5) Change d3d_model_draw() so it will submit the vertex buffer to the pipeline (using a texture):

var tex = background_get_texture(selected_background);
shader_set(shader_prim);
vertex_submit(v_buff, pr_trianglelist, tex);
shader_reset();
6) d3d_model_primitive_begin() now would have no effect, so delete all code in that script.

7) d3d_model_primitive_end() could be emptied, or just use vertex_freeze() to make the vertex buffer read-only (which speeds up drawing it)


Hope this helps! Let me know if there's any problems.