プレイ日記
raimondz raimondxz
Now I'm creating attack animations and researching design patterns to program attacks. I don't want my project to become a Spaghetty code. Also, I was thinking on changing the sprites as silhouettes when the battle system is ready. I don't know if that could cause problems.
13そうだね
プレイ済み
返信[1]
親投稿
raimondz raimondxz
Part of the sword animation
0そうだね
プレイ済み
返信[2]
親投稿
Oscar PwnageBlock
Remember. The simplest way to avoid spaghetti code in SB is to never use labels and GOTOs. Stick to structured code (WHILE/DEF/etc.).
0そうだね
プレイ済み
返信[3]
親投稿
raimondz raimondxz
Yeah, I use DEF, Whiles and lowerdash to leave everything in separate files as modules. I only use labels to store data(For example, the animated backgrounds) or to do pseudo switch case inside functions(using return instead of break). For example, I do that to check animation states of each entity.
0そうだね
プレイ済み
返信[4]
親投稿
L. Lohadaa
I don't mind labels and GOTOs myself because it's easy to teach and does the job for a beginner. But you're right, if it's going to be a huge project or a refined game, not a good idea.
0そうだね
未プレイ
返信[5]
親投稿
raimondz raimondxz
Well, after researching, I decided to use a priority event queue sorted by activation frames to create attacks. With that way, I don't need to keep multiple attack counters with each entity since everything is processed on a queue.
0そうだね
プレイ済み
返信[6]
親投稿
Salkcin Salkcincraft
Looks incredible! I'm excited for it's release!
0そうだね
プレイ済み