Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Thanks for the patronage and interest in the engine! ^__^

That's quite a lot of questions! I'll try to answer them all in order:

  • To scale sprites up, the most important thing is increasing the limb lengths (these things are unrelated to the sprite sizes to allow for things like pauldrons that cover more than the entire body part). Check out skelani_init_limb_lengths_humanoid; you'd either edit this directly (if you want everything to scale up) or make a new script (if you only want some things, e.g. giant ogres, to scale up). A search for the script's name should reveal all places it's used.
  • If you just edit VIEW_W and VIEW_H (in the "macros" script) to match the new resolution, everything should just magically work. (Some UI elements might need resizing since they look too small or too big, depending on the new resolution, but they should adapt just fine without additional work).
  • The easiest way to have an in-engine name-entering dialog is to just have a GGUI menu for it, which is a grid with all the letters in it. All events are the same script, which just adds the corresponding letter to the global name string, except for the "DONE", "ERASE" and "CANCEL" events of course. (Obviously you'd want a loop that creates all the entries instead of manually defining every letter separately)
  • To make the player's weapon aim towards the mouse cursor, you can just manually override the skelani_drawangle of the weapon's limb after you've updated the animation, using the direction to the mouse cursor. (You might want to also update the corresponding arm's angles). The player_skelani_override_guns script should give you an idea for how to do this, it's basically exactly what you want except it's not mouse-controlled.
(+1)

Thank you very much for the response! It's seriously appreciated! I'm super excited to start getting into it as soon as I have the time! :) 

Is there anyway to remap the key bindings to a mouse button? Even in the conrols_setup_default_keyboard script, it seems that there is no way to change any of those inputs to a mouse button press constant.

Nothing built-in, sadly. The approach I'd recommend (which is from a more recent project) would probably be turning keys into device/ID pairs like this...



..and then in input_get, have a switch statement that reads the appropriate device based on the first member, using the second as an ID:


(Note that the code above uses a bunch of GMS2-isms and will not work in the GMS1 version of the engine)

so I found a good solution to the mouse thing, but now I've run into a pretty significant problem with scaling the sprites up. So I've tried to use larger sprites for the player, and I've got it all aligned correctly with the skelani_init_limb_lengths_humanoid, however it definitely needs new animations. The problem is, the skeleton editor it still using the original limb lengths and I can't seem to figure out how to change them to the new lengths. I would have figured the editor would have used the same script, but that doesn't seem to be the case, unless I'm missing something?

(1 edit)

I had a look and it turns out the editor has the lengths hardcoded in its Create event (hit Ctrl+T and start typing "obj_editor_skeletonanimation" and it'll take you to it), it also uses a set completely different variables instead of normal skelani ones... but you could solve both of those issues at once by, at the end of its Create Event, first calling skelani_init, then your updated skelani_init_limb_lengths_humanoid, and finally a loop that just sets all the sklen variables to values of their skelani_length counterparts.

Deleted 3 years ago
(+1)

Thank you very much! I think I've got it all figured out so far, so hopefully I won't have to bug you anymore lol

(1 edit)

Alright, I've got what I believe should be my last one lol. Got any tips for scaling up the actual game resolution? At glance, it seems pretty hardcoded to really only get along with 640x360, which is unfortunately just far too small for my scaled up sprites. Would you happen to know of any ways I can scale up to ~1280x720 without breaking anything?

(1 edit)

I'm pretty sure updating the VIEW_W / VIEW_H macros should make everything else "just work" since they're used everywhere, though GUI elements that adapt to the size might get too big and sparse and elements that don't might get small and hard to read... so you probably need some adjustments for visual style (but the CODE bit should work without changes at least, unless I messed something up). Most of the frame-based menus have coordinates in percent of the frame for all elements, so just changing the size of the frame everything's stored in should automagically resize the elements.

Maps might be broken since the map grid size is based on the number of screens the room occupies (which changes if you scale up the game to have a bigger screen), but I assume you're going to remake all levels from scratch so hopefully this isn't going to be an issue.

(1 edit)

the problem with simply changing the values of those macros, is the game becomes extremely pixilated (only gui elements scale appropriately), and various things that rely on the view, such as obj_darknesscontrol do not scale up with the resolution; they stay the same size. So it ends it creating this little box of color overlay that only covers a portion of the screen.

Oh yeah, you might need to change the viewport settings for every room as well... I forgot they're set in GM's room editor and not by code. (There's just 7 rooms so it's not super involved). Both the "port on screen" and "view in room" values should have width/height matching your new resolution. obj_darknesscontrol uses the view size and not the VIEW_W/VIEW_H macros so this should fix that as well (the same applies to obj_control's view and deactivation code).

Okay interesting, I initially tried doing this only to the rm_ingame room, which didn't work, however doing it to every room seems to solve the problem! Thanks an absolute ton!

So I really hate to keep bothering you, but I've got another one. I can't seem to figure out how to add more animations. Say for example I want to add an extra keyframe to the sword attack animation; I create a new macro for that keyframe, add that keyframe to the skelani_init_all_keyframes script, and then add the macro for that keyframe to the array for the skani_ATTACK_SWORD in the skelani_init_all_animations script. This doesn't seem to do anything however, as the attack animation continues to only show the two original frames.

The attack animation in psm_melee uses skelani_set_animation to explicitly set the animation frame instead of playing it automatically, this is why you don't see the new frame at the end play out. Since all the default attack animations have 2 frames, the hardcoded 0 and 1 will work, but one thing you could do if you want more intricate animations is to use global.skelani_animation_length[argument0] instead of 1 when setting the animation, and for the line that goes

skelani_set_animation(atkanimation,(statecntr-atkwarmup)/atkduration)

you'd instead use

skelani_set_animation(atkanimation,global.skelani_animation_length[argument0]*(statecntr-atkwarmup)/atkduration)

(which means you interpolate between all the frames instead of just the first two)

Since indexing starts at 0 you might need to use (global.skelani_animation_length[argument0]-1) instead of just global.skelani_animation_length[argument0] to prevent the animation from looping back to the first keyframe at the end, I don't remember if the length is inclusive or not.

I seem to just be getting this error upon trying this: 


___________________________________________

############################################################################################

FATAL ERROR in

action number 1

of  Step Event0

for object obj_player:

DoConv :1: illegal undefined/null use

 at gml_Script_psm_melee (line 19) -     skelani_set_animation(atkanimation,global.skelani_animation_length[argument0]*(statecntr-atkwarmup)/atkduration)

############################################################################################

--------------------------------------------------------------------------------------------

stack frame is

gml_Script_psm_melee (line 19)

called from - gml_Object_obj_player_Step_0 (line 81) -     script_execute(state)