EUCLIOD - A Homebrew Bullet Hell for the 3DS

Before I say anything else, I'd like to mention that this project was developed and bugtested on, and for the New 3DS system.

Rinnegatamante has helped me optimize the game, and the game runs almost flawlessly on N3DS (at present) and although I am aiming to keep the game smooth as possible for the O3DS, don't expect any miracles. (Though I have been informed that the game currently runs at 60 FPS on the O3DS)

banner.png


This has been a quick project I've undertaken to have a little test of the boundaries of the N3DS's processing power vs the O3DS. (as seen through the eyes of Rinnegatamante's LPP)

It's also (hopefully) going to be the first game I actually complete in the last 7 years of making random games that are too ambitious for me to finish.

s3.png
s1.png
s9.png



s10.png
s5.png
s2.png



s7.png
s0.png
s8.png

Video by TCPixel (Thanks a tonne man)




I've only got three levels in at the moment (my level design skills suck) but the levels are stored in plain text file so it should be easy enough to create more. 6 enemies , 3 bosses with multiple phases, and 5 different weapons. It's a bullet hell game: so you get one life, and a tiny hitbox.

The difficulty system isn't tested, I did most of the bugtesting on the highest difficulty (for the sake of keeping an eye on lag levels), so I don't know if the easier ones are laughably easy or broken.

Controls:
A -
Select (menu only... I'm currently sick of holding down A when playing Mario Kart, and mashing it for Fantasy Life)
B - Back (only works on ship select screen)
Y - Fire Primary
R - Focus Mode (halve movement speed, and uses an alternate weapon)
Start - Return to Menu
Select - Take Screenshot
On the menu, use left and right to increase/decrease difficulty, and change the level (hold Y while changing level to speed-cycle)
You can remap the Fire and Focus controls to A, B, X, Y, L, R, ZL, or ZR in the options menu if you don't like the default.
The game is currently D-Pad only, but adding in circle pad controls wouldn't be a stretch. :)

If anyone gives a crap about level making:
The game will load from any level named correctly. levelx.dat should be the filename where x is the number with no spacers. The game will state invalid if the file does not exist or if the file does not have "v001" on the first line.
The game will likely crash if you have both these but the syntax in the file is incorrect.

Code:
v001 //add this to the start of every level you make, it won't start without it
|T-000100|en01|T|100
|T-000200|en02|L|050

Every line has to be exactly 20 characters long, in this exact format (my text-parser programming skills suck)
The first 6-digit number is the frame the enemy spawns, if you're not lagging this should be 60 per second.

The second cell is the enemy that's spawning.
  • "en01" (Fighter) is the enemy that targets you with bullets
  • "en02" (Bomber) is the enemy that sits still and shoots slow bullets directly downwards
  • "en03" (Strafer) is the sliding enemy that lays down a curtain
  • "en04" (Helix) is the enemy that shoots a helix of bullets and diagonal shots alternatively
  • "en05" (Kamikaze) is a slow moving enemy that proceeds down the screen and then detonates into a ring of bullets if not destroyed
  • "en06" (Asteroid) is a large object that soaks up player shots. Graphic and direction is deterministic based on the frame it was spawned in
  • "en07" (Odin) individual mob. Untested.
  • "bo01", "bo02" and "bo03" are the three current bosses, and spawn after a warning is flashed on screen. Note that two bosses cannot be spawned within a short period of eachother. (and probably not even on the same level, this is largely untested)
The third cell is what side of the screen the enemy will enter. Top, Left, or Right. Note that I haven't tested how en03 works when entering from the Top, and I haven't tested how bo01 works when entering from Left or Right. The whole enemy spawning system is really bare-bones at the moment.

The final cell is the coordinate the enemy spawns at. For Top spawning enemies, this number is the X-coordinate they spawn at, (between 0-400 for left-right) and for Left and Right spawning enemies, this is the Y coordinate. (0-240 for top-bottom)

Okay, bored now?

[3DSX] Release 6.1
  • Re-added a null file that had been accidentally removed, to fix the red bar loading issue
[CIA] Release 7
  • Bullets now clear on stage clear
  • Control configuration and theme does not currently save as the config file is in a read-only location
  • Sounds have been disabled as a crippling bug in CIA form causes sounds to loop and memory leak, I have not identified how to solve this problem
  • As the CIA is a compiled installation, there is not currently a way to use custom levels with the CIA version
[3DSX] Release 6
  • Added sound effects
  • Color scheme is now changeable from options menu. (includes high contrast black and white mode)
[3DSX] Release 5
  • Added new enemy, "Kamikaze"
  • Added new enemy, "Asteroid"
  • Enemies now will kill you on contact
  • Added Level 3, featuring the two new enemies and a new boss, "Odin's Fleet".
  • Bosses now clear bullets before starting the next phase
  • Corrected a calculation error with the scoring (Difficulty was linearly increasing score instead of multiplicatively)
  • Made some dramatic hitbox corrections for enemy ships
  • Increased Level 1 and 2 boss health by 140% to counter the hitbox change.
  • Grazing has temporarily been removed as a new, faster, and pixel-accurate player hit detection system has now been implemented. Grazing may be added back in a later update
  • Fixed a bug that was causing homebrew launched after EUCLIOD to have messed up graphics
  • FPS counter (hopefully should remain at 60 at all times)
  • Boss health bar
  • Debug mode (hold X before loading screen displays) includes "slideshow" recording which replaces screenshots, displays a couple debug values on the bottom screen, and ups Level 1's boss's final attack to one hundred and eleven for testing lag
  • Fixed a bug that was causing multiple level's enemies to load if you chose a level then backed out of the ship select screen before choosing another level
  • Credits added
  • Further improvements to overall system stability and other minor adjustments have been made to enhance the user experience
[3DSX] Release 4
  • Added variation to Level 2 boss's tidal wave attack to eliminate safespots
  • Added two ship types: "Tiger" and "Cicada"
  • Ship selection screen
  • The original ship, "Hawk", received a 25% movement speed reduction
  • Weapons are no longer freely scrollable. Each ship has a Primary weapon and a Focus weapon, which automatically engages when you enter focus mode. You can press Y on the ship selection screen to disable the focus weapon, which causes the Primary weapon to be used for both modes.
  • Corrected a bug that was preventing enemies from despawning and thus the level from being cleared
  • Increased graze range by 30% and doubled point reward for grazing
  • Taking screenshots now works
[3DSX] Release 3
  • Added level 2, including a new enemy (Helix "en04") and a new boss "bo02"
  • 3 New bullet types used by these two enemies: "Sway", "Diagonal", and "Moving Orbitals"
  • Corrected bug that was causing previously loaded level's enemies to spawn (only matters if anyone actually made any levels
  • Buffed seeker shot damage and tracking
  • Nerfed missile's hitbox
  • Exit button works now (big whoop)
  • Tweaked strafers so that they're not so insane on lower difficulties
  • Basic enemy shots now travel slower but have larger hitboxes
  • Basic score counter implemented. Kills and graze count towards score
  • The game will now return to menu once the level is cleared
  • Shortened enemy despawn time to reduce lag
  • Buffed boss health
  • Added "Stage Clear" text. Game will return to menu shortly afterwards

[3DSX] Release 2
  • Substantial optimization regarding boss bullet spawns, seeker rounds, all player shots in general, and moving enemies
  • N3DS mode automatically activates for N3DS systems. O3DS mode can still be forced by holding Y upon launch.
  • Combined, these two changes create a DRAMATIC performance boost for the game, so you can look forward to a lot more bullets in the future
  • The game now returns to menu several seconds after a death. You can still reset early by pressing Start.
  • Custom keybinds menu added. Keybind settings are persistent.
  • Enemies now despawn after 1000 ticks

3DSX: Just extract the archive straight to your SD card and launch via Homebrew Launcher. The unsuffixed zip files are the 3DSX versions.

CIA: Install the CIA using FBI. The zip file with "_CIA" on the end is the CIA version


Despite the CIA version having a more recent release, the 3DSX version is still superior. So if you don't mind going 3DSX over CIA, I'd recommend it.

Mod edit. Download links
https://gbatemp.net/attachments/eucliod_r6-zip.44049/
https://gbatemp.net/attachments/eucliod_r7_cia-zip.46345/
https://gbatemp.net/attachments/eucliod_r6-1-zip.64753/

Credit to Rinnegatamante for developing Lua Player Plus, the application that allows me to program in notepad and not need to know a single other thing about computers or compilers.
 

Attachments

  • Eucliod_r6.zip
    1.2 MB · Views: 1,043
  • Eucliod_r7_CIA.zip
    1.3 MB · Views: 948
  • Eucliod_r6.1.zip
    1.2 MB · Views: 621
Last edited by HexZyle,

Rinnegatamante

Well-Known Member
Member
Joined
Nov 24, 2014
Messages
3,162
Trophies
2
Age
29
Location
Bologna
Website
rinnegatamante.it
XP
4,857
Country
Italy
Ah. Emunand 10.7, hax 2.5 I believe.
I thought the index file goes in the same directory as the 3dsx file. Is it not there?

Code:
/3ds/Eucliod/index.lua

index.lua file is missing. (maybe you included it in romFs).

--------------------- MERGED ---------------------------

Now it starts fine, i'm going to try to optimize the code :D
 
  • Like
Reactions: SLiV3R

Rinnegatamante

Well-Known Member
Member
Joined
Nov 24, 2014
Messages
3,162
Trophies
2
Age
29
Location
Bologna
Website
rinnegatamante.it
XP
4,857
Country
Italy
Ok, i've made some initial changes but since i don't really know the entirety of the code (cause it's not mine) probably there are a lot more things that can be improved:

http://pastebin.com/ymJ8iBmu

Atm this file needs latest commit, you can find a download here: http://rinnegatamante.it/lpp-3ds-priv.3dsx

What should be changed to improve fps:

1) Use latest commit since a lot of internal funcs got a speedboost with bitshifting operations replacing moltiplications/divisions.
2) Use Unsafe version of latest commit (atm what you can download is the debug version since adapting the code with unsafe version could be a bad idea, if you need the unsafe version just tell me)
3) Replace ALL the moltiplications and divisions for pow2 numbers with bitshifting operations for integers value: for example if you have difficulty/64, replace it with difficulty>>7.
4) Redeclare all your functions and variables as locals, even the lpp-3ds ones (like i've done in the pastebin script). Lua uses a stack for variables storing (functions are also considered variables) and accessing globals is much slower then accessing locals (since globals are stored at the begin of the stack so you have to iterate the whole stack everytime to access one of them, also lpp-3ds modules are tables so even accessing a table value is slower then accessing a local).
5) The most important that probably slowdown the whole homebrew, you're calling a lot of time during runtime trigonometric functions like math.atan, math.cos and similars. For a renderer this is a fps killer procedure. To avoid this you can consider to pre-calculate all the possible values for your angles and then store it in a (local) table and recover the value from this table instead of recalculating every time these values. This is how most of the RayCast engine works (RayCast3D uses the same technique, you can see it in action here: https://github.com/Rinnegatamante/Lua-RayCast3D/blob/master/raycast3d.lua#L220-L268
6) Where possible, replace divisions with moltiplications. They're faster in execution.

