Game Dev #1 The first shot
Notes
I have made a ruff prototype for my game before a prototype can be something that's barely working and you think how is this working and the code is a mess.
On the other hand i learned that making a system for making a game is better on in the long term, you want to make a wooden house that looks like it falls apart or spent time makingthis system to make everything easier, also you want to keep everything in finished state, a house that's only done when it's done On the other hand this house is alway kind of done.
Monday
First i made the player sprite then made an object and made it so you can aim, and first problem already it was a simple one, the example
Basic code
X += right - left; Y -= up - down;
Right being the right input
Y being inverted
We want the player to move like this in a circle but this ends up happening
because the player can press both right and up at the same time, but you might ask me why bother, please stay quiet it bothers me, anyways i need to make it so when both keys are pressed to characters speed is set to sin || cos of 45 now i got on my calculator and did sin(45) and it came up with 0.85 i typed that in but i didn't look right so i tried cos(45) and it came up with 0.52 they both looked wrong then after staring at my calculator for a while i had realised my calculator was set to radians not degrees i retried and 0.7 and finally worked, who even uses radians apparently a lot of people anyways my code looks something like this (simplified)
if((right || left) && (up || down)) { Mult = 0.8; }else { Mult = 1; } X += Mult * (right - left); Y -= Mult * (up - down)
But Seiya why don't you write your code like this
if(){ }
I don't know but stop asking me so many questions
apparently the second way is the smart and right way but i don't care, also i am the type that comments every other line and starts arrays from 1 so 2^3 so 8 types of people
Tuesday
I Started working on the shooting
Then I started cleaning my code and not working on making the shooting script even the smallest part of my code, then I realised I was procrastinating. I was pushing off the task like always.
Wednesday
Wednesday i bettered myself and made shooting, i made it in a list system so i can add more stuff easily later, i realised the code had a id reading problem so i went into debugging mode and tried reading the lists but i couldnt the valuables responsible for having the list id just a had a number value so i did my very favourite task reading the code and finding the problem it was a simple fix i just read wrong.
Thursday
I added a aoe and damage system how it works is the bullet checks for damage and enemy checks for aoe damage i drew a zombie sprite and tested
Friday
I looked at my progress so far and was disappointed so i decided to do lots of work today,
First i added lifespan, starting to have too much vars on each object putting pressure on the ram, i quickly made a flash effect, added valuables for animations i had a maths problem with these guys being the culprit <>= so i removed armour, worked on shooting and got lots of errors
I started doubting myself i can take the blog down because i have no viewers but i remembered i need to stop procrastinating and giving up and this was helping me do writing
___________________________________________ ############################################################################################ ERROR in action number 1 of Step Event0 for object obj_player: ds_list_find_value argument 2 incorrect type (undefined) expecting a Number (YYGI32) at gml_Object_obj_player_Step_0 (line 31) - gun = ds_list_find_value(guns_id, gunid); ############################################################################################ gml_Object_obj_player_Step_0 (line 31)
I spent a lot of time then realized, but before i explain i need to explain mod
Mod is a keyword for looping values for example 1 mod 5 = 1
6 mod 5 = 1 so it just loops how about -1 mod 5 gml doesn't really work so you can
(-1 + 5) mod (5) 5 being the limit ad -1 being the value so to rewrite
((a + b) mod (b)) i wrote (b + a mod b) JUST BECAUSE I DIDN'T WRITE THE BRACKETS I GET A ERROR WHY DON'T JUST TELL ME YOU BE MISSING () <= THESE oh well what was going on was it was b + (a mod b) and you can't read negative index in lists so that's why now we can switch guns but i only have 1 gun so that makes not much differents
Notes
Please give me feedback what's interesting my spelling so i can edit in and then repost 😅
Get Beta shooter
Beta shooter
a top down shooter game, where you shoot stuff, STILL IN DEVELOPMENT !!!
Status | On hold |
Author | Seiya |
Genre | Shooter |
Tags | Top down shooter |
Languages | English |
More posts
- Game Dev #12 Code rewritingJun 18, 2023
- Game Dev #11 Marathon Jam 3May 25, 2023
- Game Dev #10 Hp and damageApr 24, 2023
- Game Dev #9 Let's goApr 16, 2023
- Game Dev #8 somebody cares!!!Apr 06, 2023
- Game Dev #7 Lots of news (AND PLAYABLE VERSION)Apr 02, 2023
- Game Dev #6 Level guiMar 14, 2023
- Game Dev #5 SettingsFeb 27, 2023
- Game Dev #4 Not reallyFeb 13, 2023
Comments
Log in with itch.io to leave a comment.
i like your detailed devlogs, i write code that way too. good luck with your game
thanks🙂