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 makingnJOoNmN0wWlumgqjlstZy-iO4hFb3aLFvpiJw6nVqS4sXfWiKHCb_lpfwm0U9XdTxdPSdvbPXHZ29-eEgT55koIoXvAsEmPxz0M55xNa3flx65dDz4f96c7lPCL_BX4uO5e--b9n0M0LrHjbTRWS4exs8zpPhNUOAuI5DppgKCwpjL3Jt82b0mUc0fRKYQthis system to make everything easier, also you want to keep everything in finished state, XaNpJlq6eOilGO_7wDTrvKXTXgUHyGuJv8K-WY5G3nqdNJl-EfWcqrNmG1CTVJ46yxSARVGk2uVMXEp2EHKktptGsXPAQ26dXVhGMBT1XZNiX6REuolB7n02LA3x6u3R62rII2v7td-SRf7ejhFbGn03dcmJLPtohKL5886ZJ9Q6yfvssj6pW0Az_MrUAAa house that's only done when it's done S0XDVT7MPTdnU3i04nHcoaS9nKDilu1a2h6XvNw7UKND3U6E1e3rlwtE73MWGQ95m_8sFZmNLot_eLjApmxXwMPkql2UpElrcAIoCmk0QhaOV9hQj5CkpMaob0yfjddvYwBMkcXEHYYV_CIyJh1Nx-SZcb3ur2j7WJleC-tpilLz2MNhD0sTc4-j02JWBgOn the other hand this house is alway kind of done.

 

Monday 

First i made the player sprite cXEy4ZSRtyJRwHgbSwOx2D6fBO3ks15Gb7IuO4ysEqVPTTV7joQtghcgUt7ErMzivL1MUo4E3_feoMcGS70CuoT3xKL0aKR9HnUptFh65_j-15hIHWQ3CIRtwtAXHAV5beiVNedbWQP6YAU_IiZpxPZS1AVR2MiLJbiWa0E1uPh4LUDk0hh9eAPDCkBQOQthen 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

c7hvcFoUUPUKXK6v3a7QU2-eyJg6G5fH2jObyYKxUAOS7N4iyKOpWZjOXB_BKj7e4F0-btXa1IWlFYzFUUQsPXKPckAdMbK5IvhTaI-AHq237jOxwGL2bBkcrbMxq5AREeC5b2i8zKGfykHGsFnegVSeK2Un99uTTeknqI9mAbKZ7DMSoHAPEdJ-rW1-nwLgYMqb_k8Mpmo4pb3m6koNoLgxkojqIk3SbUnyrfxoVYlpi2f6S4ae6ppQUjUyGoQQDjGpReDsOfqoMfX36xjMKtjrCgLwsMKMHOPjwYnrxCWu1i6seDkU9Mkc-ojTM_tLDHyhjP8dN8MkwnHOVrxCnHzb7pxaxbJoqjfmBFhDVGaySq1aQU9rCHDXU98g

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 

RpT0kGI6-V8Q_IkdgZPtcdODB-C1V8LvwZpQtBFB3V0R53MEOm0e-gkCELkgUOKJVYOa06OPuAw1bbAgvrfvLOeAmDMd6By232JkXpecW58_DxkT_fH2ZV5o395ra-FckIWK2LQk5-Of0FRBnBMzN-GrSCIz4KesZpNjRJdANPjgaL1n_fE6QjGX7oNRvwapparently 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 peoplePkvDJiLg2l3GE29kBL1oEtFHLvs_RTz4L71ue-IKxMrs51pIsH4rJAmORR5BQ30dLU0a8-BzP1HwQHeJJwkTjVR-lgVrFg-TSbVdjl1RanltMMGp-osA36rntMgdsZ4YEe7vulaAg5Ra_eHdHYKj0x3yfIYLuo9rVBXiycbVvAdFZaXge7LAKPayBZw_Xg



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.4Rb1swJbfOTKyOU9OrChZ22fKfLepAoJp5WaoprKKb4jDNNovnarfr4SiPsIBZjNpHtpan_6JdV9hRz9A38AAjhvu_xxAiZ5BuXAuXmD7SGASOZUJ0gyaMsLrPEhalxXip1b_2AMWxSrrwS_g0qjyUkve84vUGtgFrAOwRUR0AhE-UVxbAtjyJFAkwLCNg

 

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.39EtIgK2MjEI4sCm9NPfS1jgN7YhkXp66jSNj66Ca09M4HCfFi20wQiLGCMkcewfKPwBTAvPeavHiKA57FN6ohd2yHriTa5776YI4rnyXckiFoSvAIhAdQp9YgpPrmzCjj6IMHhJKIW5h65sG-a7mdvh-U9u-GN7eLk8Xe1c0wlDDaB5wxCfLn6kkrUaJg

 

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 BI2nVS7Su6VzGhMIY4oP8qbvja4kXMjmH5vdNAPq2YqU5OGOdLfkdNSBegfafsSvoTaAVJ44pg-8n488bePAX_FYzMFNbT1u4VSahAmfjBwPCm8wK0V47ti4LRQjEHlwlT-YjRnS1c94qxZi1lmMEfW108VCaymCX4EB0s1qkFXeL51AqPpcPvaG1VwpqQ

 

Notes

Please give me feedback what's interesting my spelling so i can edit in and then repost 😅

 

Get Beta shooter

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🙂