Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

couldnt run it so i went into source and disabled fullscreen. game is fun, the look ahead of the aiming was a bit much for me.

Source Code: start using macros. They just keep any value that will never change and are super clean. Same as globals but you know they are right there in the macro folder, and will never change. So if there was a: "default_aim_look_ahead" macro here, i could have changed that in the project easily. (+ you can still alter those values with things like: global.look_ahead = default_aim_look_ahead * 2 - for a sniper rifle or something, cause the default will never change..)

hey again :) I do use macros now for constant values, but I believe I used them back then too for things like grid_width, etc. But in the example you gave I wouldn't have used macros for that. if the aim_look_ahead variable was supposed to change or be able to change, I really wouldnt make it a macro, same way you dont use a macro for default_player_move_speed uknow, cause it's just used in one object. macros are practical for things that will be used in more than one object like the view size if its not ajustable, the grid size as i said... if you have a value that wont change but is just used by an object, you should just have it as an instance variable. Now in GM 2 there are variable declarations outside the create event, which make it easy to change these kinda values without searching inside code.

(+1)

awesome, thanks