Skip to content

This is an attempt to use classic sorting algorithm to sort arrays in godot 4

License

Notifications You must be signed in to change notification settings

wolfsmith520-github/Godot-Array-Sorting-Algorithm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Godot Array Sorting Algorithm

This is an attempt to use classic sorting algorithm to sort arrays in godot 4.

I started learning sorting algorithm in collage, so I decide to put my knowledge to good use.

I am not a good programmer currently, and feel free to pull request to help make this project better.

What is in the project

Currently there are 6 sorting algorithm, all of them have ascending sort and descending sort, you cancheck the DES on the HUD to switch.

Good old and the best sorting algorithm

Very easy to achieve this algorithm but the performance sometimes are very bad

Good for small array bad for large array

Just insertion sort, but a little bit faster

An in-place comparison sorting algorithm. It inefficient on large lists, and generally performs worse than the similar insertion sort.

heapsort is a comparison-based sorting algorithm which can be thought of as "an implementation of selection sort using the right data structure."

About the Timer

Since GDscript is base on Python, doing large add is so slow, the timer's result only contain the time used to sort, so if the game freeze, it's most likely Godot's fault (lol)

About

This is an attempt to use classic sorting algorithm to sort arrays in godot 4

Resources

License

Stars

Watchers

Forks

Packages

No packages published