If you need help for such things, you can also add me to skype (rinnegatamante1) and i can help you if you encounter problems.
Oh, activating 804 Mhz mode like i've done in the pastebin script should definitely solve all framedrops at least on N3DS i think but even on O3DS you can optimize code and let it run fullspeed.

PS The game looks really good, some suggestions i can give you are fixing the bugs for example when player dies the game still goes until someone force quit it and add a BGM music (and maybe SFX sounds for explosions, shoots and similars).
 
Last edited by Rinnegatamante,

Splatoon

Member
Newcomer
Joined
Mar 19, 2016
Messages
24
Trophies
0
Age
21
XP
46
Country
China
Ok, i've made some initial changes but since i don't really know the entirety of the code (cause it's not mine) probably there are a lot more things that can be improved:

http://pastebin.com/ymJ8iBmu

Atm this file needs latest commit, you can find a download here: http://rinnegatamante.it/lpp-3ds-priv.3dsx

What should be changed to improve fps:

1) Use latest commit since a lot of internal funcs got a speedboost with bitshifting operations replacing moltiplications/divisions.
2) Use Unsafe version of latest commit (atm what you can download is the debug version since adapting the code with unsafe version could be a bad idea, if you need the unsafe version just tell me)
3) Replace ALL the moltiplications and divisions for pow2 numbers with bitshifting operations for integers value: for example if you have difficulty/64, replace it with difficulty>>7.
4) Redeclare all your functions and variables as locals, even the lpp-3ds ones (like i've done in the pastebin script). Lua uses a stack for variables storing (functions are also considered variables) and accessing globals is much slower then accessing locals (since globals are stored at the begin of the stack so you have to iterate the whole stack everytime to access one of them, also lpp-3ds modules are tables so even accessing a table value is slower then accessing a local).
5) The most important that probably slowdown the whole homebrew, you're calling a lot of time during runtime trigonometric functions like math.atan, math.cos and similars. For a renderer this is a fps killer procedure. To avoid this you can consider to pre-calculate all the possible values for your angles and then store it in a (local) table and recover the value from this table instead of recalculating every time these values. This is how most of the RayCast engine works (RayCast3D uses the same technique, you can see it in action here: https://github.com/Rinnegatamante/Lua-RayCast3D/blob/master/raycast3d.lua#L220-L268
6) Where possible, replace divisions with moltiplications. They're faster in execution.

If you need help for such things, you can also add me to skype (rinnegatamante1) and i can help you if you encounter problems.
Oh, activating 804 Mhz mode like i've done in the pastebin script should definitely solve all framedrops at least on N3DS i think but even on O3DS you can optimize code and let it run fullspeed.

PS The game looks really good, some suggestions i can give you are fixing the bugs for example when player dies the game still goes until someone force quit it and add a BGM music (and maybe SFX sounds for explosions, shoots and similars).
meanie you ruined his game
 

HexZyle

Pretty Petty Pedant
OP
Member
Joined
Sep 12, 2015
Messages
300
Trophies
0
XP
452
Country
Australia
I'm working as fast as I can, but I'm tipsy at the moment. BTW the download has been updated to contain the actual game file (index.lua)
 

Azel

Well-Known Member
Member
Joined
Dec 16, 2014
Messages
632
Trophies
0
Age
41
XP
656
Country
France
cool stuff :)
can you had an option to change the buttons ?
basically, in most shmup I use held A for laser, mash A for shot, Y for bomb, B held for shot (a rapid A if you will)

I haven't played much Tohô but I play Cave danmaku a lot :)
 

HexZyle

Pretty Petty Pedant
OP
Member
Joined
Sep 12, 2015
Messages
300
Trophies
0
XP
452
Country
Australia
cool stuff :)
can you had an option to change the buttons ?
basically, in most shmup I use held A for laser, mash A for shot, Y for bomb, B held for shot (a rapid A if you will)

I haven't played much Tohô but I play Cave danmaku a lot :)

Certainly. I've got a couple things I'd like to add to the options menu like autofire, and control mapping is pretty easy to program.

EDIT: Done the keybinding menu. You can remap shooting, switching weapon, and focus mode, and the buttons you can use are A, B, X, Y, L, R, ZL, and ZR.
 
Last edited by HexZyle,
  • Like
Reactions: Azel and SLiV3R

Slashcash

Well-Known Member
Member
Joined
Oct 15, 2015
Messages
338
Trophies
0
XP
611
Country
Italy
  • Like
Reactions: SLiV3R

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Psionic Roshambo @ Psionic Roshambo: https://m.youtube.com/watch?v=_NTF5_qgH0o