diff --git a/search/search_index.json b/search/search_index.json index 47f72a0..1a31537 100644 --- a/search/search_index.json +++ b/search/search_index.json @@ -1 +1 @@ -{"config":{"indexing":"full","lang":["en"],"min_search_length":3,"prebuild_index":false,"separator":"[\\s\\-]+"},"docs":[{"location":"","text":"Fusion Engine Documentation \ud83d\udddc\ufe0f Table of Contents Welcome to fusion engine documentation! We have seperated the documentation in some parts: main, api, wiki and tutorial. Wiki is made if you need to know what a function does. Api is made if you need to know if a function exist and what arguments it takes And in tutorials we made some tutorials for you to better understand fusion! Wiki Setting up Wiki Api Setting up API Tutorials Tutorials Todo list and changelog 3.0.0 4.0.0 \ud83d\udcbb Setting up To install it run this: pip install fusion-engine Then import: import fusionengine as engine And after that you need to create a object of our engine to run functions of it: main = engine.Main()","title":"Home"},{"location":"#fusion-engine-documentation","text":"","title":"Fusion Engine Documentation"},{"location":"#table-of-contents","text":"Welcome to fusion engine documentation! We have seperated the documentation in some parts: main, api, wiki and tutorial. Wiki is made if you need to know what a function does. Api is made if you need to know if a function exist and what arguments it takes And in tutorials we made some tutorials for you to better understand fusion!","title":"\ud83d\udddc\ufe0f Table of Contents"},{"location":"#wiki","text":"Setting up Wiki","title":"Wiki"},{"location":"#api","text":"Setting up API","title":"Api"},{"location":"#tutorials","text":"Tutorials","title":"Tutorials"},{"location":"#todo-list-and-changelog","text":"3.0.0 4.0.0","title":"Todo list and changelog"},{"location":"#setting-up","text":"To install it run this: pip install fusion-engine Then import: import fusionengine as engine And after that you need to create a object of our engine to run functions of it: main = engine.Main()","title":"\ud83d\udcbb Setting up"},{"location":"api/","text":"Api Welcome to our api! Here you will find all functions that exist in fusion engine and what arguments they get. We have seperated the api in some parts, like main api, color api and more. You choose one you need. Can't find something? Then try looking in the main api/ So have luck! Table of contents Main API Color API Font API Key API","title":"Api"},{"location":"api/#api","text":"Welcome to our api! Here you will find all functions that exist in fusion engine and what arguments they get. We have seperated the api in some parts, like main api, color api and more. You choose one you need. Can't find something? Then try looking in the main api/ So have luck!","title":"Api"},{"location":"api/#table-of-contents","text":"Main API Color API Font API Key API","title":"Table of contents"},{"location":"api/api/","text":"API Window main.window new_window(title: str, width: int, height: int) change_icon(image_path: str) loop(your_loop_func) set_fps(self, fps: int) force_quit() Event main.event key_down(key) key_down_once(key) Draw main.draw draw_line(window, x1: int, y1: int, x2: int, y2: int, color: tuple) draw_line_rect(window, x: int, y: int, width: int, height: int, color: tuple) draw_rect(window, x: int, y: int, width: int, height: int, color: tuple) draw_own_rect(window, rect) set_background_color(window, color: tuple) Image main.image open_image(window, image_path: str, x: int, y: int, width: int, height: int) draw_image(image) Body main.body Entity(window, x: int, y: int, width: int, height: int) Shape main.shape new_rect(x: int, y: int, width: int, height: int, color: tuple) new_rect_button(x, y, width, height) UI main.ui main.ui.button new_button(window: windowfe._CustomRenderer, rect: shape._CustomShape, text: str) Some button functions: your_button.button_pressed() -> bool main.ui.text def print_text(window, text: str, x: int, y: int, font_path: str, font_size: int, color: tuple) Debug main.debug DEBUGIMAGE Vector main.vector new_vector2d(x: int, y: int) Sound main.sound load_sound(sound_path: str) play_background_music(sound_path: str) set_volume_global(volume) Loaded sound API play() stop() get_volume() set_volume(volume: int) fadeout(time: str)","title":"API"},{"location":"api/api/#api","text":"","title":"API"},{"location":"api/api/#window","text":"","title":"Window"},{"location":"api/api/#mainwindow","text":"new_window(title: str, width: int, height: int) change_icon(image_path: str) loop(your_loop_func) set_fps(self, fps: int) force_quit()","title":"main.window"},{"location":"api/api/#event","text":"","title":"Event"},{"location":"api/api/#mainevent","text":"key_down(key) key_down_once(key)","title":"main.event"},{"location":"api/api/#draw","text":"","title":"Draw"},{"location":"api/api/#maindraw","text":"draw_line(window, x1: int, y1: int, x2: int, y2: int, color: tuple) draw_line_rect(window, x: int, y: int, width: int, height: int, color: tuple) draw_rect(window, x: int, y: int, width: int, height: int, color: tuple) draw_own_rect(window, rect) set_background_color(window, color: tuple)","title":"main.draw"},{"location":"api/api/#image","text":"","title":"Image"},{"location":"api/api/#mainimage","text":"open_image(window, image_path: str, x: int, y: int, width: int, height: int) draw_image(image)","title":"main.image"},{"location":"api/api/#body","text":"","title":"Body"},{"location":"api/api/#mainbody","text":"Entity(window, x: int, y: int, width: int, height: int)","title":"main.body"},{"location":"api/api/#shape","text":"","title":"Shape"},{"location":"api/api/#mainshape","text":"new_rect(x: int, y: int, width: int, height: int, color: tuple) new_rect_button(x, y, width, height)","title":"main.shape"},{"location":"api/api/#ui","text":"","title":"UI"},{"location":"api/api/#mainui","text":"","title":"main.ui"},{"location":"api/api/#mainuibutton","text":"new_button(window: windowfe._CustomRenderer, rect: shape._CustomShape, text: str) Some button functions: your_button.button_pressed() -> bool","title":"main.ui.button"},{"location":"api/api/#mainuitext","text":"def print_text(window, text: str, x: int, y: int, font_path: str, font_size: int, color: tuple)","title":"main.ui.text"},{"location":"api/api/#debug","text":"","title":"Debug"},{"location":"api/api/#maindebug","text":"DEBUGIMAGE","title":"main.debug"},{"location":"api/api/#vector","text":"","title":"Vector"},{"location":"api/api/#mainvector","text":"new_vector2d(x: int, y: int)","title":"main.vector"},{"location":"api/api/#sound","text":"","title":"Sound"},{"location":"api/api/#mainsound","text":"load_sound(sound_path: str) play_background_music(sound_path: str) set_volume_global(volume)","title":"main.sound"},{"location":"api/api/#loaded-sound-api","text":"play() stop() get_volume() set_volume(volume: int) fadeout(time: str)","title":"Loaded sound API"},{"location":"api/color/","text":"Color API Color main.color BLUE = (0, 0, 255, 255) BLACK = (0, 0, 0, 255) WHITE = (255, 255, 255, 255) GREEN = (255, 255, 255, 255) RED = (255, 0, 0, 255) YELLOW = (255, 255, 0, 255) PURPLE = (255, 0, 255, 255) CYAN = (0, 255, 255, 255) ORANGE = (255, 165, 0, 255) GRAY = (128, 128, 128, 255) BROWN = (165, 42, 42, 255) PINK = (255, 192, 203, 255) MAGENTA = (255, 0, 255, 255) SILVER = (192, 192, 192, 255) GOLD = (255, 215, 0, 255) BRONZE = (205, 127, 50, 255) LIME = (0, 255, 0, 255) OLIVE = (128, 128, 0, 255) TEAL = (0, 128, 128, 255) NAVY = (0, 0, 128, 255) MAROON = (128, 0, 0, 255) INDIGO = (75, 0, 130, 255) TURQUOISE = (64, 224, 208, 255) VIOLET = (238, 130, 238, 255) AQUA = (0, 255, 255, 255) TAN = (210, 180, 140, 255) BEIGE = (245, 245, 220, 255) IVORY = (255, 255, 240, 255) LAVENDER = (230, 230, 250, 255) MINT = (189, 252, 201, 255) SALMON = (250, 128, 114, 255) SCARLET = (255, 36, 0, 255) TEAL = (0, 128, 128, 255) TOMATO = (255, 99, 71, 255) CRIMSON = (220, 20, 60, 255) AZURE = (0, 128, 255, 255) Colortools main.colortools hex_to_rgba(hex)","title":"Color API"},{"location":"api/color/#color-api","text":"","title":"Color API"},{"location":"api/color/#color","text":"","title":"Color"},{"location":"api/color/#maincolor","text":"BLUE = (0, 0, 255, 255) BLACK = (0, 0, 0, 255) WHITE = (255, 255, 255, 255) GREEN = (255, 255, 255, 255) RED = (255, 0, 0, 255) YELLOW = (255, 255, 0, 255) PURPLE = (255, 0, 255, 255) CYAN = (0, 255, 255, 255) ORANGE = (255, 165, 0, 255) GRAY = (128, 128, 128, 255) BROWN = (165, 42, 42, 255) PINK = (255, 192, 203, 255) MAGENTA = (255, 0, 255, 255) SILVER = (192, 192, 192, 255) GOLD = (255, 215, 0, 255) BRONZE = (205, 127, 50, 255) LIME = (0, 255, 0, 255) OLIVE = (128, 128, 0, 255) TEAL = (0, 128, 128, 255) NAVY = (0, 0, 128, 255) MAROON = (128, 0, 0, 255) INDIGO = (75, 0, 130, 255) TURQUOISE = (64, 224, 208, 255) VIOLET = (238, 130, 238, 255) AQUA = (0, 255, 255, 255) TAN = (210, 180, 140, 255) BEIGE = (245, 245, 220, 255) IVORY = (255, 255, 240, 255) LAVENDER = (230, 230, 250, 255) MINT = (189, 252, 201, 255) SALMON = (250, 128, 114, 255) SCARLET = (255, 36, 0, 255) TEAL = (0, 128, 128, 255) TOMATO = (255, 99, 71, 255) CRIMSON = (220, 20, 60, 255) AZURE = (0, 128, 255, 255)","title":"main.color"},{"location":"api/color/#colortools","text":"","title":"Colortools"},{"location":"api/color/#maincolortools","text":"hex_to_rgba(hex)","title":"main.colortools"},{"location":"api/fonts/","text":"Font API main.font NUNITO_LIGHT SAIRACONDENSED_EXTRABOLD","title":"Font API"},{"location":"api/fonts/#font-api","text":"","title":"Font API"},{"location":"api/fonts/#mainfont","text":"NUNITO_LIGHT SAIRACONDENSED_EXTRABOLD","title":"main.font"},{"location":"api/keys/","text":"Keys API main.keys KEY_UNKNOWN = sdl2.SDLK_UNKNOWN KEY_RETURN = sdl2.SDLK_RETURN KEY_ESCAPE = sdl2.SDLK_ESCAPE KEY_BACKSPACE = sdl2.SDLK_BACKSPACE KEY_TAB = sdl2.SDLK_TAB KEY_SPACE = sdl2.SDLK_SPACE KEY_EXCLAIM = sdl2.SDLK_EXCLAIM KEY_QUOTEDBL = sdl2.SDLK_QUOTEDBL KEY_HASH = sdl2.SDLK_HASH KEY_PERCENT = sdl2.SDLK_PERCENT KEY_DOLLAR = sdl2.SDLK_DOLLAR KEY_AMPERSAND = sdl2.SDLK_AMPERSAND KEY_QUOTE = sdl2.SDLK_QUOTE KEY_LEFTPAREN = sdl2.SDLK_LEFTPAREN KEY_RIGHTPAREN = sdl2.SDLK_RIGHTPAREN KEY_ASTERISK = sdl2.SDLK_ASTERISK KEY_PLUS = sdl2.SDLK_PLUS KEY_COMMA = sdl2.SDLK_COMMA KEY_MINUS = sdl2.SDLK_MINUS KEY_PERIOD = sdl2.SDLK_PERIOD KEY_SLASH = sdl2.SDLK_SLASH KEY_0 = sdl2.SDLK_0 KEY_1 = sdl2.SDLK_1 KEY_2 = sdl2.SDLK_2 KEY_3 = sdl2.SDLK_3 KEY_4 = sdl2.SDLK_4 KEY_5 = sdl2.SDLK_5 KEY_6 = sdl2.SDLK_6 KEY_7 = sdl2.SDLK_7 KEY_8 = sdl2.SDLK_8 KEY_9 = sdl2.SDLK_9 KEY_COLON = sdl2.SDLK_COLON KEY_SEMICOLON = sdl2.SDLK_SEMICOLON KEY_LESS = sdl2.SDLK_LESS KEY_EQUALS = sdl2.SDLK_EQUALS KEY_GREATER = sdl2.SDLK_GREATER KEY_QUESTION = sdl2.SDLK_QUESTION KEY_AT = sdl2.SDLK_AT KEY_LEFTBRACKET = sdl2.SDLK_LEFTBRACKET KEY_BACKSLASH = sdl2.SDLK_BACKSLASH KEY_RIGHTBRACKET = sdl2.SDLK_RIGHTBRACKET KEY_CARET = sdl2.SDLK_CARET KEY_UNDERSCORE = sdl2.SDLK_UNDERSCORE KEY_BACKQUOTE = sdl2.SDLK_BACKQUOTE KEY_a = sdl2.SDLK_a KEY_b = sdl2.SDLK_b KEY_c = sdl2.SDLK_c KEY_d = sdl2.SDLK_d KEY_e = sdl2.SDLK_e KEY_f = sdl2.SDLK_f KEY_g = sdl2.SDLK_g KEY_h = sdl2.SDLK_h KEY_i = sdl2.SDLK_i KEY_j = sdl2.SDLK_j KEY_k = sdl2.SDLK_k KEY_l = sdl2.SDLK_l KEY_m = sdl2.SDLK_m KEY_n = sdl2.SDLK_n KEY_o = sdl2.SDLK_o KEY_p = sdl2.SDLK_p KEY_q = sdl2.SDLK_q KEY_r = sdl2.SDLK_r KEY_s = sdl2.SDLK_s KEY_t = sdl2.SDLK_t KEY_u = sdl2.SDLK_u KEY_v = sdl2.SDLK_v KEY_w = sdl2.SDLK_w KEY_x = sdl2.SDLK_x KEY_y = sdl2.SDLK_y KEY_z = sdl2.SDLK_z KEY_CAPSLOCK = sdl2.SDLK_CAPSLOCK KEY_F1 = sdl2.SDLK_F1 KEY_F2 = sdl2.SDLK_F2 KEY_F3 = sdl2.SDLK_F3 KEY_F4 = sdl2.SDLK_F4 KEY_F5 = sdl2.SDLK_F5 KEY_F6 = sdl2.SDLK_F6 KEY_F7 = sdl2.SDLK_F7 KEY_F8 = sdl2.SDLK_F8 KEY_F9 = sdl2.SDLK_F9 KEY_F10 = sdl2.SDLK_F10 KEY_F11 = sdl2.SDLK_F11 KEY_F12 = sdl2.SDLK_F12 KEY_PRINTSCREEN = sdl2.SDLK_PRINTSCREEN KEY_SCROLLLOCK = sdl2.SDLK_SCROLLLOCK KEY_PAUSE = sdl2.SDLK_PAUSE KEY_INSERT = sdl2.SDLK_INSERT KEY_HOME = sdl2.SDLK_HOME KEY_PAGEUP = sdl2.SDLK_PAGEUP KEY_DELETE = sdl2.SDLK_DELETE KEY_END = sdl2.SDLK_END KEY_PAGEDOWN = sdl2.SDLK_PAGEDOWN KEY_RIGHT = sdl2.SDLK_RIGHT KEY_LEFT = sdl2.SDLK_LEFT KEY_DOWN = sdl2.SDLK_DOWN KEY_UP = sdl2.SDLK_UP KEY_NUMLOCKCLEAR = sdl2.SDLK_NUMLOCKCLEAR KEY_KP_DIVIDE = sdl2.SDLK_KP_DIVIDE KEY_KP_MULTIPLY = sdl2.SDLK_KP_MULTIPLY KEY_KP_MINUS = sdl2.SDLK_KP_MINUS KEY_KP_PLUS = sdl2.SDLK_KP_PLUS KEY_KP_ENTER = sdl2.SDLK_KP_ENTER KEY_KP_1 = sdl2.SDLK_KP_1 KEY_KP_2 = sdl2.SDLK_KP_2 KEY_KP_3 = sdl2.SDLK_KP_3 KEY_KP_4 = sdl2.SDLK_KP_4 KEY_KP_5 = sdl2.SDLK_KP_5 KEY_KP_6 = sdl2.SDLK_KP_6 KEY_KP_7 = sdl2.SDLK_KP_7 KEY_KP_8 = sdl2.SDLK_KP_8 KEY_KP_9 = sdl2.SDLK_KP_9 KEY_KP_0 = sdl2.SDLK_KP_0 KEY_KP_PERIOD = sdl2.SDLK_KP_PERIOD KEY_APPLICATION = sdl2.SDLK_APPLICATION KEY_POWER = sdl2.SDLK_POWER KEY_KP_EQUALS = sdl2.SDLK_KP_EQUALS KEY_F13 = sdl2.SDLK_F13 KEY_F14 = sdl2.SDLK_F14 KEY_F15 = sdl2.SDLK_F15 KEY_F16 = sdl2.SDLK_F16 KEY_F17 = sdl2.SDLK_F17 KEY_F18 = sdl2.SDLK_F18 KEY_F19 = sdl2.SDLK_F19 KEY_F20 = sdl2.SDLK_F20 KEY_F21 = sdl2.SDLK_F21 KEY_F22 = sdl2.SDLK_F22 KEY_F23 = sdl2.SDLK_F23 KEY_F24 = sdl2.SDLK_F24 KEY_EXECUTE = sdl2.SDLK_EXECUTE KEY_HELP = sdl2.SDLK_HELP KEY_MENU = sdl2.SDLK_MENU KEY_SELECT = sdl2.SDLK_SELECT KEY_STOP = sdl2.SDLK_STOP KEY_AGAIN = sdl2.SDLK_AGAIN KEY_UNDO = sdl2.SDLK_UNDO KEY_CUT = sdl2.SDLK_CUT KEY_COPY = sdl2.SDLK_COPY KEY_PASTE = sdl2.SDLK_PASTE KEY_FIND = sdl2.SDLK_FIND KEY_MUTE = sdl2.SDLK_MUTE KEY_VOLUMEUP = sdl2.SDLK_VOLUMEUP KEY_VOLUMEDOWN = sdl2.SDLK_VOLUMEDOWN KEY_KP_COMMA = sdl2.SDLK_KP_COMMA KEY_KP_EQUALSAS400 = sdl2.SDLK_KP_EQUALSAS400 KEY_ALTERASE = sdl2.SDLK_ALTERASE KEY_SYSREQ = sdl2.SDLK_SYSREQ KEY_CANCEL = sdl2.SDLK_CANCEL KEY_CLEAR = sdl2.SDLK_CLEAR KEY_PRIOR = sdl2.SDLK_PRIOR KEY_RETURN2 = sdl2.SDLK_RETURN2 KEY_SEPARATOR = sdl2.SDLK_SEPARATOR KEY_OUT = sdl2.SDLK_OUT KEY_OPER = sdl2.SDLK_OPER KEY_CLEARAGAIN = sdl2.SDLK_CLEARAGAIN KEY_CRSEL = sdl2.SDLK_CRSEL KEY_EXSEL = sdl2.SDLK_EXSEL KEY_KP_00 = sdl2.SDLK_KP_00 KEY_KP_000 = sdl2.SDLK_KP_000 KEY_THOUSANDSSEPARATOR = sdl2.SDLK_THOUSANDSSEPARATOR KEY_DECIMALSEPARATOR = sdl2.SDLK_DECIMALSEPARATOR KEY_CURRENCYUNIT = sdl2.SDLK_CURRENCYUNIT KEY_CURRENCYSUBUNIT = sdl2.SDLK_CURRENCYSUBUNIT KEY_KP_LEFTPAREN = sdl2.SDLK_KP_LEFTPAREN KEY_KP_RIGHTPAREN = sdl2.SDLK_KP_RIGHTPAREN KEY_KP_LEFTBRACE = sdl2.SDLK_KP_LEFTBRACE KEY_KP_RIGHTBRACE = sdl2.SDLK_KP_RIGHTBRACE KEY_KP_TAB = sdl2.SDLK_KP_TAB KEY_KP_BACKSPACE = sdl2.SDLK_KP_BACKSPACE KEY_KP_A = sdl2.SDLK_KP_A KEY_KP_B = sdl2.SDLK_KP_B KEY_KP_C = sdl2.SDLK_KP_C KEY_KP_D = sdl2.SDLK_KP_D KEY_KP_E = sdl2.SDLK_KP_E KEY_KP_F = sdl2.SDLK_KP_F KEY_KP_XOR = sdl2.SDLK_KP_XOR KEY_KP_POWER = sdl2.SDLK_KP_POWER KEY_KP_PERCENT = sdl2.SDLK_KP_PERCENT KEY_KP_LESS = sdl2.SDLK_KP_LESS KEY_KP_GREATER = sdl2.SDLK_KP_GREATER KEY_KP_AMPERSAND = sdl2.SDLK_KP_AMPERSAND KEY_KP_DBLAMPERSAND = sdl2.SDLK_KP_DBLAMPERSAND KEY_KP_VERTICALBAR = sdl2.SDLK_KP_VERTICALBAR KEY_KP_DBLVERTICALBAR = sdl2.SDLK_KP_DBLVERTICALBAR KEY_KP_COLON = sdl2.SDLK_KP_COLON KEY_KP_HASH = sdl2.SDLK_KP_HASH KEY_KP_SPACE = sdl2.SDLK_KP_SPACE KEY_KP_AT = sdl2.SDLK_KP_AT KEY_KP_EXCLAM = sdl2.SDLK_KP_EXCLAM KEY_KP_MEMSTORE = sdl2.SDLK_KP_MEMSTORE KEY_KP_MEMRECALL = sdl2.SDLK_KP_MEMRECALL KEY_KP_MEMCLEAR = sdl2.SDLK_KP_MEMCLEAR KEY_KP_MEMADD = sdl2.SDLK_KP_MEMADD KEY_KP_MEMSUBTRACT = sdl2.SDLK_KP_MEMSUBTRACT KEY_KP_MEMMULTIPLY = sdl2.SDLK_KP_MEMMULTIPLY KEY_KP_MEMDIVIDE = sdl2.SDLK_KP_MEMDIVIDE KEY_KP_PLUSMINUS = sdl2.SDLK_KP_PLUSMINUS KEY_KP_CLEAR = sdl2.SDLK_KP_CLEAR KEY_KP_CLEARENTRY = sdl2.SDLK_KP_CLEARENTRY KEY_KP_BINARY = sdl2.SDLK_KP_BINARY KEY_KP_OCTAL = sdl2.SDLK_KP_OCTAL KEY_KP_DECIMAL = sdl2.SDLK_KP_DECIMAL KEY_KP_HEXADECIMAL = sdl2.SDLK_KP_HEXADECIMAL KEY_LCTRL = sdl2.SDLK_LCTRL KEY_LSHIFT = sdl2.SDLK_LSHIFT KEY_LALT = sdl2.SDLK_LALT KEY_LGUI = sdl2.SDLK_LGUI KEY_RCTRL = sdl2.SDLK_RCTRL KEY_RSHIFT = sdl2.SDLK_RSHIFT KEY_RALT = sdl2.SDLK_RALT KEY_RGUI = sdl2.SDLK_RGUI KEY_MODE = sdl2.SDLK_MODE KEY_AUDIONEXT = sdl2.SDLK_AUDIONEXT KEY_AUDIOPREV = sdl2.SDLK_AUDIOPREV KEY_AUDIOSTOP = sdl2.SDLK_AUDIOSTOP KEY_AUDIOPLAY = sdl2.SDLK_AUDIOPLAY KEY_AUDIOMUTE = sdl2.SDLK_AUDIOMUTE KEY_MEDIASELECT = sdl2.SDLK_MEDIASELECT KEY_WWW = sdl2.SDLK_WWW KEY_MAIL = sdl2.SDLK_MAIL KEY_CALCULATOR = sdl2.SDLK_CALCULATOR KEY_COMPUTER = sdl2.SDLK_COMPUTER KEY_AC_SEARCH = sdl2.SDLK_AC_SEARCH KEY_AC_HOME = sdl2.SDLK_AC_HOME KEY_AC_BACK = sdl2.SDLK_AC_BACK KEY_AC_FORWARD = sdl2.SDLK_AC_FORWARD KEY_AC_STOP = sdl2.SDLK_AC_STOP KEY_AC_REFRESH = sdl2.SDLK_AC_REFRESH KEY_AC_BOOKMARKS = sdl2.SDLK_AC_BOOKMARKS KEY_BRIGHTNESSDOWN = sdl2.SDLK_BRIGHTNESSDOWN KEY_BRIGHTNESSUP = sdl2.SDLK_BRIGHTNESSUP KEY_DISPLAYSWITCH = sdl2.SDLK_DISPLAYSWITCH KEY_KBDILLUMTOGGLE = sdl2.SDLK_KBDILLUMTOGGLE KEY_KBDILLUMDOWN = sdl2.SDLK_KBDILLUMDOWN KEY_KBDILLUMUP = sdl2.SDLK_KBDILLUMUP KEY_EJECT = sdl2.SDLK_EJECT KEY_SLEEP = sdl2.SDLK_SLEEP","title":"Keys API"},{"location":"api/keys/#keys-api","text":"","title":"Keys API"},{"location":"api/keys/#mainkeys","text":"KEY_UNKNOWN = sdl2.SDLK_UNKNOWN KEY_RETURN = sdl2.SDLK_RETURN KEY_ESCAPE = sdl2.SDLK_ESCAPE KEY_BACKSPACE = sdl2.SDLK_BACKSPACE KEY_TAB = sdl2.SDLK_TAB KEY_SPACE = sdl2.SDLK_SPACE KEY_EXCLAIM = sdl2.SDLK_EXCLAIM KEY_QUOTEDBL = sdl2.SDLK_QUOTEDBL KEY_HASH = sdl2.SDLK_HASH KEY_PERCENT = sdl2.SDLK_PERCENT KEY_DOLLAR = sdl2.SDLK_DOLLAR KEY_AMPERSAND = sdl2.SDLK_AMPERSAND KEY_QUOTE = sdl2.SDLK_QUOTE KEY_LEFTPAREN = sdl2.SDLK_LEFTPAREN KEY_RIGHTPAREN = sdl2.SDLK_RIGHTPAREN KEY_ASTERISK = sdl2.SDLK_ASTERISK KEY_PLUS = sdl2.SDLK_PLUS KEY_COMMA = sdl2.SDLK_COMMA KEY_MINUS = sdl2.SDLK_MINUS KEY_PERIOD = sdl2.SDLK_PERIOD KEY_SLASH = sdl2.SDLK_SLASH KEY_0 = sdl2.SDLK_0 KEY_1 = sdl2.SDLK_1 KEY_2 = sdl2.SDLK_2 KEY_3 = sdl2.SDLK_3 KEY_4 = sdl2.SDLK_4 KEY_5 = sdl2.SDLK_5 KEY_6 = sdl2.SDLK_6 KEY_7 = sdl2.SDLK_7 KEY_8 = sdl2.SDLK_8 KEY_9 = sdl2.SDLK_9 KEY_COLON = sdl2.SDLK_COLON KEY_SEMICOLON = sdl2.SDLK_SEMICOLON KEY_LESS = sdl2.SDLK_LESS KEY_EQUALS = sdl2.SDLK_EQUALS KEY_GREATER = sdl2.SDLK_GREATER KEY_QUESTION = sdl2.SDLK_QUESTION KEY_AT = sdl2.SDLK_AT KEY_LEFTBRACKET = sdl2.SDLK_LEFTBRACKET KEY_BACKSLASH = sdl2.SDLK_BACKSLASH KEY_RIGHTBRACKET = sdl2.SDLK_RIGHTBRACKET KEY_CARET = sdl2.SDLK_CARET KEY_UNDERSCORE = sdl2.SDLK_UNDERSCORE KEY_BACKQUOTE = sdl2.SDLK_BACKQUOTE KEY_a = sdl2.SDLK_a KEY_b = sdl2.SDLK_b KEY_c = sdl2.SDLK_c KEY_d = sdl2.SDLK_d KEY_e = sdl2.SDLK_e KEY_f = sdl2.SDLK_f KEY_g = sdl2.SDLK_g KEY_h = sdl2.SDLK_h KEY_i = sdl2.SDLK_i KEY_j = sdl2.SDLK_j KEY_k = sdl2.SDLK_k KEY_l = sdl2.SDLK_l KEY_m = sdl2.SDLK_m KEY_n = sdl2.SDLK_n KEY_o = sdl2.SDLK_o KEY_p = sdl2.SDLK_p KEY_q = sdl2.SDLK_q KEY_r = sdl2.SDLK_r KEY_s = sdl2.SDLK_s KEY_t = sdl2.SDLK_t KEY_u = sdl2.SDLK_u KEY_v = sdl2.SDLK_v KEY_w = sdl2.SDLK_w KEY_x = sdl2.SDLK_x KEY_y = sdl2.SDLK_y KEY_z = sdl2.SDLK_z KEY_CAPSLOCK = sdl2.SDLK_CAPSLOCK KEY_F1 = sdl2.SDLK_F1 KEY_F2 = sdl2.SDLK_F2 KEY_F3 = sdl2.SDLK_F3 KEY_F4 = sdl2.SDLK_F4 KEY_F5 = sdl2.SDLK_F5 KEY_F6 = sdl2.SDLK_F6 KEY_F7 = sdl2.SDLK_F7 KEY_F8 = sdl2.SDLK_F8 KEY_F9 = sdl2.SDLK_F9 KEY_F10 = sdl2.SDLK_F10 KEY_F11 = sdl2.SDLK_F11 KEY_F12 = sdl2.SDLK_F12 KEY_PRINTSCREEN = sdl2.SDLK_PRINTSCREEN KEY_SCROLLLOCK = sdl2.SDLK_SCROLLLOCK KEY_PAUSE = sdl2.SDLK_PAUSE KEY_INSERT = sdl2.SDLK_INSERT KEY_HOME = sdl2.SDLK_HOME KEY_PAGEUP = sdl2.SDLK_PAGEUP KEY_DELETE = sdl2.SDLK_DELETE KEY_END = sdl2.SDLK_END KEY_PAGEDOWN = sdl2.SDLK_PAGEDOWN KEY_RIGHT = sdl2.SDLK_RIGHT KEY_LEFT = sdl2.SDLK_LEFT KEY_DOWN = sdl2.SDLK_DOWN KEY_UP = sdl2.SDLK_UP KEY_NUMLOCKCLEAR = sdl2.SDLK_NUMLOCKCLEAR KEY_KP_DIVIDE = sdl2.SDLK_KP_DIVIDE KEY_KP_MULTIPLY = sdl2.SDLK_KP_MULTIPLY KEY_KP_MINUS = sdl2.SDLK_KP_MINUS KEY_KP_PLUS = sdl2.SDLK_KP_PLUS KEY_KP_ENTER = sdl2.SDLK_KP_ENTER KEY_KP_1 = sdl2.SDLK_KP_1 KEY_KP_2 = sdl2.SDLK_KP_2 KEY_KP_3 = sdl2.SDLK_KP_3 KEY_KP_4 = sdl2.SDLK_KP_4 KEY_KP_5 = sdl2.SDLK_KP_5 KEY_KP_6 = sdl2.SDLK_KP_6 KEY_KP_7 = sdl2.SDLK_KP_7 KEY_KP_8 = sdl2.SDLK_KP_8 KEY_KP_9 = sdl2.SDLK_KP_9 KEY_KP_0 = sdl2.SDLK_KP_0 KEY_KP_PERIOD = sdl2.SDLK_KP_PERIOD KEY_APPLICATION = sdl2.SDLK_APPLICATION KEY_POWER = sdl2.SDLK_POWER KEY_KP_EQUALS = sdl2.SDLK_KP_EQUALS KEY_F13 = sdl2.SDLK_F13 KEY_F14 = sdl2.SDLK_F14 KEY_F15 = sdl2.SDLK_F15 KEY_F16 = sdl2.SDLK_F16 KEY_F17 = sdl2.SDLK_F17 KEY_F18 = sdl2.SDLK_F18 KEY_F19 = sdl2.SDLK_F19 KEY_F20 = sdl2.SDLK_F20 KEY_F21 = sdl2.SDLK_F21 KEY_F22 = sdl2.SDLK_F22 KEY_F23 = sdl2.SDLK_F23 KEY_F24 = sdl2.SDLK_F24 KEY_EXECUTE = sdl2.SDLK_EXECUTE KEY_HELP = sdl2.SDLK_HELP KEY_MENU = sdl2.SDLK_MENU KEY_SELECT = sdl2.SDLK_SELECT KEY_STOP = sdl2.SDLK_STOP KEY_AGAIN = sdl2.SDLK_AGAIN KEY_UNDO = sdl2.SDLK_UNDO KEY_CUT = sdl2.SDLK_CUT KEY_COPY = sdl2.SDLK_COPY KEY_PASTE = sdl2.SDLK_PASTE KEY_FIND = sdl2.SDLK_FIND KEY_MUTE = sdl2.SDLK_MUTE KEY_VOLUMEUP = sdl2.SDLK_VOLUMEUP KEY_VOLUMEDOWN = sdl2.SDLK_VOLUMEDOWN KEY_KP_COMMA = sdl2.SDLK_KP_COMMA KEY_KP_EQUALSAS400 = sdl2.SDLK_KP_EQUALSAS400 KEY_ALTERASE = sdl2.SDLK_ALTERASE KEY_SYSREQ = sdl2.SDLK_SYSREQ KEY_CANCEL = sdl2.SDLK_CANCEL KEY_CLEAR = sdl2.SDLK_CLEAR KEY_PRIOR = sdl2.SDLK_PRIOR KEY_RETURN2 = sdl2.SDLK_RETURN2 KEY_SEPARATOR = sdl2.SDLK_SEPARATOR KEY_OUT = sdl2.SDLK_OUT KEY_OPER = sdl2.SDLK_OPER KEY_CLEARAGAIN = sdl2.SDLK_CLEARAGAIN KEY_CRSEL = sdl2.SDLK_CRSEL KEY_EXSEL = sdl2.SDLK_EXSEL KEY_KP_00 = sdl2.SDLK_KP_00 KEY_KP_000 = sdl2.SDLK_KP_000 KEY_THOUSANDSSEPARATOR = sdl2.SDLK_THOUSANDSSEPARATOR KEY_DECIMALSEPARATOR = sdl2.SDLK_DECIMALSEPARATOR KEY_CURRENCYUNIT = sdl2.SDLK_CURRENCYUNIT KEY_CURRENCYSUBUNIT = sdl2.SDLK_CURRENCYSUBUNIT KEY_KP_LEFTPAREN = sdl2.SDLK_KP_LEFTPAREN KEY_KP_RIGHTPAREN = sdl2.SDLK_KP_RIGHTPAREN KEY_KP_LEFTBRACE = sdl2.SDLK_KP_LEFTBRACE KEY_KP_RIGHTBRACE = sdl2.SDLK_KP_RIGHTBRACE KEY_KP_TAB = sdl2.SDLK_KP_TAB KEY_KP_BACKSPACE = sdl2.SDLK_KP_BACKSPACE KEY_KP_A = sdl2.SDLK_KP_A KEY_KP_B = sdl2.SDLK_KP_B KEY_KP_C = sdl2.SDLK_KP_C KEY_KP_D = sdl2.SDLK_KP_D KEY_KP_E = sdl2.SDLK_KP_E KEY_KP_F = sdl2.SDLK_KP_F KEY_KP_XOR = sdl2.SDLK_KP_XOR KEY_KP_POWER = sdl2.SDLK_KP_POWER KEY_KP_PERCENT = sdl2.SDLK_KP_PERCENT KEY_KP_LESS = sdl2.SDLK_KP_LESS KEY_KP_GREATER = sdl2.SDLK_KP_GREATER KEY_KP_AMPERSAND = sdl2.SDLK_KP_AMPERSAND KEY_KP_DBLAMPERSAND = sdl2.SDLK_KP_DBLAMPERSAND KEY_KP_VERTICALBAR = sdl2.SDLK_KP_VERTICALBAR KEY_KP_DBLVERTICALBAR = sdl2.SDLK_KP_DBLVERTICALBAR KEY_KP_COLON = sdl2.SDLK_KP_COLON KEY_KP_HASH = sdl2.SDLK_KP_HASH KEY_KP_SPACE = sdl2.SDLK_KP_SPACE KEY_KP_AT = sdl2.SDLK_KP_AT KEY_KP_EXCLAM = sdl2.SDLK_KP_EXCLAM KEY_KP_MEMSTORE = sdl2.SDLK_KP_MEMSTORE KEY_KP_MEMRECALL = sdl2.SDLK_KP_MEMRECALL KEY_KP_MEMCLEAR = sdl2.SDLK_KP_MEMCLEAR KEY_KP_MEMADD = sdl2.SDLK_KP_MEMADD KEY_KP_MEMSUBTRACT = sdl2.SDLK_KP_MEMSUBTRACT KEY_KP_MEMMULTIPLY = sdl2.SDLK_KP_MEMMULTIPLY KEY_KP_MEMDIVIDE = sdl2.SDLK_KP_MEMDIVIDE KEY_KP_PLUSMINUS = sdl2.SDLK_KP_PLUSMINUS KEY_KP_CLEAR = sdl2.SDLK_KP_CLEAR KEY_KP_CLEARENTRY = sdl2.SDLK_KP_CLEARENTRY KEY_KP_BINARY = sdl2.SDLK_KP_BINARY KEY_KP_OCTAL = sdl2.SDLK_KP_OCTAL KEY_KP_DECIMAL = sdl2.SDLK_KP_DECIMAL KEY_KP_HEXADECIMAL = sdl2.SDLK_KP_HEXADECIMAL KEY_LCTRL = sdl2.SDLK_LCTRL KEY_LSHIFT = sdl2.SDLK_LSHIFT KEY_LALT = sdl2.SDLK_LALT KEY_LGUI = sdl2.SDLK_LGUI KEY_RCTRL = sdl2.SDLK_RCTRL KEY_RSHIFT = sdl2.SDLK_RSHIFT KEY_RALT = sdl2.SDLK_RALT KEY_RGUI = sdl2.SDLK_RGUI KEY_MODE = sdl2.SDLK_MODE KEY_AUDIONEXT = sdl2.SDLK_AUDIONEXT KEY_AUDIOPREV = sdl2.SDLK_AUDIOPREV KEY_AUDIOSTOP = sdl2.SDLK_AUDIOSTOP KEY_AUDIOPLAY = sdl2.SDLK_AUDIOPLAY KEY_AUDIOMUTE = sdl2.SDLK_AUDIOMUTE KEY_MEDIASELECT = sdl2.SDLK_MEDIASELECT KEY_WWW = sdl2.SDLK_WWW KEY_MAIL = sdl2.SDLK_MAIL KEY_CALCULATOR = sdl2.SDLK_CALCULATOR KEY_COMPUTER = sdl2.SDLK_COMPUTER KEY_AC_SEARCH = sdl2.SDLK_AC_SEARCH KEY_AC_HOME = sdl2.SDLK_AC_HOME KEY_AC_BACK = sdl2.SDLK_AC_BACK KEY_AC_FORWARD = sdl2.SDLK_AC_FORWARD KEY_AC_STOP = sdl2.SDLK_AC_STOP KEY_AC_REFRESH = sdl2.SDLK_AC_REFRESH KEY_AC_BOOKMARKS = sdl2.SDLK_AC_BOOKMARKS KEY_BRIGHTNESSDOWN = sdl2.SDLK_BRIGHTNESSDOWN KEY_BRIGHTNESSUP = sdl2.SDLK_BRIGHTNESSUP KEY_DISPLAYSWITCH = sdl2.SDLK_DISPLAYSWITCH KEY_KBDILLUMTOGGLE = sdl2.SDLK_KBDILLUMTOGGLE KEY_KBDILLUMDOWN = sdl2.SDLK_KBDILLUMDOWN KEY_KBDILLUMUP = sdl2.SDLK_KBDILLUMUP KEY_EJECT = sdl2.SDLK_EJECT KEY_SLEEP = sdl2.SDLK_SLEEP","title":"main.keys"},{"location":"api/math/","text":"Math API main.math PI = 3.141592653589793238462643383279502884197 EULERNUMBER = 2.718281828459045 main.math.FLOOR(3.4)","title":"Math API"},{"location":"api/math/#math-api","text":"","title":"Math API"},{"location":"api/math/#mainmath","text":"PI = 3.141592653589793238462643383279502884197 EULERNUMBER = 2.718281828459045 main.math.FLOOR(3.4)","title":"main.math"},{"location":"changelog/3_0_0/","text":"3.0.0 Todo/Changelog [x] Engine [x] Window [x] Create window [x] Get data from window [x] Draw shapes [x] Draw images [x] Input [x] Storage system [x] Rendering options [x] Delta-Time [x] Pip package and SetupTools [x] Cython [x] Implement cython for extra speed [x] Dev version without cython [x] Vectors (stores x and y coordinates) [x] Create vector [x] GUI library [x] Text [x] Drawing (Build in draw function) [x] Buttons [x] Sound system [x] Sound player [x] File support [x] And more...","title":"3.0.0 Todo/Changelog"},{"location":"changelog/3_0_0/#300-todochangelog","text":"[x] Engine [x] Window [x] Create window [x] Get data from window [x] Draw shapes [x] Draw images [x] Input [x] Storage system [x] Rendering options [x] Delta-Time [x] Pip package and SetupTools [x] Cython [x] Implement cython for extra speed [x] Dev version without cython [x] Vectors (stores x and y coordinates) [x] Create vector [x] GUI library [x] Text [x] Drawing (Build in draw function) [x] Buttons [x] Sound system [x] Sound player [x] File support [x] And more...","title":"3.0.0 Todo/Changelog"},{"location":"changelog/4_0_0/","text":"4.0.0 Todo/Changelog [ ] UI (Using TKinter) [ ] Menu [ ] Create project [ ] Editor [ ] Code editor build in [ ] Run game [ ] Physics system using PyMunk [ ] Gravity [ ] Rendering [ ] Collision system [ ] Physics shapes","title":"4.0.0 Todo/Changelog"},{"location":"changelog/4_0_0/#400-todochangelog","text":"[ ] UI (Using TKinter) [ ] Menu [ ] Create project [ ] Editor [ ] Code editor build in [ ] Run game [ ] Physics system using PyMunk [ ] Gravity [ ] Rendering [ ] Collision system [ ] Physics shapes","title":"4.0.0 Todo/Changelog"},{"location":"tutorials/","text":"Dive into the World of Fusion Engine Tutorials! Greetings, fellow learners! \ud83c\udf1f If you're here, you're in for a treat. We've crafted these tutorials to make your journey through the intricacies of the Fusion Engine not only informative but also enjoyable. Let's roll up our sleeves and get started on this adventure of learning and fun! Unveiling the Tutorials \ud83d\uddfa\ufe0f Tutorial 1: Setting Everything Up Ahoy, brave learner! Get ready to uncover the magic behind the Fusion Engine. This first tutorial will walk you through the setup process, ensuring you're all geared up to dive into the world of creative possibilities. Start your journey: Tutorial 1 \ud83c\udfa8 Tutorial 2: Basic Rendering Calling all aspiring artists and tech enthusiasts! Tutorial 2 is your canvas to experiment and explore. We'll guide you through the basics of rendering, letting you create and visualize like never before. Start your journey: Tutorial 2","title":"Tutorial"},{"location":"tutorials/#dive-into-the-world-of-fusion-engine-tutorials","text":"Greetings, fellow learners! \ud83c\udf1f If you're here, you're in for a treat. We've crafted these tutorials to make your journey through the intricacies of the Fusion Engine not only informative but also enjoyable. Let's roll up our sleeves and get started on this adventure of learning and fun!","title":"Dive into the World of Fusion Engine Tutorials!"},{"location":"tutorials/#unveiling-the-tutorials","text":"","title":"Unveiling the Tutorials"},{"location":"tutorials/#tutorial-1-setting-everything-up","text":"Ahoy, brave learner! Get ready to uncover the magic behind the Fusion Engine. This first tutorial will walk you through the setup process, ensuring you're all geared up to dive into the world of creative possibilities. Start your journey: Tutorial 1","title":"\ud83d\uddfa\ufe0f Tutorial 1: Setting Everything Up"},{"location":"tutorials/#tutorial-2-basic-rendering","text":"Calling all aspiring artists and tech enthusiasts! Tutorial 2 is your canvas to experiment and explore. We'll guide you through the basics of rendering, letting you create and visualize like never before. Start your journey: Tutorial 2","title":"\ud83c\udfa8 Tutorial 2: Basic Rendering"},{"location":"tutorials/basics/","text":"Basic rendering tutorial Introduction This is a tutorial so you would understand the basics of the engine and how it works. In this tutorial we will learn how to render a window and draw some images on it. If you want to learn more, then go to our docs and select wiki. This tutorial also expect you to have everything setup, if not, head over to tutorial 1: setting everything up The Final Product Should Look like This: Creating a window So if you read tutorial 1 you know we have the main variable running our engine object. So now we create a window with the help of that main object: window = main.window.new_window(\"Tutorial 2\", 600, 600) The first argument that we give our function is our title, second argument is our width and third one is height Pre-loading image We will now pre-load a image so we can draw it later on our window. We do it like this: image = main.image.open_image(window, main.debug.DEBUGIMAGE, 0, 0, 600, 600) Fist argument is our window, second is our image path, third is our x position, fourth is our y position, fifth is our width and sixth is our height. As you maybe see were using main.debug.DEBUGIMAGE, which is a build in image into our engine for testing purposes. We will use it for our tutorial Starting a loop A loop is basicly what lets our window be open the whole time and not be automaticly closed. You also run there functions that need to ran every frame. So we start a loop like this: @main.window.loop def loop(): ... # Code goes here Drawing image So we still need to draw our image after loading it, and you can do that easily inside a loop like this: @main.window.loop def loop(): main.image.draw_image(image) As you see we have a draw_image function in our loop with the image loaded image as argument. Full code Here is our full code that we could through this tutorial: import fusionengine as fusion main = fusion.Main() window = main.window.new_window(\"Example: 1\", 600, 600) image = main.image.open_image(window, main.debug.DEBUGIMAGE, 0, 0, 600, 600) @main.window.loop def loop(): main.image.draw_image(image) Ending This was our basic tutorial to images. There are (or will be) more tutorials, so check them our. Or otherwise you could check our docs for more information. Happy coding!","title":"Basic rendering tutorial"},{"location":"tutorials/basics/#basic-rendering-tutorial","text":"","title":"Basic rendering tutorial"},{"location":"tutorials/basics/#introduction","text":"This is a tutorial so you would understand the basics of the engine and how it works. In this tutorial we will learn how to render a window and draw some images on it. If you want to learn more, then go to our docs and select wiki. This tutorial also expect you to have everything setup, if not, head over to tutorial 1: setting everything up The Final Product Should Look like This:","title":"Introduction"},{"location":"tutorials/basics/#creating-a-window","text":"So if you read tutorial 1 you know we have the main variable running our engine object. So now we create a window with the help of that main object: window = main.window.new_window(\"Tutorial 2\", 600, 600) The first argument that we give our function is our title, second argument is our width and third one is height","title":"Creating a window"},{"location":"tutorials/basics/#pre-loading-image","text":"We will now pre-load a image so we can draw it later on our window. We do it like this: image = main.image.open_image(window, main.debug.DEBUGIMAGE, 0, 0, 600, 600) Fist argument is our window, second is our image path, third is our x position, fourth is our y position, fifth is our width and sixth is our height. As you maybe see were using main.debug.DEBUGIMAGE, which is a build in image into our engine for testing purposes. We will use it for our tutorial","title":"Pre-loading image"},{"location":"tutorials/basics/#starting-a-loop","text":"A loop is basicly what lets our window be open the whole time and not be automaticly closed. You also run there functions that need to ran every frame. So we start a loop like this: @main.window.loop def loop(): ... # Code goes here","title":"Starting a loop"},{"location":"tutorials/basics/#drawing-image","text":"So we still need to draw our image after loading it, and you can do that easily inside a loop like this: @main.window.loop def loop(): main.image.draw_image(image) As you see we have a draw_image function in our loop with the image loaded image as argument.","title":"Drawing image"},{"location":"tutorials/basics/#full-code","text":"Here is our full code that we could through this tutorial: import fusionengine as fusion main = fusion.Main() window = main.window.new_window(\"Example: 1\", 600, 600) image = main.image.open_image(window, main.debug.DEBUGIMAGE, 0, 0, 600, 600) @main.window.loop def loop(): main.image.draw_image(image)","title":"Full code"},{"location":"tutorials/basics/#ending","text":"This was our basic tutorial to images. There are (or will be) more tutorials, so check them our. Or otherwise you could check our docs for more information. Happy coding!","title":"Ending"},{"location":"tutorials/setup/","text":"Setting everything up Introduction Welcome to our fusion-engine tutorials! Here you can learn about our engine and how to use it! This will go easy over everything you need to know to start programming with fusion! So this tutorial is made to setup everything, so you can start programming with fusion-engine! But if you already have everything setup then head over to tutorial 2: basic rendering Installing So firstly we need to install fusion-engine. We have our package hoster at pypi so you can easly install it by running: pip install fusion-engine Importing Now we need to import fusion-engine to our project. We do it like this: import fusionengine as engine Setting up So after inporting we need to do some setup. We need to create a object of our engine so we can use it. We do it like this: main = engine.Main() Ending That was it, our engine is now setup! Now every function works from our main variable, as you might see later.","title":"Setting everything up"},{"location":"tutorials/setup/#setting-everything-up","text":"","title":"Setting everything up"},{"location":"tutorials/setup/#introduction","text":"Welcome to our fusion-engine tutorials! Here you can learn about our engine and how to use it! This will go easy over everything you need to know to start programming with fusion! So this tutorial is made to setup everything, so you can start programming with fusion-engine! But if you already have everything setup then head over to tutorial 2: basic rendering","title":"Introduction"},{"location":"tutorials/setup/#installing","text":"So firstly we need to install fusion-engine. We have our package hoster at pypi so you can easly install it by running: pip install fusion-engine","title":"Installing"},{"location":"tutorials/setup/#importing","text":"Now we need to import fusion-engine to our project. We do it like this: import fusionengine as engine","title":"Importing"},{"location":"tutorials/setup/#setting-up","text":"So after inporting we need to do some setup. We need to create a object of our engine so we can use it. We do it like this: main = engine.Main()","title":"Setting up"},{"location":"tutorials/setup/#ending","text":"That was it, our engine is now setup! Now every function works from our main variable, as you might see later.","title":"Ending"},{"location":"wiki/","text":"Wiki Welcome to our wiki! Here you will find all function with their small explanaion and how to use them. We have seperated the wiki in some parts, like main wiki, color wiki and more. You choose one you need. Can't find something? Then try looking in the main wiki So have luck! Table of contents Main Wiki External tools Wiki Color Wiki Font Wiki Key Wiki Math Wiki","title":"Wiki"},{"location":"wiki/#wiki","text":"Welcome to our wiki! Here you will find all function with their small explanaion and how to use them. We have seperated the wiki in some parts, like main wiki, color wiki and more. You choose one you need. Can't find something? Then try looking in the main wiki So have luck!","title":"Wiki"},{"location":"wiki/#table-of-contents","text":"Main Wiki External tools Wiki Color Wiki Font Wiki Key Wiki Math Wiki","title":"Table of contents"},{"location":"wiki/color/","text":"Using colors Our engine has some build in predefined colors so it's a bit easier for you with colors, to acess the colors you run: main.color.WHITE All colors The color name is always in capital letters. Here are all predefined colors: BLUE = (0, 0, 255, 255) BLACK = (0, 0, 0, 255) WHITE = (255, 255, 255, 255) GREEN = (255, 255, 255, 255) RED = (255, 0, 0, 255) YELLOW = (255, 255, 0, 255) PURPLE = (255, 0, 255, 255) CYAN = (0, 255, 255, 255) ORANGE = (255, 165, 0, 255) GRAY = (128, 128, 128, 255) BROWN = (165, 42, 42, 255) PINK = (255, 192, 203, 255) MAGENTA = (255, 0, 255, 255) SILVER = (192, 192, 192, 255) GOLD = (255, 215, 0, 255) BRONZE = (205, 127, 50, 255) LIME = (0, 255, 0, 255) OLIVE = (128, 128, 0, 255) TEAL = (0, 128, 128, 255) NAVY = (0, 0, 128, 255) MAROON = (128, 0, 0, 255) INDIGO = (75, 0, 130, 255) TURQUOISE = (64, 224, 208, 255) VIOLET = (238, 130, 238, 255) AQUA = (0, 255, 255, 255) TAN = (210, 180, 140, 255) BEIGE = (245, 245, 220, 255) IVORY = (255, 255, 240, 255) LAVENDER = (230, 230, 250, 255) MINT = (189, 252, 201, 255) SALMON = (250, 128, 114, 255) SCARLET = (255, 36, 0, 255) TEAL = (0, 128, 128, 255) TOMATO = (255, 99, 71, 255) CRIMSON = (220, 20, 60, 255) AZURE = (0, 128, 255, 255) Custom color If you want your own color, you just give your function a tuple argument with RGBA colors, here is an example: main.draw.drawRect(window, 100, 100, 400, 400, (255, 255, 255, 0)) Hex to rgba If you have a hex color and want to convert it to rgba you can use this function: main.colortools.hex_to_rgba(hex)","title":"Color"},{"location":"wiki/color/#using-colors","text":"Our engine has some build in predefined colors so it's a bit easier for you with colors, to acess the colors you run: main.color.WHITE","title":"Using colors"},{"location":"wiki/color/#all-colors","text":"The color name is always in capital letters. Here are all predefined colors: BLUE = (0, 0, 255, 255) BLACK = (0, 0, 0, 255) WHITE = (255, 255, 255, 255) GREEN = (255, 255, 255, 255) RED = (255, 0, 0, 255) YELLOW = (255, 255, 0, 255) PURPLE = (255, 0, 255, 255) CYAN = (0, 255, 255, 255) ORANGE = (255, 165, 0, 255) GRAY = (128, 128, 128, 255) BROWN = (165, 42, 42, 255) PINK = (255, 192, 203, 255) MAGENTA = (255, 0, 255, 255) SILVER = (192, 192, 192, 255) GOLD = (255, 215, 0, 255) BRONZE = (205, 127, 50, 255) LIME = (0, 255, 0, 255) OLIVE = (128, 128, 0, 255) TEAL = (0, 128, 128, 255) NAVY = (0, 0, 128, 255) MAROON = (128, 0, 0, 255) INDIGO = (75, 0, 130, 255) TURQUOISE = (64, 224, 208, 255) VIOLET = (238, 130, 238, 255) AQUA = (0, 255, 255, 255) TAN = (210, 180, 140, 255) BEIGE = (245, 245, 220, 255) IVORY = (255, 255, 240, 255) LAVENDER = (230, 230, 250, 255) MINT = (189, 252, 201, 255) SALMON = (250, 128, 114, 255) SCARLET = (255, 36, 0, 255) TEAL = (0, 128, 128, 255) TOMATO = (255, 99, 71, 255) CRIMSON = (220, 20, 60, 255) AZURE = (0, 128, 255, 255)","title":"All colors"},{"location":"wiki/color/#custom-color","text":"If you want your own color, you just give your function a tuple argument with RGBA colors, here is an example: main.draw.drawRect(window, 100, 100, 400, 400, (255, 255, 255, 0))","title":"Custom color"},{"location":"wiki/color/#hex-to-rgba","text":"If you have a hex color and want to convert it to rgba you can use this function: main.colortools.hex_to_rgba(hex)","title":"Hex to rgba"},{"location":"wiki/external/","text":"External tools Using pygame If you cant find some function you need in this engine, the you could use pygame as the engine is build on pygame. You dont need to import pygame, as that can make so issues, you just use: fusion.pg Make sure your not using main (the initialized class) but the module itself. Using Codon Compiler So you heard of codon , a python compiler with can compile your python code to machine code, which makes your code a lot faster But how do you use it? Well, its easy! You just install it and then modify these things in your code: Imports: from python import fusionengine as fusion Loop: You need to modify our loop to support codon, so you need to change it to this: while main.window.running(window): ... # Your own loop thing You may reconise this type of while loop from the main wiki as your second option.","title":"External tools"},{"location":"wiki/external/#external-tools","text":"","title":"External tools"},{"location":"wiki/external/#using-pygame","text":"If you cant find some function you need in this engine, the you could use pygame as the engine is build on pygame. You dont need to import pygame, as that can make so issues, you just use: fusion.pg Make sure your not using main (the initialized class) but the module itself.","title":"Using pygame"},{"location":"wiki/external/#using-codon-compiler","text":"So you heard of codon , a python compiler with can compile your python code to machine code, which makes your code a lot faster But how do you use it? Well, its easy! You just install it and then modify these things in your code: Imports: from python import fusionengine as fusion Loop: You need to modify our loop to support codon, so you need to change it to this: while main.window.running(window): ... # Your own loop thing You may reconise this type of while loop from the main wiki as your second option.","title":"Using Codon Compiler"},{"location":"wiki/fonts/","text":"Fonts Our engine has some build in fonts, the following fonts are available: Nunito Sans Light: main.fonts.NUNITO_LIGHT Saira Condensed Extrabold: main.fonts.SAIRACONDENSED_EXTRABOLD There will be more fonts available in the future.","title":"Fonts"},{"location":"wiki/fonts/#fonts","text":"Our engine has some build in fonts, the following fonts are available: Nunito Sans Light: main.fonts.NUNITO_LIGHT Saira Condensed Extrabold: main.fonts.SAIRACONDENSED_EXTRABOLD There will be more fonts available in the future.","title":"Fonts"},{"location":"wiki/keys/","text":"Keys We use PySDL2 for this, here are our key bindings to the sdl2 keys: KEY_UNKNOWN = sdl2.SDLK_UNKNOWN KEY_RETURN = sdl2.SDLK_RETURN KEY_ESCAPE = sdl2.SDLK_ESCAPE KEY_BACKSPACE = sdl2.SDLK_BACKSPACE KEY_TAB = sdl2.SDLK_TAB KEY_SPACE = sdl2.SDLK_SPACE KEY_EXCLAIM = sdl2.SDLK_EXCLAIM KEY_QUOTEDBL = sdl2.SDLK_QUOTEDBL KEY_HASH = sdl2.SDLK_HASH KEY_PERCENT = sdl2.SDLK_PERCENT KEY_DOLLAR = sdl2.SDLK_DOLLAR KEY_AMPERSAND = sdl2.SDLK_AMPERSAND KEY_QUOTE = sdl2.SDLK_QUOTE KEY_LEFTPAREN = sdl2.SDLK_LEFTPAREN KEY_RIGHTPAREN = sdl2.SDLK_RIGHTPAREN KEY_ASTERISK = sdl2.SDLK_ASTERISK KEY_PLUS = sdl2.SDLK_PLUS KEY_COMMA = sdl2.SDLK_COMMA KEY_MINUS = sdl2.SDLK_MINUS KEY_PERIOD = sdl2.SDLK_PERIOD KEY_SLASH = sdl2.SDLK_SLASH KEY_0 = sdl2.SDLK_0 KEY_1 = sdl2.SDLK_1 KEY_2 = sdl2.SDLK_2 KEY_3 = sdl2.SDLK_3 KEY_4 = sdl2.SDLK_4 KEY_5 = sdl2.SDLK_5 KEY_6 = sdl2.SDLK_6 KEY_7 = sdl2.SDLK_7 KEY_8 = sdl2.SDLK_8 KEY_9 = sdl2.SDLK_9 KEY_COLON = sdl2.SDLK_COLON KEY_SEMICOLON = sdl2.SDLK_SEMICOLON KEY_LESS = sdl2.SDLK_LESS KEY_EQUALS = sdl2.SDLK_EQUALS KEY_GREATER = sdl2.SDLK_GREATER KEY_QUESTION = sdl2.SDLK_QUESTION KEY_AT = sdl2.SDLK_AT KEY_LEFTBRACKET = sdl2.SDLK_LEFTBRACKET KEY_BACKSLASH = sdl2.SDLK_BACKSLASH KEY_RIGHTBRACKET = sdl2.SDLK_RIGHTBRACKET KEY_CARET = sdl2.SDLK_CARET KEY_UNDERSCORE = sdl2.SDLK_UNDERSCORE KEY_BACKQUOTE = sdl2.SDLK_BACKQUOTE KEY_a = sdl2.SDLK_a KEY_b = sdl2.SDLK_b KEY_c = sdl2.SDLK_c KEY_d = sdl2.SDLK_d KEY_e = sdl2.SDLK_e KEY_f = sdl2.SDLK_f KEY_g = sdl2.SDLK_g KEY_h = sdl2.SDLK_h KEY_i = sdl2.SDLK_i KEY_j = sdl2.SDLK_j KEY_k = sdl2.SDLK_k KEY_l = sdl2.SDLK_l KEY_m = sdl2.SDLK_m KEY_n = sdl2.SDLK_n KEY_o = sdl2.SDLK_o KEY_p = sdl2.SDLK_p KEY_q = sdl2.SDLK_q KEY_r = sdl2.SDLK_r KEY_s = sdl2.SDLK_s KEY_t = sdl2.SDLK_t KEY_u = sdl2.SDLK_u KEY_v = sdl2.SDLK_v KEY_w = sdl2.SDLK_w KEY_x = sdl2.SDLK_x KEY_y = sdl2.SDLK_y KEY_z = sdl2.SDLK_z KEY_CAPSLOCK = sdl2.SDLK_CAPSLOCK KEY_F1 = sdl2.SDLK_F1 KEY_F2 = sdl2.SDLK_F2 KEY_F3 = sdl2.SDLK_F3 KEY_F4 = sdl2.SDLK_F4 KEY_F5 = sdl2.SDLK_F5 KEY_F6 = sdl2.SDLK_F6 KEY_F7 = sdl2.SDLK_F7 KEY_F8 = sdl2.SDLK_F8 KEY_F9 = sdl2.SDLK_F9 KEY_F10 = sdl2.SDLK_F10 KEY_F11 = sdl2.SDLK_F11 KEY_F12 = sdl2.SDLK_F12 KEY_PRINTSCREEN = sdl2.SDLK_PRINTSCREEN KEY_SCROLLLOCK = sdl2.SDLK_SCROLLLOCK KEY_PAUSE = sdl2.SDLK_PAUSE KEY_INSERT = sdl2.SDLK_INSERT KEY_HOME = sdl2.SDLK_HOME KEY_PAGEUP = sdl2.SDLK_PAGEUP KEY_DELETE = sdl2.SDLK_DELETE KEY_END = sdl2.SDLK_END KEY_PAGEDOWN = sdl2.SDLK_PAGEDOWN KEY_RIGHT = sdl2.SDLK_RIGHT KEY_LEFT = sdl2.SDLK_LEFT KEY_DOWN = sdl2.SDLK_DOWN KEY_UP = sdl2.SDLK_UP KEY_NUMLOCKCLEAR = sdl2.SDLK_NUMLOCKCLEAR KEY_KP_DIVIDE = sdl2.SDLK_KP_DIVIDE KEY_KP_MULTIPLY = sdl2.SDLK_KP_MULTIPLY KEY_KP_MINUS = sdl2.SDLK_KP_MINUS KEY_KP_PLUS = sdl2.SDLK_KP_PLUS KEY_KP_ENTER = sdl2.SDLK_KP_ENTER KEY_KP_1 = sdl2.SDLK_KP_1 KEY_KP_2 = sdl2.SDLK_KP_2 KEY_KP_3 = sdl2.SDLK_KP_3 KEY_KP_4 = sdl2.SDLK_KP_4 KEY_KP_5 = sdl2.SDLK_KP_5 KEY_KP_6 = sdl2.SDLK_KP_6 KEY_KP_7 = sdl2.SDLK_KP_7 KEY_KP_8 = sdl2.SDLK_KP_8 KEY_KP_9 = sdl2.SDLK_KP_9 KEY_KP_0 = sdl2.SDLK_KP_0 KEY_KP_PERIOD = sdl2.SDLK_KP_PERIOD KEY_APPLICATION = sdl2.SDLK_APPLICATION KEY_POWER = sdl2.SDLK_POWER KEY_KP_EQUALS = sdl2.SDLK_KP_EQUALS KEY_F13 = sdl2.SDLK_F13 KEY_F14 = sdl2.SDLK_F14 KEY_F15 = sdl2.SDLK_F15 KEY_F16 = sdl2.SDLK_F16 KEY_F17 = sdl2.SDLK_F17 KEY_F18 = sdl2.SDLK_F18 KEY_F19 = sdl2.SDLK_F19 KEY_F20 = sdl2.SDLK_F20 KEY_F21 = sdl2.SDLK_F21 KEY_F22 = sdl2.SDLK_F22 KEY_F23 = sdl2.SDLK_F23 KEY_F24 = sdl2.SDLK_F24 KEY_EXECUTE = sdl2.SDLK_EXECUTE KEY_HELP = sdl2.SDLK_HELP KEY_MENU = sdl2.SDLK_MENU KEY_SELECT = sdl2.SDLK_SELECT KEY_STOP = sdl2.SDLK_STOP KEY_AGAIN = sdl2.SDLK_AGAIN KEY_UNDO = sdl2.SDLK_UNDO KEY_CUT = sdl2.SDLK_CUT KEY_COPY = sdl2.SDLK_COPY KEY_PASTE = sdl2.SDLK_PASTE KEY_FIND = sdl2.SDLK_FIND KEY_MUTE = sdl2.SDLK_MUTE KEY_VOLUMEUP = sdl2.SDLK_VOLUMEUP KEY_VOLUMEDOWN = sdl2.SDLK_VOLUMEDOWN KEY_KP_COMMA = sdl2.SDLK_KP_COMMA KEY_KP_EQUALSAS400 = sdl2.SDLK_KP_EQUALSAS400 KEY_ALTERASE = sdl2.SDLK_ALTERASE KEY_SYSREQ = sdl2.SDLK_SYSREQ KEY_CANCEL = sdl2.SDLK_CANCEL KEY_CLEAR = sdl2.SDLK_CLEAR KEY_PRIOR = sdl2.SDLK_PRIOR KEY_RETURN2 = sdl2.SDLK_RETURN2 KEY_SEPARATOR = sdl2.SDLK_SEPARATOR KEY_OUT = sdl2.SDLK_OUT KEY_OPER = sdl2.SDLK_OPER KEY_CLEARAGAIN = sdl2.SDLK_CLEARAGAIN KEY_CRSEL = sdl2.SDLK_CRSEL KEY_EXSEL = sdl2.SDLK_EXSEL KEY_KP_00 = sdl2.SDLK_KP_00 KEY_KP_000 = sdl2.SDLK_KP_000 KEY_THOUSANDSSEPARATOR = sdl2.SDLK_THOUSANDSSEPARATOR KEY_DECIMALSEPARATOR = sdl2.SDLK_DECIMALSEPARATOR KEY_CURRENCYUNIT = sdl2.SDLK_CURRENCYUNIT KEY_CURRENCYSUBUNIT = sdl2.SDLK_CURRENCYSUBUNIT KEY_KP_LEFTPAREN = sdl2.SDLK_KP_LEFTPAREN KEY_KP_RIGHTPAREN = sdl2.SDLK_KP_RIGHTPAREN KEY_KP_LEFTBRACE = sdl2.SDLK_KP_LEFTBRACE KEY_KP_RIGHTBRACE = sdl2.SDLK_KP_RIGHTBRACE KEY_KP_TAB = sdl2.SDLK_KP_TAB KEY_KP_BACKSPACE = sdl2.SDLK_KP_BACKSPACE KEY_KP_A = sdl2.SDLK_KP_A KEY_KP_B = sdl2.SDLK_KP_B KEY_KP_C = sdl2.SDLK_KP_C KEY_KP_D = sdl2.SDLK_KP_D KEY_KP_E = sdl2.SDLK_KP_E KEY_KP_F = sdl2.SDLK_KP_F KEY_KP_XOR = sdl2.SDLK_KP_XOR KEY_KP_POWER = sdl2.SDLK_KP_POWER KEY_KP_PERCENT = sdl2.SDLK_KP_PERCENT KEY_KP_LESS = sdl2.SDLK_KP_LESS KEY_KP_GREATER = sdl2.SDLK_KP_GREATER KEY_KP_AMPERSAND = sdl2.SDLK_KP_AMPERSAND KEY_KP_DBLAMPERSAND = sdl2.SDLK_KP_DBLAMPERSAND KEY_KP_VERTICALBAR = sdl2.SDLK_KP_VERTICALBAR KEY_KP_DBLVERTICALBAR = sdl2.SDLK_KP_DBLVERTICALBAR KEY_KP_COLON = sdl2.SDLK_KP_COLON KEY_KP_HASH = sdl2.SDLK_KP_HASH KEY_KP_SPACE = sdl2.SDLK_KP_SPACE KEY_KP_AT = sdl2.SDLK_KP_AT KEY_KP_EXCLAM = sdl2.SDLK_KP_EXCLAM KEY_KP_MEMSTORE = sdl2.SDLK_KP_MEMSTORE KEY_KP_MEMRECALL = sdl2.SDLK_KP_MEMRECALL KEY_KP_MEMCLEAR = sdl2.SDLK_KP_MEMCLEAR KEY_KP_MEMADD = sdl2.SDLK_KP_MEMADD KEY_KP_MEMSUBTRACT = sdl2.SDLK_KP_MEMSUBTRACT KEY_KP_MEMMULTIPLY = sdl2.SDLK_KP_MEMMULTIPLY KEY_KP_MEMDIVIDE = sdl2.SDLK_KP_MEMDIVIDE KEY_KP_PLUSMINUS = sdl2.SDLK_KP_PLUSMINUS KEY_KP_CLEAR = sdl2.SDLK_KP_CLEAR KEY_KP_CLEARENTRY = sdl2.SDLK_KP_CLEARENTRY KEY_KP_BINARY = sdl2.SDLK_KP_BINARY KEY_KP_OCTAL = sdl2.SDLK_KP_OCTAL KEY_KP_DECIMAL = sdl2.SDLK_KP_DECIMAL KEY_KP_HEXADECIMAL = sdl2.SDLK_KP_HEXADECIMAL KEY_LCTRL = sdl2.SDLK_LCTRL KEY_LSHIFT = sdl2.SDLK_LSHIFT KEY_LALT = sdl2.SDLK_LALT KEY_LGUI = sdl2.SDLK_LGUI KEY_RCTRL = sdl2.SDLK_RCTRL KEY_RSHIFT = sdl2.SDLK_RSHIFT KEY_RALT = sdl2.SDLK_RALT KEY_RGUI = sdl2.SDLK_RGUI KEY_MODE = sdl2.SDLK_MODE KEY_AUDIONEXT = sdl2.SDLK_AUDIONEXT KEY_AUDIOPREV = sdl2.SDLK_AUDIOPREV KEY_AUDIOSTOP = sdl2.SDLK_AUDIOSTOP KEY_AUDIOPLAY = sdl2.SDLK_AUDIOPLAY KEY_AUDIOMUTE = sdl2.SDLK_AUDIOMUTE KEY_MEDIASELECT = sdl2.SDLK_MEDIASELECT KEY_WWW = sdl2.SDLK_WWW KEY_MAIL = sdl2.SDLK_MAIL KEY_CALCULATOR = sdl2.SDLK_CALCULATOR KEY_COMPUTER = sdl2.SDLK_COMPUTER KEY_AC_SEARCH = sdl2.SDLK_AC_SEARCH KEY_AC_HOME = sdl2.SDLK_AC_HOME KEY_AC_BACK = sdl2.SDLK_AC_BACK KEY_AC_FORWARD = sdl2.SDLK_AC_FORWARD KEY_AC_STOP = sdl2.SDLK_AC_STOP KEY_AC_REFRESH = sdl2.SDLK_AC_REFRESH KEY_AC_BOOKMARKS = sdl2.SDLK_AC_BOOKMARKS KEY_BRIGHTNESSDOWN = sdl2.SDLK_BRIGHTNESSDOWN KEY_BRIGHTNESSUP = sdl2.SDLK_BRIGHTNESSUP KEY_DISPLAYSWITCH = sdl2.SDLK_DISPLAYSWITCH KEY_KBDILLUMTOGGLE = sdl2.SDLK_KBDILLUMTOGGLE KEY_KBDILLUMDOWN = sdl2.SDLK_KBDILLUMDOWN KEY_KBDILLUMUP = sdl2.SDLK_KBDILLUMUP KEY_EJECT = sdl2.SDLK_EJECT KEY_SLEEP = sdl2.SDLK_SLEEP","title":"Keys"},{"location":"wiki/keys/#keys","text":"We use PySDL2 for this, here are our key bindings to the sdl2 keys: KEY_UNKNOWN = sdl2.SDLK_UNKNOWN KEY_RETURN = sdl2.SDLK_RETURN KEY_ESCAPE = sdl2.SDLK_ESCAPE KEY_BACKSPACE = sdl2.SDLK_BACKSPACE KEY_TAB = sdl2.SDLK_TAB KEY_SPACE = sdl2.SDLK_SPACE KEY_EXCLAIM = sdl2.SDLK_EXCLAIM KEY_QUOTEDBL = sdl2.SDLK_QUOTEDBL KEY_HASH = sdl2.SDLK_HASH KEY_PERCENT = sdl2.SDLK_PERCENT KEY_DOLLAR = sdl2.SDLK_DOLLAR KEY_AMPERSAND = sdl2.SDLK_AMPERSAND KEY_QUOTE = sdl2.SDLK_QUOTE KEY_LEFTPAREN = sdl2.SDLK_LEFTPAREN KEY_RIGHTPAREN = sdl2.SDLK_RIGHTPAREN KEY_ASTERISK = sdl2.SDLK_ASTERISK KEY_PLUS = sdl2.SDLK_PLUS KEY_COMMA = sdl2.SDLK_COMMA KEY_MINUS = sdl2.SDLK_MINUS KEY_PERIOD = sdl2.SDLK_PERIOD KEY_SLASH = sdl2.SDLK_SLASH KEY_0 = sdl2.SDLK_0 KEY_1 = sdl2.SDLK_1 KEY_2 = sdl2.SDLK_2 KEY_3 = sdl2.SDLK_3 KEY_4 = sdl2.SDLK_4 KEY_5 = sdl2.SDLK_5 KEY_6 = sdl2.SDLK_6 KEY_7 = sdl2.SDLK_7 KEY_8 = sdl2.SDLK_8 KEY_9 = sdl2.SDLK_9 KEY_COLON = sdl2.SDLK_COLON KEY_SEMICOLON = sdl2.SDLK_SEMICOLON KEY_LESS = sdl2.SDLK_LESS KEY_EQUALS = sdl2.SDLK_EQUALS KEY_GREATER = sdl2.SDLK_GREATER KEY_QUESTION = sdl2.SDLK_QUESTION KEY_AT = sdl2.SDLK_AT KEY_LEFTBRACKET = sdl2.SDLK_LEFTBRACKET KEY_BACKSLASH = sdl2.SDLK_BACKSLASH KEY_RIGHTBRACKET = sdl2.SDLK_RIGHTBRACKET KEY_CARET = sdl2.SDLK_CARET KEY_UNDERSCORE = sdl2.SDLK_UNDERSCORE KEY_BACKQUOTE = sdl2.SDLK_BACKQUOTE KEY_a = sdl2.SDLK_a KEY_b = sdl2.SDLK_b KEY_c = sdl2.SDLK_c KEY_d = sdl2.SDLK_d KEY_e = sdl2.SDLK_e KEY_f = sdl2.SDLK_f KEY_g = sdl2.SDLK_g KEY_h = sdl2.SDLK_h KEY_i = sdl2.SDLK_i KEY_j = sdl2.SDLK_j KEY_k = sdl2.SDLK_k KEY_l = sdl2.SDLK_l KEY_m = sdl2.SDLK_m KEY_n = sdl2.SDLK_n KEY_o = sdl2.SDLK_o KEY_p = sdl2.SDLK_p KEY_q = sdl2.SDLK_q KEY_r = sdl2.SDLK_r KEY_s = sdl2.SDLK_s KEY_t = sdl2.SDLK_t KEY_u = sdl2.SDLK_u KEY_v = sdl2.SDLK_v KEY_w = sdl2.SDLK_w KEY_x = sdl2.SDLK_x KEY_y = sdl2.SDLK_y KEY_z = sdl2.SDLK_z KEY_CAPSLOCK = sdl2.SDLK_CAPSLOCK KEY_F1 = sdl2.SDLK_F1 KEY_F2 = sdl2.SDLK_F2 KEY_F3 = sdl2.SDLK_F3 KEY_F4 = sdl2.SDLK_F4 KEY_F5 = sdl2.SDLK_F5 KEY_F6 = sdl2.SDLK_F6 KEY_F7 = sdl2.SDLK_F7 KEY_F8 = sdl2.SDLK_F8 KEY_F9 = sdl2.SDLK_F9 KEY_F10 = sdl2.SDLK_F10 KEY_F11 = sdl2.SDLK_F11 KEY_F12 = sdl2.SDLK_F12 KEY_PRINTSCREEN = sdl2.SDLK_PRINTSCREEN KEY_SCROLLLOCK = sdl2.SDLK_SCROLLLOCK KEY_PAUSE = sdl2.SDLK_PAUSE KEY_INSERT = sdl2.SDLK_INSERT KEY_HOME = sdl2.SDLK_HOME KEY_PAGEUP = sdl2.SDLK_PAGEUP KEY_DELETE = sdl2.SDLK_DELETE KEY_END = sdl2.SDLK_END KEY_PAGEDOWN = sdl2.SDLK_PAGEDOWN KEY_RIGHT = sdl2.SDLK_RIGHT KEY_LEFT = sdl2.SDLK_LEFT KEY_DOWN = sdl2.SDLK_DOWN KEY_UP = sdl2.SDLK_UP KEY_NUMLOCKCLEAR = sdl2.SDLK_NUMLOCKCLEAR KEY_KP_DIVIDE = sdl2.SDLK_KP_DIVIDE KEY_KP_MULTIPLY = sdl2.SDLK_KP_MULTIPLY KEY_KP_MINUS = sdl2.SDLK_KP_MINUS KEY_KP_PLUS = sdl2.SDLK_KP_PLUS KEY_KP_ENTER = sdl2.SDLK_KP_ENTER KEY_KP_1 = sdl2.SDLK_KP_1 KEY_KP_2 = sdl2.SDLK_KP_2 KEY_KP_3 = sdl2.SDLK_KP_3 KEY_KP_4 = sdl2.SDLK_KP_4 KEY_KP_5 = sdl2.SDLK_KP_5 KEY_KP_6 = sdl2.SDLK_KP_6 KEY_KP_7 = sdl2.SDLK_KP_7 KEY_KP_8 = sdl2.SDLK_KP_8 KEY_KP_9 = sdl2.SDLK_KP_9 KEY_KP_0 = sdl2.SDLK_KP_0 KEY_KP_PERIOD = sdl2.SDLK_KP_PERIOD KEY_APPLICATION = sdl2.SDLK_APPLICATION KEY_POWER = sdl2.SDLK_POWER KEY_KP_EQUALS = sdl2.SDLK_KP_EQUALS KEY_F13 = sdl2.SDLK_F13 KEY_F14 = sdl2.SDLK_F14 KEY_F15 = sdl2.SDLK_F15 KEY_F16 = sdl2.SDLK_F16 KEY_F17 = sdl2.SDLK_F17 KEY_F18 = sdl2.SDLK_F18 KEY_F19 = sdl2.SDLK_F19 KEY_F20 = sdl2.SDLK_F20 KEY_F21 = sdl2.SDLK_F21 KEY_F22 = sdl2.SDLK_F22 KEY_F23 = sdl2.SDLK_F23 KEY_F24 = sdl2.SDLK_F24 KEY_EXECUTE = sdl2.SDLK_EXECUTE KEY_HELP = sdl2.SDLK_HELP KEY_MENU = sdl2.SDLK_MENU KEY_SELECT = sdl2.SDLK_SELECT KEY_STOP = sdl2.SDLK_STOP KEY_AGAIN = sdl2.SDLK_AGAIN KEY_UNDO = sdl2.SDLK_UNDO KEY_CUT = sdl2.SDLK_CUT KEY_COPY = sdl2.SDLK_COPY KEY_PASTE = sdl2.SDLK_PASTE KEY_FIND = sdl2.SDLK_FIND KEY_MUTE = sdl2.SDLK_MUTE KEY_VOLUMEUP = sdl2.SDLK_VOLUMEUP KEY_VOLUMEDOWN = sdl2.SDLK_VOLUMEDOWN KEY_KP_COMMA = sdl2.SDLK_KP_COMMA KEY_KP_EQUALSAS400 = sdl2.SDLK_KP_EQUALSAS400 KEY_ALTERASE = sdl2.SDLK_ALTERASE KEY_SYSREQ = sdl2.SDLK_SYSREQ KEY_CANCEL = sdl2.SDLK_CANCEL KEY_CLEAR = sdl2.SDLK_CLEAR KEY_PRIOR = sdl2.SDLK_PRIOR KEY_RETURN2 = sdl2.SDLK_RETURN2 KEY_SEPARATOR = sdl2.SDLK_SEPARATOR KEY_OUT = sdl2.SDLK_OUT KEY_OPER = sdl2.SDLK_OPER KEY_CLEARAGAIN = sdl2.SDLK_CLEARAGAIN KEY_CRSEL = sdl2.SDLK_CRSEL KEY_EXSEL = sdl2.SDLK_EXSEL KEY_KP_00 = sdl2.SDLK_KP_00 KEY_KP_000 = sdl2.SDLK_KP_000 KEY_THOUSANDSSEPARATOR = sdl2.SDLK_THOUSANDSSEPARATOR KEY_DECIMALSEPARATOR = sdl2.SDLK_DECIMALSEPARATOR KEY_CURRENCYUNIT = sdl2.SDLK_CURRENCYUNIT KEY_CURRENCYSUBUNIT = sdl2.SDLK_CURRENCYSUBUNIT KEY_KP_LEFTPAREN = sdl2.SDLK_KP_LEFTPAREN KEY_KP_RIGHTPAREN = sdl2.SDLK_KP_RIGHTPAREN KEY_KP_LEFTBRACE = sdl2.SDLK_KP_LEFTBRACE KEY_KP_RIGHTBRACE = sdl2.SDLK_KP_RIGHTBRACE KEY_KP_TAB = sdl2.SDLK_KP_TAB KEY_KP_BACKSPACE = sdl2.SDLK_KP_BACKSPACE KEY_KP_A = sdl2.SDLK_KP_A KEY_KP_B = sdl2.SDLK_KP_B KEY_KP_C = sdl2.SDLK_KP_C KEY_KP_D = sdl2.SDLK_KP_D KEY_KP_E = sdl2.SDLK_KP_E KEY_KP_F = sdl2.SDLK_KP_F KEY_KP_XOR = sdl2.SDLK_KP_XOR KEY_KP_POWER = sdl2.SDLK_KP_POWER KEY_KP_PERCENT = sdl2.SDLK_KP_PERCENT KEY_KP_LESS = sdl2.SDLK_KP_LESS KEY_KP_GREATER = sdl2.SDLK_KP_GREATER KEY_KP_AMPERSAND = sdl2.SDLK_KP_AMPERSAND KEY_KP_DBLAMPERSAND = sdl2.SDLK_KP_DBLAMPERSAND KEY_KP_VERTICALBAR = sdl2.SDLK_KP_VERTICALBAR KEY_KP_DBLVERTICALBAR = sdl2.SDLK_KP_DBLVERTICALBAR KEY_KP_COLON = sdl2.SDLK_KP_COLON KEY_KP_HASH = sdl2.SDLK_KP_HASH KEY_KP_SPACE = sdl2.SDLK_KP_SPACE KEY_KP_AT = sdl2.SDLK_KP_AT KEY_KP_EXCLAM = sdl2.SDLK_KP_EXCLAM KEY_KP_MEMSTORE = sdl2.SDLK_KP_MEMSTORE KEY_KP_MEMRECALL = sdl2.SDLK_KP_MEMRECALL KEY_KP_MEMCLEAR = sdl2.SDLK_KP_MEMCLEAR KEY_KP_MEMADD = sdl2.SDLK_KP_MEMADD KEY_KP_MEMSUBTRACT = sdl2.SDLK_KP_MEMSUBTRACT KEY_KP_MEMMULTIPLY = sdl2.SDLK_KP_MEMMULTIPLY KEY_KP_MEMDIVIDE = sdl2.SDLK_KP_MEMDIVIDE KEY_KP_PLUSMINUS = sdl2.SDLK_KP_PLUSMINUS KEY_KP_CLEAR = sdl2.SDLK_KP_CLEAR KEY_KP_CLEARENTRY = sdl2.SDLK_KP_CLEARENTRY KEY_KP_BINARY = sdl2.SDLK_KP_BINARY KEY_KP_OCTAL = sdl2.SDLK_KP_OCTAL KEY_KP_DECIMAL = sdl2.SDLK_KP_DECIMAL KEY_KP_HEXADECIMAL = sdl2.SDLK_KP_HEXADECIMAL KEY_LCTRL = sdl2.SDLK_LCTRL KEY_LSHIFT = sdl2.SDLK_LSHIFT KEY_LALT = sdl2.SDLK_LALT KEY_LGUI = sdl2.SDLK_LGUI KEY_RCTRL = sdl2.SDLK_RCTRL KEY_RSHIFT = sdl2.SDLK_RSHIFT KEY_RALT = sdl2.SDLK_RALT KEY_RGUI = sdl2.SDLK_RGUI KEY_MODE = sdl2.SDLK_MODE KEY_AUDIONEXT = sdl2.SDLK_AUDIONEXT KEY_AUDIOPREV = sdl2.SDLK_AUDIOPREV KEY_AUDIOSTOP = sdl2.SDLK_AUDIOSTOP KEY_AUDIOPLAY = sdl2.SDLK_AUDIOPLAY KEY_AUDIOMUTE = sdl2.SDLK_AUDIOMUTE KEY_MEDIASELECT = sdl2.SDLK_MEDIASELECT KEY_WWW = sdl2.SDLK_WWW KEY_MAIL = sdl2.SDLK_MAIL KEY_CALCULATOR = sdl2.SDLK_CALCULATOR KEY_COMPUTER = sdl2.SDLK_COMPUTER KEY_AC_SEARCH = sdl2.SDLK_AC_SEARCH KEY_AC_HOME = sdl2.SDLK_AC_HOME KEY_AC_BACK = sdl2.SDLK_AC_BACK KEY_AC_FORWARD = sdl2.SDLK_AC_FORWARD KEY_AC_STOP = sdl2.SDLK_AC_STOP KEY_AC_REFRESH = sdl2.SDLK_AC_REFRESH KEY_AC_BOOKMARKS = sdl2.SDLK_AC_BOOKMARKS KEY_BRIGHTNESSDOWN = sdl2.SDLK_BRIGHTNESSDOWN KEY_BRIGHTNESSUP = sdl2.SDLK_BRIGHTNESSUP KEY_DISPLAYSWITCH = sdl2.SDLK_DISPLAYSWITCH KEY_KBDILLUMTOGGLE = sdl2.SDLK_KBDILLUMTOGGLE KEY_KBDILLUMDOWN = sdl2.SDLK_KBDILLUMDOWN KEY_KBDILLUMUP = sdl2.SDLK_KBDILLUMUP KEY_EJECT = sdl2.SDLK_EJECT KEY_SLEEP = sdl2.SDLK_SLEEP","title":"Keys"},{"location":"wiki/math/","text":"Types of PI in Fusion Engine These are used for certain miscellaneous math things. Full version of pi (3.141592653589793238462643383279502884197): main.math.PI A slightly smaller version that python's math library uses (3.141592653589793): main.math.SMALLERPI An extremely shortened version of pi (3.14): main.math.SMALLPI This allows you to get the floor value of a number. main.math.FLOOR(3.4) Euler's Number You can read more about it here. main.math.EULERNUMBER","title":"Math"},{"location":"wiki/math/#types-of-pi-in-fusion-engine","text":"These are used for certain miscellaneous math things. Full version of pi (3.141592653589793238462643383279502884197): main.math.PI A slightly smaller version that python's math library uses (3.141592653589793): main.math.SMALLERPI An extremely shortened version of pi (3.14): main.math.SMALLPI This allows you to get the floor value of a number. main.math.FLOOR(3.4)","title":"Types of PI in Fusion Engine"},{"location":"wiki/math/#eulers-number","text":"You can read more about it here. main.math.EULERNUMBER","title":"Euler's Number"},{"location":"wiki/wiki/","text":"Main Wiki Create window To create a window were thing are draw, then you need to use this: window = main.window.new_window(\"Example: 1\", 800, 600) Start loop In a loop you can draw things and it will run with the FPS that is setup. To start a loop, you have two choices: Choice 1: @main.window.loop def loop(): ... # Your own loop things Choice 2: while main.window.running(window): ... # Your own loop thing There is basically no difference, they all are doing the same thing, you use what you prefer. In our examples we use choice 1. Default message If you tried using our engine you may have encountered this message being printed to terminal: Fusion Engine 1.0.2 (Pygame-ce 2.3.0, Python 3.11.4) Welcome to Fusion Engine! https://github.com/dimkauzh/fusion-engine To disable this behavior, you just give the main class when initting this argument: message=False , like this: import fusionengine as fusion main = fusion.Main(\"message=False\") Set Background color If you want to set a background color, you use this function before all draw functions: main.draw.set_background_color(window, main.color.WHITE) DeltaTime if you want to access delta time, you use this: main.window.DELTATIME Predefined shapes We have some predefined shapes that can be used and be drew on the screen. Here are some: Rectangle: main.shape.new_rect(x, y, width, height, color) More shapes will be coming soon Window icon So you want to change the icon of your window? Well, its easy: main.window.change_icon(\"path_to_icon\") Set FPS To set the framerate of your window, you use this: main.window.set_fps(60) Vectors Vector2d If you want to create a 2d vector that stores x and y, then you do this: vector = main.vector.new_vector2d(10, 10) Draw a line To draw a line, you use this: # x1 y1 x2 y2 color main.draw.draw_line(window, 100, 100, 200, 200, main.color.BLUE) Draw rectangle If you just want to draw a rectangle to test or to use it for your game/app, then you have 3 options: Option one: just draw a rectangle main.draw.draw_rect(window, 100, 100, 400, 400, main.color.BLUE) Second option: draw predefined rectangle: main.draw.draw_own_rect(window, your_rect) Third option: Draw a rectangle of lines # x y w h color main.draw.draw_line_rect(window, 100, 100, 400, 400, main.color.BLUE) Draw image You first need to create a variable with your image and image data: image = main.image.open_image(window, main.DEBUGIMAGE, 100, 100, 400, 400) main.DEBUGIMAGE is an image that is included with the engine, so you can use it freely. Then you need to render it (In the best situation this will happen in your loop): main.image.draw_image(image) Create entity WARNING: PRE ALPHA (It's in really early stages) If you want a player or an enemy or some moving object in your game, you can use an entity, thats an object that helps you manage things in your game: # x y w h entity = main.body.Entity(window, 100, 100, 50, 50) Draw rect with entity If you want to draw a rectangle that is basically in your entity, then you do it like this: entity.draw_image(main.color.BLACK) Draw image with entity If you want to draw a image on your entity, then you do this: entity.image(\"image_path\") Sound Load sound To load a sound you do this: your_sound = main.sound.load_sound(\"path_to_sound\") Play sound To play your loaded sound you use this: your_sound.play() Stop sound To stop your playing sound you use this: your_sound.stop() Backround music To start playing background music you use this: main.sound.play_background_music(\"path_to_sound\") Storage system Init my_db = JsonStorage(\"my_db.json\") This how you initialize your json storage system Insertion my_db.insert({\"first_name\": \"john\", \"last_name\": \"wick\", \"gold\": 50}) my_db.insert({\"first_name\": \"alexander\", \"last_name\": \"wick\", \"gold\": 20}) The code inserts two entries into the storage. The inserted data contains information about individuals' first names, last names, and gold amounts. Reading Copy code my_db.search({\"last_name\": \"wick\"}) my_db.search({\"last_name\": \"wick\"}, get_index=True) The code demonstrates reading operations. It searches for entries with the last name \"wick\" and retrieves results with and without index information. Updating alex['gold'] += 20 my_db.update(alex_index, alex) The code showcases how to update data in the storage. In this case, it increases the \"gold\" value for an entry with the first name \"alexander\" by 20. Deleting my_db.delete(john_index) The code demonstrates deletion of data by removing an entry with the first name \"john\" from the storage. Saving to Disk my_db.save() The code shows how to save the modified data back to the storage file on disk. Keyboard input Keydown if you need keyboard input, then use this if statement with your own key (see key tab for all key names): if main.event.key_down(main.keys.KEY_a): print(\"Key A pressed\") Keydown once If you need keydown to be only once, then you use this: if main.event.key_down_once(main.keys.KEY_a): print(\"Key A pressed\") User Interface (UI) Creating a small ui for your application/game is easy with our following tools: Buttons To create a simple button we do the following: # Create the button outside the loop button = main.ui.button.new_button( window, main.shape.new_rect_button(200, 200, 200, 200), \"Hello World\" ) Button clicked If you want to check if your button was pressed or is being pressed, then you do that this way: @main.window.loop def loop(): if button.button_pressed(): ... # Do your stuff Rendering text If you want to render some fonts, then you can do it like this: Option 1: Render text with build into fusion or your own font # x y font size color main.ui.text.print_text(window, \"Your text\", 10, 10, main.fonts.NUNITO_LIGHT, 20, main.color.WHITE) Option 2: Render text with system font Its the same option 1, but you change the font to name of the font, like this: main.ui.text.print_text(window, \"Your text\", 10, 10, \"Arial\", 20, main.color.WHITE) Quit The quitting of the engine is done automaticly for you, so you dont have to worry about it. Force to quit If you want to force quit due to some reason, its pretty easy: main.window.force_quit()","title":"Main Wiki"},{"location":"wiki/wiki/#main-wiki","text":"","title":"Main Wiki"},{"location":"wiki/wiki/#create-window","text":"To create a window were thing are draw, then you need to use this: window = main.window.new_window(\"Example: 1\", 800, 600)","title":"Create window"},{"location":"wiki/wiki/#start-loop","text":"In a loop you can draw things and it will run with the FPS that is setup. To start a loop, you have two choices: Choice 1: @main.window.loop def loop(): ... # Your own loop things Choice 2: while main.window.running(window): ... # Your own loop thing There is basically no difference, they all are doing the same thing, you use what you prefer. In our examples we use choice 1.","title":"Start loop"},{"location":"wiki/wiki/#default-message","text":"If you tried using our engine you may have encountered this message being printed to terminal: Fusion Engine 1.0.2 (Pygame-ce 2.3.0, Python 3.11.4) Welcome to Fusion Engine! https://github.com/dimkauzh/fusion-engine To disable this behavior, you just give the main class when initting this argument: message=False , like this: import fusionengine as fusion main = fusion.Main(\"message=False\")","title":"Default message"},{"location":"wiki/wiki/#set-background-color","text":"If you want to set a background color, you use this function before all draw functions: main.draw.set_background_color(window, main.color.WHITE)","title":"Set Background color"},{"location":"wiki/wiki/#deltatime","text":"if you want to access delta time, you use this: main.window.DELTATIME","title":"DeltaTime"},{"location":"wiki/wiki/#predefined-shapes","text":"We have some predefined shapes that can be used and be drew on the screen. Here are some: Rectangle: main.shape.new_rect(x, y, width, height, color) More shapes will be coming soon","title":"Predefined shapes"},{"location":"wiki/wiki/#window-icon","text":"So you want to change the icon of your window? Well, its easy: main.window.change_icon(\"path_to_icon\")","title":"Window icon"},{"location":"wiki/wiki/#set-fps","text":"To set the framerate of your window, you use this: main.window.set_fps(60)","title":"Set FPS"},{"location":"wiki/wiki/#vectors","text":"","title":"Vectors"},{"location":"wiki/wiki/#vector2d","text":"If you want to create a 2d vector that stores x and y, then you do this: vector = main.vector.new_vector2d(10, 10)","title":"Vector2d"},{"location":"wiki/wiki/#draw-a-line","text":"To draw a line, you use this: # x1 y1 x2 y2 color main.draw.draw_line(window, 100, 100, 200, 200, main.color.BLUE)","title":"Draw a line"},{"location":"wiki/wiki/#draw-rectangle","text":"If you just want to draw a rectangle to test or to use it for your game/app, then you have 3 options: Option one: just draw a rectangle main.draw.draw_rect(window, 100, 100, 400, 400, main.color.BLUE) Second option: draw predefined rectangle: main.draw.draw_own_rect(window, your_rect) Third option: Draw a rectangle of lines # x y w h color main.draw.draw_line_rect(window, 100, 100, 400, 400, main.color.BLUE)","title":"Draw rectangle"},{"location":"wiki/wiki/#draw-image","text":"You first need to create a variable with your image and image data: image = main.image.open_image(window, main.DEBUGIMAGE, 100, 100, 400, 400) main.DEBUGIMAGE is an image that is included with the engine, so you can use it freely. Then you need to render it (In the best situation this will happen in your loop): main.image.draw_image(image)","title":"Draw image"},{"location":"wiki/wiki/#create-entity-warning-pre-alpha-its-in-really-early-stages","text":"If you want a player or an enemy or some moving object in your game, you can use an entity, thats an object that helps you manage things in your game: # x y w h entity = main.body.Entity(window, 100, 100, 50, 50)","title":"Create entity WARNING: PRE ALPHA (It's in really early stages)"},{"location":"wiki/wiki/#draw-rect-with-entity","text":"If you want to draw a rectangle that is basically in your entity, then you do it like this: entity.draw_image(main.color.BLACK)","title":"Draw rect with entity"},{"location":"wiki/wiki/#draw-image-with-entity","text":"If you want to draw a image on your entity, then you do this: entity.image(\"image_path\")","title":"Draw image with entity"},{"location":"wiki/wiki/#sound","text":"","title":"Sound"},{"location":"wiki/wiki/#load-sound","text":"To load a sound you do this: your_sound = main.sound.load_sound(\"path_to_sound\")","title":"Load sound"},{"location":"wiki/wiki/#play-sound","text":"To play your loaded sound you use this: your_sound.play()","title":"Play sound"},{"location":"wiki/wiki/#stop-sound","text":"To stop your playing sound you use this: your_sound.stop()","title":"Stop sound"},{"location":"wiki/wiki/#backround-music","text":"To start playing background music you use this: main.sound.play_background_music(\"path_to_sound\")","title":"Backround music"},{"location":"wiki/wiki/#storage-system","text":"","title":"Storage system"},{"location":"wiki/wiki/#init","text":"my_db = JsonStorage(\"my_db.json\") This how you initialize your json storage system","title":"Init"},{"location":"wiki/wiki/#insertion","text":"my_db.insert({\"first_name\": \"john\", \"last_name\": \"wick\", \"gold\": 50}) my_db.insert({\"first_name\": \"alexander\", \"last_name\": \"wick\", \"gold\": 20}) The code inserts two entries into the storage. The inserted data contains information about individuals' first names, last names, and gold amounts.","title":"Insertion"},{"location":"wiki/wiki/#reading","text":"Copy code my_db.search({\"last_name\": \"wick\"}) my_db.search({\"last_name\": \"wick\"}, get_index=True) The code demonstrates reading operations. It searches for entries with the last name \"wick\" and retrieves results with and without index information.","title":"Reading"},{"location":"wiki/wiki/#updating","text":"alex['gold'] += 20 my_db.update(alex_index, alex) The code showcases how to update data in the storage. In this case, it increases the \"gold\" value for an entry with the first name \"alexander\" by 20.","title":"Updating"},{"location":"wiki/wiki/#deleting","text":"my_db.delete(john_index) The code demonstrates deletion of data by removing an entry with the first name \"john\" from the storage.","title":"Deleting"},{"location":"wiki/wiki/#saving-to-disk","text":"my_db.save() The code shows how to save the modified data back to the storage file on disk.","title":"Saving to Disk"},{"location":"wiki/wiki/#keyboard-input","text":"","title":"Keyboard input"},{"location":"wiki/wiki/#keydown","text":"if you need keyboard input, then use this if statement with your own key (see key tab for all key names): if main.event.key_down(main.keys.KEY_a): print(\"Key A pressed\")","title":"Keydown"},{"location":"wiki/wiki/#keydown-once","text":"If you need keydown to be only once, then you use this: if main.event.key_down_once(main.keys.KEY_a): print(\"Key A pressed\")","title":"Keydown once"},{"location":"wiki/wiki/#user-interface-ui","text":"Creating a small ui for your application/game is easy with our following tools:","title":"User Interface (UI)"},{"location":"wiki/wiki/#buttons","text":"To create a simple button we do the following: # Create the button outside the loop button = main.ui.button.new_button( window, main.shape.new_rect_button(200, 200, 200, 200), \"Hello World\" )","title":"Buttons"},{"location":"wiki/wiki/#button-clicked","text":"If you want to check if your button was pressed or is being pressed, then you do that this way: @main.window.loop def loop(): if button.button_pressed(): ... # Do your stuff","title":"Button clicked"},{"location":"wiki/wiki/#rendering-text","text":"If you want to render some fonts, then you can do it like this: Option 1: Render text with build into fusion or your own font # x y font size color main.ui.text.print_text(window, \"Your text\", 10, 10, main.fonts.NUNITO_LIGHT, 20, main.color.WHITE) Option 2: Render text with system font Its the same option 1, but you change the font to name of the font, like this: main.ui.text.print_text(window, \"Your text\", 10, 10, \"Arial\", 20, main.color.WHITE)","title":"Rendering text"},{"location":"wiki/wiki/#quit","text":"The quitting of the engine is done automaticly for you, so you dont have to worry about it.","title":"Quit"},{"location":"wiki/wiki/#force-to-quit","text":"If you want to force quit due to some reason, its pretty easy: main.window.force_quit()","title":"Force to quit"}]} \ No newline at end of file +{"config":{"indexing":"full","lang":["en"],"min_search_length":3,"prebuild_index":false,"separator":"[\\s\\-]+"},"docs":[{"location":"","text":"Fusion Engine Documentation \ud83d\udddc\ufe0f Table of Contents Welcome to fusion engine documentation! We have seperated the documentation in some parts: main, api, wiki and tutorial. Wiki is made if you need to know what a function does. Api is made if you need to know if a function exist and what arguments it takes And in tutorials we made some tutorials for you to better understand fusion! Wiki Setting up Wiki Api Setting up API Tutorials Tutorials Todo list and changelog 3.0.0 4.0.0 \ud83d\udcbb Setting up To install it run this: pip install fusion-engine Then import: import fusionengine as engine And after that you need to create a object of our engine to run functions of it: main = engine.Main()","title":"Home"},{"location":"#fusion-engine-documentation","text":"","title":"Fusion Engine Documentation"},{"location":"#table-of-contents","text":"Welcome to fusion engine documentation! We have seperated the documentation in some parts: main, api, wiki and tutorial. Wiki is made if you need to know what a function does. Api is made if you need to know if a function exist and what arguments it takes And in tutorials we made some tutorials for you to better understand fusion!","title":"\ud83d\udddc\ufe0f Table of Contents"},{"location":"#wiki","text":"Setting up Wiki","title":"Wiki"},{"location":"#api","text":"Setting up API","title":"Api"},{"location":"#tutorials","text":"Tutorials","title":"Tutorials"},{"location":"#todo-list-and-changelog","text":"3.0.0 4.0.0","title":"Todo list and changelog"},{"location":"#setting-up","text":"To install it run this: pip install fusion-engine Then import: import fusionengine as engine And after that you need to create a object of our engine to run functions of it: main = engine.Main()","title":"\ud83d\udcbb Setting up"},{"location":"api/","text":"Api Welcome to our api! Here you will find all functions that exist in fusion engine and what arguments they get. We have seperated the api in some parts, like main api, color api and more. You choose one you need. Can't find something? Then try looking in the main api/ So have luck! Table of contents Main API Color API Font API Key API","title":"Api"},{"location":"api/#api","text":"Welcome to our api! Here you will find all functions that exist in fusion engine and what arguments they get. We have seperated the api in some parts, like main api, color api and more. You choose one you need. Can't find something? Then try looking in the main api/ So have luck!","title":"Api"},{"location":"api/#table-of-contents","text":"Main API Color API Font API Key API","title":"Table of contents"},{"location":"api/api/","text":"API Window main.window new_window(title: str, width: int, height: int) change_icon(image_path: str) loop(your_loop_func) set_fps(self, fps: int) force_quit() Event main.event key_down(key) key_down_once(key) Draw main.draw draw_line(window, x1: int, y1: int, x2: int, y2: int, color: tuple) draw_line_rect(window, x: int, y: int, width: int, height: int, color: tuple) draw_rect(window, x: int, y: int, width: int, height: int, color: tuple) draw_own_rect(window, rect) set_background_color(window, color: tuple) Image main.image open_image(window, image_path: str, x: int, y: int, width: int, height: int) draw_image(image) Body main.body Entity(window, x: int, y: int, width: int, height: int) Shape main.shape new_rect(x: int, y: int, width: int, height: int, color: tuple) new_rect_button(x, y, width, height) UI main.ui main.ui.button new_button(window: windowfe._CustomRenderer, rect: shape._CustomShape, text: str) Some button functions: your_button.button_pressed() -> bool main.ui.text def print_text(window, text: str, x: int, y: int, font_path: str, font_size: int, color: tuple) Debug main.debug DEBUGIMAGE Vector main.vector new_vector2d(x: int, y: int) Sound main.sound load_sound(sound_path: str) play_background_music(sound_path: str) set_volume_global(volume) Loaded sound API play() stop() get_volume() set_volume(volume: int) fadeout(time: str)","title":"API"},{"location":"api/api/#api","text":"","title":"API"},{"location":"api/api/#window","text":"","title":"Window"},{"location":"api/api/#mainwindow","text":"new_window(title: str, width: int, height: int) change_icon(image_path: str) loop(your_loop_func) set_fps(self, fps: int) force_quit()","title":"main.window"},{"location":"api/api/#event","text":"","title":"Event"},{"location":"api/api/#mainevent","text":"key_down(key) key_down_once(key)","title":"main.event"},{"location":"api/api/#draw","text":"","title":"Draw"},{"location":"api/api/#maindraw","text":"draw_line(window, x1: int, y1: int, x2: int, y2: int, color: tuple) draw_line_rect(window, x: int, y: int, width: int, height: int, color: tuple) draw_rect(window, x: int, y: int, width: int, height: int, color: tuple) draw_own_rect(window, rect) set_background_color(window, color: tuple)","title":"main.draw"},{"location":"api/api/#image","text":"","title":"Image"},{"location":"api/api/#mainimage","text":"open_image(window, image_path: str, x: int, y: int, width: int, height: int) draw_image(image)","title":"main.image"},{"location":"api/api/#body","text":"","title":"Body"},{"location":"api/api/#mainbody","text":"Entity(window, x: int, y: int, width: int, height: int)","title":"main.body"},{"location":"api/api/#shape","text":"","title":"Shape"},{"location":"api/api/#mainshape","text":"new_rect(x: int, y: int, width: int, height: int, color: tuple) new_rect_button(x, y, width, height)","title":"main.shape"},{"location":"api/api/#ui","text":"","title":"UI"},{"location":"api/api/#mainui","text":"","title":"main.ui"},{"location":"api/api/#mainuibutton","text":"new_button(window: windowfe._CustomRenderer, rect: shape._CustomShape, text: str) Some button functions: your_button.button_pressed() -> bool","title":"main.ui.button"},{"location":"api/api/#mainuitext","text":"def print_text(window, text: str, x: int, y: int, font_path: str, font_size: int, color: tuple)","title":"main.ui.text"},{"location":"api/api/#debug","text":"","title":"Debug"},{"location":"api/api/#maindebug","text":"DEBUGIMAGE","title":"main.debug"},{"location":"api/api/#vector","text":"","title":"Vector"},{"location":"api/api/#mainvector","text":"new_vector2d(x: int, y: int)","title":"main.vector"},{"location":"api/api/#sound","text":"","title":"Sound"},{"location":"api/api/#mainsound","text":"load_sound(sound_path: str) play_background_music(sound_path: str) set_volume_global(volume)","title":"main.sound"},{"location":"api/api/#loaded-sound-api","text":"play() stop() get_volume() set_volume(volume: int) fadeout(time: str)","title":"Loaded sound API"},{"location":"api/color/","text":"Color API Color main.color BLUE = (0, 0, 255, 255) BLACK = (0, 0, 0, 255) WHITE = (255, 255, 255, 255) GREEN = (255, 255, 255, 255) RED = (255, 0, 0, 255) YELLOW = (255, 255, 0, 255) PURPLE = (255, 0, 255, 255) CYAN = (0, 255, 255, 255) ORANGE = (255, 165, 0, 255) GRAY = (128, 128, 128, 255) BROWN = (165, 42, 42, 255) PINK = (255, 192, 203, 255) MAGENTA = (255, 0, 255, 255) SILVER = (192, 192, 192, 255) GOLD = (255, 215, 0, 255) BRONZE = (205, 127, 50, 255) LIME = (0, 255, 0, 255) OLIVE = (128, 128, 0, 255) TEAL = (0, 128, 128, 255) NAVY = (0, 0, 128, 255) MAROON = (128, 0, 0, 255) INDIGO = (75, 0, 130, 255) TURQUOISE = (64, 224, 208, 255) VIOLET = (238, 130, 238, 255) AQUA = (0, 255, 255, 255) TAN = (210, 180, 140, 255) BEIGE = (245, 245, 220, 255) IVORY = (255, 255, 240, 255) LAVENDER = (230, 230, 250, 255) MINT = (189, 252, 201, 255) SALMON = (250, 128, 114, 255) SCARLET = (255, 36, 0, 255) TEAL = (0, 128, 128, 255) TOMATO = (255, 99, 71, 255) CRIMSON = (220, 20, 60, 255) AZURE = (0, 128, 255, 255) Colortools main.colortools hex_to_rgba(hex)","title":"Color API"},{"location":"api/color/#color-api","text":"","title":"Color API"},{"location":"api/color/#color","text":"","title":"Color"},{"location":"api/color/#maincolor","text":"BLUE = (0, 0, 255, 255) BLACK = (0, 0, 0, 255) WHITE = (255, 255, 255, 255) GREEN = (255, 255, 255, 255) RED = (255, 0, 0, 255) YELLOW = (255, 255, 0, 255) PURPLE = (255, 0, 255, 255) CYAN = (0, 255, 255, 255) ORANGE = (255, 165, 0, 255) GRAY = (128, 128, 128, 255) BROWN = (165, 42, 42, 255) PINK = (255, 192, 203, 255) MAGENTA = (255, 0, 255, 255) SILVER = (192, 192, 192, 255) GOLD = (255, 215, 0, 255) BRONZE = (205, 127, 50, 255) LIME = (0, 255, 0, 255) OLIVE = (128, 128, 0, 255) TEAL = (0, 128, 128, 255) NAVY = (0, 0, 128, 255) MAROON = (128, 0, 0, 255) INDIGO = (75, 0, 130, 255) TURQUOISE = (64, 224, 208, 255) VIOLET = (238, 130, 238, 255) AQUA = (0, 255, 255, 255) TAN = (210, 180, 140, 255) BEIGE = (245, 245, 220, 255) IVORY = (255, 255, 240, 255) LAVENDER = (230, 230, 250, 255) MINT = (189, 252, 201, 255) SALMON = (250, 128, 114, 255) SCARLET = (255, 36, 0, 255) TEAL = (0, 128, 128, 255) TOMATO = (255, 99, 71, 255) CRIMSON = (220, 20, 60, 255) AZURE = (0, 128, 255, 255)","title":"main.color"},{"location":"api/color/#colortools","text":"","title":"Colortools"},{"location":"api/color/#maincolortools","text":"hex_to_rgba(hex)","title":"main.colortools"},{"location":"api/fonts/","text":"Font API main.font NUNITO_LIGHT SAIRACONDENSED_EXTRABOLD","title":"Font API"},{"location":"api/fonts/#font-api","text":"","title":"Font API"},{"location":"api/fonts/#mainfont","text":"NUNITO_LIGHT SAIRACONDENSED_EXTRABOLD","title":"main.font"},{"location":"api/keys/","text":"Keys API main.keys KEY_UNKNOWN = sdl2.SDLK_UNKNOWN KEY_RETURN = sdl2.SDLK_RETURN KEY_ESCAPE = sdl2.SDLK_ESCAPE KEY_BACKSPACE = sdl2.SDLK_BACKSPACE KEY_TAB = sdl2.SDLK_TAB KEY_SPACE = sdl2.SDLK_SPACE KEY_EXCLAIM = sdl2.SDLK_EXCLAIM KEY_QUOTEDBL = sdl2.SDLK_QUOTEDBL KEY_HASH = sdl2.SDLK_HASH KEY_PERCENT = sdl2.SDLK_PERCENT KEY_DOLLAR = sdl2.SDLK_DOLLAR KEY_AMPERSAND = sdl2.SDLK_AMPERSAND KEY_QUOTE = sdl2.SDLK_QUOTE KEY_LEFTPAREN = sdl2.SDLK_LEFTPAREN KEY_RIGHTPAREN = sdl2.SDLK_RIGHTPAREN KEY_ASTERISK = sdl2.SDLK_ASTERISK KEY_PLUS = sdl2.SDLK_PLUS KEY_COMMA = sdl2.SDLK_COMMA KEY_MINUS = sdl2.SDLK_MINUS KEY_PERIOD = sdl2.SDLK_PERIOD KEY_SLASH = sdl2.SDLK_SLASH KEY_0 = sdl2.SDLK_0 KEY_1 = sdl2.SDLK_1 KEY_2 = sdl2.SDLK_2 KEY_3 = sdl2.SDLK_3 KEY_4 = sdl2.SDLK_4 KEY_5 = sdl2.SDLK_5 KEY_6 = sdl2.SDLK_6 KEY_7 = sdl2.SDLK_7 KEY_8 = sdl2.SDLK_8 KEY_9 = sdl2.SDLK_9 KEY_COLON = sdl2.SDLK_COLON KEY_SEMICOLON = sdl2.SDLK_SEMICOLON KEY_LESS = sdl2.SDLK_LESS KEY_EQUALS = sdl2.SDLK_EQUALS KEY_GREATER = sdl2.SDLK_GREATER KEY_QUESTION = sdl2.SDLK_QUESTION KEY_AT = sdl2.SDLK_AT KEY_LEFTBRACKET = sdl2.SDLK_LEFTBRACKET KEY_BACKSLASH = sdl2.SDLK_BACKSLASH KEY_RIGHTBRACKET = sdl2.SDLK_RIGHTBRACKET KEY_CARET = sdl2.SDLK_CARET KEY_UNDERSCORE = sdl2.SDLK_UNDERSCORE KEY_BACKQUOTE = sdl2.SDLK_BACKQUOTE KEY_a = sdl2.SDLK_a KEY_b = sdl2.SDLK_b KEY_c = sdl2.SDLK_c KEY_d = sdl2.SDLK_d KEY_e = sdl2.SDLK_e KEY_f = sdl2.SDLK_f KEY_g = sdl2.SDLK_g KEY_h = sdl2.SDLK_h KEY_i = sdl2.SDLK_i KEY_j = sdl2.SDLK_j KEY_k = sdl2.SDLK_k KEY_l = sdl2.SDLK_l KEY_m = sdl2.SDLK_m KEY_n = sdl2.SDLK_n KEY_o = sdl2.SDLK_o KEY_p = sdl2.SDLK_p KEY_q = sdl2.SDLK_q KEY_r = sdl2.SDLK_r KEY_s = sdl2.SDLK_s KEY_t = sdl2.SDLK_t KEY_u = sdl2.SDLK_u KEY_v = sdl2.SDLK_v KEY_w = sdl2.SDLK_w KEY_x = sdl2.SDLK_x KEY_y = sdl2.SDLK_y KEY_z = sdl2.SDLK_z KEY_CAPSLOCK = sdl2.SDLK_CAPSLOCK KEY_F1 = sdl2.SDLK_F1 KEY_F2 = sdl2.SDLK_F2 KEY_F3 = sdl2.SDLK_F3 KEY_F4 = sdl2.SDLK_F4 KEY_F5 = sdl2.SDLK_F5 KEY_F6 = sdl2.SDLK_F6 KEY_F7 = sdl2.SDLK_F7 KEY_F8 = sdl2.SDLK_F8 KEY_F9 = sdl2.SDLK_F9 KEY_F10 = sdl2.SDLK_F10 KEY_F11 = sdl2.SDLK_F11 KEY_F12 = sdl2.SDLK_F12 KEY_PRINTSCREEN = sdl2.SDLK_PRINTSCREEN KEY_SCROLLLOCK = sdl2.SDLK_SCROLLLOCK KEY_PAUSE = sdl2.SDLK_PAUSE KEY_INSERT = sdl2.SDLK_INSERT KEY_HOME = sdl2.SDLK_HOME KEY_PAGEUP = sdl2.SDLK_PAGEUP KEY_DELETE = sdl2.SDLK_DELETE KEY_END = sdl2.SDLK_END KEY_PAGEDOWN = sdl2.SDLK_PAGEDOWN KEY_RIGHT = sdl2.SDLK_RIGHT KEY_LEFT = sdl2.SDLK_LEFT KEY_DOWN = sdl2.SDLK_DOWN KEY_UP = sdl2.SDLK_UP KEY_NUMLOCKCLEAR = sdl2.SDLK_NUMLOCKCLEAR KEY_KP_DIVIDE = sdl2.SDLK_KP_DIVIDE KEY_KP_MULTIPLY = sdl2.SDLK_KP_MULTIPLY KEY_KP_MINUS = sdl2.SDLK_KP_MINUS KEY_KP_PLUS = sdl2.SDLK_KP_PLUS KEY_KP_ENTER = sdl2.SDLK_KP_ENTER KEY_KP_1 = sdl2.SDLK_KP_1 KEY_KP_2 = sdl2.SDLK_KP_2 KEY_KP_3 = sdl2.SDLK_KP_3 KEY_KP_4 = sdl2.SDLK_KP_4 KEY_KP_5 = sdl2.SDLK_KP_5 KEY_KP_6 = sdl2.SDLK_KP_6 KEY_KP_7 = sdl2.SDLK_KP_7 KEY_KP_8 = sdl2.SDLK_KP_8 KEY_KP_9 = sdl2.SDLK_KP_9 KEY_KP_0 = sdl2.SDLK_KP_0 KEY_KP_PERIOD = sdl2.SDLK_KP_PERIOD KEY_APPLICATION = sdl2.SDLK_APPLICATION KEY_POWER = sdl2.SDLK_POWER KEY_KP_EQUALS = sdl2.SDLK_KP_EQUALS KEY_F13 = sdl2.SDLK_F13 KEY_F14 = sdl2.SDLK_F14 KEY_F15 = sdl2.SDLK_F15 KEY_F16 = sdl2.SDLK_F16 KEY_F17 = sdl2.SDLK_F17 KEY_F18 = sdl2.SDLK_F18 KEY_F19 = sdl2.SDLK_F19 KEY_F20 = sdl2.SDLK_F20 KEY_F21 = sdl2.SDLK_F21 KEY_F22 = sdl2.SDLK_F22 KEY_F23 = sdl2.SDLK_F23 KEY_F24 = sdl2.SDLK_F24 KEY_EXECUTE = sdl2.SDLK_EXECUTE KEY_HELP = sdl2.SDLK_HELP KEY_MENU = sdl2.SDLK_MENU KEY_SELECT = sdl2.SDLK_SELECT KEY_STOP = sdl2.SDLK_STOP KEY_AGAIN = sdl2.SDLK_AGAIN KEY_UNDO = sdl2.SDLK_UNDO KEY_CUT = sdl2.SDLK_CUT KEY_COPY = sdl2.SDLK_COPY KEY_PASTE = sdl2.SDLK_PASTE KEY_FIND = sdl2.SDLK_FIND KEY_MUTE = sdl2.SDLK_MUTE KEY_VOLUMEUP = sdl2.SDLK_VOLUMEUP KEY_VOLUMEDOWN = sdl2.SDLK_VOLUMEDOWN KEY_KP_COMMA = sdl2.SDLK_KP_COMMA KEY_KP_EQUALSAS400 = sdl2.SDLK_KP_EQUALSAS400 KEY_ALTERASE = sdl2.SDLK_ALTERASE KEY_SYSREQ = sdl2.SDLK_SYSREQ KEY_CANCEL = sdl2.SDLK_CANCEL KEY_CLEAR = sdl2.SDLK_CLEAR KEY_PRIOR = sdl2.SDLK_PRIOR KEY_RETURN2 = sdl2.SDLK_RETURN2 KEY_SEPARATOR = sdl2.SDLK_SEPARATOR KEY_OUT = sdl2.SDLK_OUT KEY_OPER = sdl2.SDLK_OPER KEY_CLEARAGAIN = sdl2.SDLK_CLEARAGAIN KEY_CRSEL = sdl2.SDLK_CRSEL KEY_EXSEL = sdl2.SDLK_EXSEL KEY_KP_00 = sdl2.SDLK_KP_00 KEY_KP_000 = sdl2.SDLK_KP_000 KEY_THOUSANDSSEPARATOR = sdl2.SDLK_THOUSANDSSEPARATOR KEY_DECIMALSEPARATOR = sdl2.SDLK_DECIMALSEPARATOR KEY_CURRENCYUNIT = sdl2.SDLK_CURRENCYUNIT KEY_CURRENCYSUBUNIT = sdl2.SDLK_CURRENCYSUBUNIT KEY_KP_LEFTPAREN = sdl2.SDLK_KP_LEFTPAREN KEY_KP_RIGHTPAREN = sdl2.SDLK_KP_RIGHTPAREN KEY_KP_LEFTBRACE = sdl2.SDLK_KP_LEFTBRACE KEY_KP_RIGHTBRACE = sdl2.SDLK_KP_RIGHTBRACE KEY_KP_TAB = sdl2.SDLK_KP_TAB KEY_KP_BACKSPACE = sdl2.SDLK_KP_BACKSPACE KEY_KP_A = sdl2.SDLK_KP_A KEY_KP_B = sdl2.SDLK_KP_B KEY_KP_C = sdl2.SDLK_KP_C KEY_KP_D = sdl2.SDLK_KP_D KEY_KP_E = sdl2.SDLK_KP_E KEY_KP_F = sdl2.SDLK_KP_F KEY_KP_XOR = sdl2.SDLK_KP_XOR KEY_KP_POWER = sdl2.SDLK_KP_POWER KEY_KP_PERCENT = sdl2.SDLK_KP_PERCENT KEY_KP_LESS = sdl2.SDLK_KP_LESS KEY_KP_GREATER = sdl2.SDLK_KP_GREATER KEY_KP_AMPERSAND = sdl2.SDLK_KP_AMPERSAND KEY_KP_DBLAMPERSAND = sdl2.SDLK_KP_DBLAMPERSAND KEY_KP_VERTICALBAR = sdl2.SDLK_KP_VERTICALBAR KEY_KP_DBLVERTICALBAR = sdl2.SDLK_KP_DBLVERTICALBAR KEY_KP_COLON = sdl2.SDLK_KP_COLON KEY_KP_HASH = sdl2.SDLK_KP_HASH KEY_KP_SPACE = sdl2.SDLK_KP_SPACE KEY_KP_AT = sdl2.SDLK_KP_AT KEY_KP_EXCLAM = sdl2.SDLK_KP_EXCLAM KEY_KP_MEMSTORE = sdl2.SDLK_KP_MEMSTORE KEY_KP_MEMRECALL = sdl2.SDLK_KP_MEMRECALL KEY_KP_MEMCLEAR = sdl2.SDLK_KP_MEMCLEAR KEY_KP_MEMADD = sdl2.SDLK_KP_MEMADD KEY_KP_MEMSUBTRACT = sdl2.SDLK_KP_MEMSUBTRACT KEY_KP_MEMMULTIPLY = sdl2.SDLK_KP_MEMMULTIPLY KEY_KP_MEMDIVIDE = sdl2.SDLK_KP_MEMDIVIDE KEY_KP_PLUSMINUS = sdl2.SDLK_KP_PLUSMINUS KEY_KP_CLEAR = sdl2.SDLK_KP_CLEAR KEY_KP_CLEARENTRY = sdl2.SDLK_KP_CLEARENTRY KEY_KP_BINARY = sdl2.SDLK_KP_BINARY KEY_KP_OCTAL = sdl2.SDLK_KP_OCTAL KEY_KP_DECIMAL = sdl2.SDLK_KP_DECIMAL KEY_KP_HEXADECIMAL = sdl2.SDLK_KP_HEXADECIMAL KEY_LCTRL = sdl2.SDLK_LCTRL KEY_LSHIFT = sdl2.SDLK_LSHIFT KEY_LALT = sdl2.SDLK_LALT KEY_LGUI = sdl2.SDLK_LGUI KEY_RCTRL = sdl2.SDLK_RCTRL KEY_RSHIFT = sdl2.SDLK_RSHIFT KEY_RALT = sdl2.SDLK_RALT KEY_RGUI = sdl2.SDLK_RGUI KEY_MODE = sdl2.SDLK_MODE KEY_AUDIONEXT = sdl2.SDLK_AUDIONEXT KEY_AUDIOPREV = sdl2.SDLK_AUDIOPREV KEY_AUDIOSTOP = sdl2.SDLK_AUDIOSTOP KEY_AUDIOPLAY = sdl2.SDLK_AUDIOPLAY KEY_AUDIOMUTE = sdl2.SDLK_AUDIOMUTE KEY_MEDIASELECT = sdl2.SDLK_MEDIASELECT KEY_WWW = sdl2.SDLK_WWW KEY_MAIL = sdl2.SDLK_MAIL KEY_CALCULATOR = sdl2.SDLK_CALCULATOR KEY_COMPUTER = sdl2.SDLK_COMPUTER KEY_AC_SEARCH = sdl2.SDLK_AC_SEARCH KEY_AC_HOME = sdl2.SDLK_AC_HOME KEY_AC_BACK = sdl2.SDLK_AC_BACK KEY_AC_FORWARD = sdl2.SDLK_AC_FORWARD KEY_AC_STOP = sdl2.SDLK_AC_STOP KEY_AC_REFRESH = sdl2.SDLK_AC_REFRESH KEY_AC_BOOKMARKS = sdl2.SDLK_AC_BOOKMARKS KEY_BRIGHTNESSDOWN = sdl2.SDLK_BRIGHTNESSDOWN KEY_BRIGHTNESSUP = sdl2.SDLK_BRIGHTNESSUP KEY_DISPLAYSWITCH = sdl2.SDLK_DISPLAYSWITCH KEY_KBDILLUMTOGGLE = sdl2.SDLK_KBDILLUMTOGGLE KEY_KBDILLUMDOWN = sdl2.SDLK_KBDILLUMDOWN KEY_KBDILLUMUP = sdl2.SDLK_KBDILLUMUP KEY_EJECT = sdl2.SDLK_EJECT KEY_SLEEP = sdl2.SDLK_SLEEP","title":"Keys API"},{"location":"api/keys/#keys-api","text":"","title":"Keys API"},{"location":"api/keys/#mainkeys","text":"KEY_UNKNOWN = sdl2.SDLK_UNKNOWN KEY_RETURN = sdl2.SDLK_RETURN KEY_ESCAPE = sdl2.SDLK_ESCAPE KEY_BACKSPACE = sdl2.SDLK_BACKSPACE KEY_TAB = sdl2.SDLK_TAB KEY_SPACE = sdl2.SDLK_SPACE KEY_EXCLAIM = sdl2.SDLK_EXCLAIM KEY_QUOTEDBL = sdl2.SDLK_QUOTEDBL KEY_HASH = sdl2.SDLK_HASH KEY_PERCENT = sdl2.SDLK_PERCENT KEY_DOLLAR = sdl2.SDLK_DOLLAR KEY_AMPERSAND = sdl2.SDLK_AMPERSAND KEY_QUOTE = sdl2.SDLK_QUOTE KEY_LEFTPAREN = sdl2.SDLK_LEFTPAREN KEY_RIGHTPAREN = sdl2.SDLK_RIGHTPAREN KEY_ASTERISK = sdl2.SDLK_ASTERISK KEY_PLUS = sdl2.SDLK_PLUS KEY_COMMA = sdl2.SDLK_COMMA KEY_MINUS = sdl2.SDLK_MINUS KEY_PERIOD = sdl2.SDLK_PERIOD KEY_SLASH = sdl2.SDLK_SLASH KEY_0 = sdl2.SDLK_0 KEY_1 = sdl2.SDLK_1 KEY_2 = sdl2.SDLK_2 KEY_3 = sdl2.SDLK_3 KEY_4 = sdl2.SDLK_4 KEY_5 = sdl2.SDLK_5 KEY_6 = sdl2.SDLK_6 KEY_7 = sdl2.SDLK_7 KEY_8 = sdl2.SDLK_8 KEY_9 = sdl2.SDLK_9 KEY_COLON = sdl2.SDLK_COLON KEY_SEMICOLON = sdl2.SDLK_SEMICOLON KEY_LESS = sdl2.SDLK_LESS KEY_EQUALS = sdl2.SDLK_EQUALS KEY_GREATER = sdl2.SDLK_GREATER KEY_QUESTION = sdl2.SDLK_QUESTION KEY_AT = sdl2.SDLK_AT KEY_LEFTBRACKET = sdl2.SDLK_LEFTBRACKET KEY_BACKSLASH = sdl2.SDLK_BACKSLASH KEY_RIGHTBRACKET = sdl2.SDLK_RIGHTBRACKET KEY_CARET = sdl2.SDLK_CARET KEY_UNDERSCORE = sdl2.SDLK_UNDERSCORE KEY_BACKQUOTE = sdl2.SDLK_BACKQUOTE KEY_a = sdl2.SDLK_a KEY_b = sdl2.SDLK_b KEY_c = sdl2.SDLK_c KEY_d = sdl2.SDLK_d KEY_e = sdl2.SDLK_e KEY_f = sdl2.SDLK_f KEY_g = sdl2.SDLK_g KEY_h = sdl2.SDLK_h KEY_i = sdl2.SDLK_i KEY_j = sdl2.SDLK_j KEY_k = sdl2.SDLK_k KEY_l = sdl2.SDLK_l KEY_m = sdl2.SDLK_m KEY_n = sdl2.SDLK_n KEY_o = sdl2.SDLK_o KEY_p = sdl2.SDLK_p KEY_q = sdl2.SDLK_q KEY_r = sdl2.SDLK_r KEY_s = sdl2.SDLK_s KEY_t = sdl2.SDLK_t KEY_u = sdl2.SDLK_u KEY_v = sdl2.SDLK_v KEY_w = sdl2.SDLK_w KEY_x = sdl2.SDLK_x KEY_y = sdl2.SDLK_y KEY_z = sdl2.SDLK_z KEY_CAPSLOCK = sdl2.SDLK_CAPSLOCK KEY_F1 = sdl2.SDLK_F1 KEY_F2 = sdl2.SDLK_F2 KEY_F3 = sdl2.SDLK_F3 KEY_F4 = sdl2.SDLK_F4 KEY_F5 = sdl2.SDLK_F5 KEY_F6 = sdl2.SDLK_F6 KEY_F7 = sdl2.SDLK_F7 KEY_F8 = sdl2.SDLK_F8 KEY_F9 = sdl2.SDLK_F9 KEY_F10 = sdl2.SDLK_F10 KEY_F11 = sdl2.SDLK_F11 KEY_F12 = sdl2.SDLK_F12 KEY_PRINTSCREEN = sdl2.SDLK_PRINTSCREEN KEY_SCROLLLOCK = sdl2.SDLK_SCROLLLOCK KEY_PAUSE = sdl2.SDLK_PAUSE KEY_INSERT = sdl2.SDLK_INSERT KEY_HOME = sdl2.SDLK_HOME KEY_PAGEUP = sdl2.SDLK_PAGEUP KEY_DELETE = sdl2.SDLK_DELETE KEY_END = sdl2.SDLK_END KEY_PAGEDOWN = sdl2.SDLK_PAGEDOWN KEY_RIGHT = sdl2.SDLK_RIGHT KEY_LEFT = sdl2.SDLK_LEFT KEY_DOWN = sdl2.SDLK_DOWN KEY_UP = sdl2.SDLK_UP KEY_NUMLOCKCLEAR = sdl2.SDLK_NUMLOCKCLEAR KEY_KP_DIVIDE = sdl2.SDLK_KP_DIVIDE KEY_KP_MULTIPLY = sdl2.SDLK_KP_MULTIPLY KEY_KP_MINUS = sdl2.SDLK_KP_MINUS KEY_KP_PLUS = sdl2.SDLK_KP_PLUS KEY_KP_ENTER = sdl2.SDLK_KP_ENTER KEY_KP_1 = sdl2.SDLK_KP_1 KEY_KP_2 = sdl2.SDLK_KP_2 KEY_KP_3 = sdl2.SDLK_KP_3 KEY_KP_4 = sdl2.SDLK_KP_4 KEY_KP_5 = sdl2.SDLK_KP_5 KEY_KP_6 = sdl2.SDLK_KP_6 KEY_KP_7 = sdl2.SDLK_KP_7 KEY_KP_8 = sdl2.SDLK_KP_8 KEY_KP_9 = sdl2.SDLK_KP_9 KEY_KP_0 = sdl2.SDLK_KP_0 KEY_KP_PERIOD = sdl2.SDLK_KP_PERIOD KEY_APPLICATION = sdl2.SDLK_APPLICATION KEY_POWER = sdl2.SDLK_POWER KEY_KP_EQUALS = sdl2.SDLK_KP_EQUALS KEY_F13 = sdl2.SDLK_F13 KEY_F14 = sdl2.SDLK_F14 KEY_F15 = sdl2.SDLK_F15 KEY_F16 = sdl2.SDLK_F16 KEY_F17 = sdl2.SDLK_F17 KEY_F18 = sdl2.SDLK_F18 KEY_F19 = sdl2.SDLK_F19 KEY_F20 = sdl2.SDLK_F20 KEY_F21 = sdl2.SDLK_F21 KEY_F22 = sdl2.SDLK_F22 KEY_F23 = sdl2.SDLK_F23 KEY_F24 = sdl2.SDLK_F24 KEY_EXECUTE = sdl2.SDLK_EXECUTE KEY_HELP = sdl2.SDLK_HELP KEY_MENU = sdl2.SDLK_MENU KEY_SELECT = sdl2.SDLK_SELECT KEY_STOP = sdl2.SDLK_STOP KEY_AGAIN = sdl2.SDLK_AGAIN KEY_UNDO = sdl2.SDLK_UNDO KEY_CUT = sdl2.SDLK_CUT KEY_COPY = sdl2.SDLK_COPY KEY_PASTE = sdl2.SDLK_PASTE KEY_FIND = sdl2.SDLK_FIND KEY_MUTE = sdl2.SDLK_MUTE KEY_VOLUMEUP = sdl2.SDLK_VOLUMEUP KEY_VOLUMEDOWN = sdl2.SDLK_VOLUMEDOWN KEY_KP_COMMA = sdl2.SDLK_KP_COMMA KEY_KP_EQUALSAS400 = sdl2.SDLK_KP_EQUALSAS400 KEY_ALTERASE = sdl2.SDLK_ALTERASE KEY_SYSREQ = sdl2.SDLK_SYSREQ KEY_CANCEL = sdl2.SDLK_CANCEL KEY_CLEAR = sdl2.SDLK_CLEAR KEY_PRIOR = sdl2.SDLK_PRIOR KEY_RETURN2 = sdl2.SDLK_RETURN2 KEY_SEPARATOR = sdl2.SDLK_SEPARATOR KEY_OUT = sdl2.SDLK_OUT KEY_OPER = sdl2.SDLK_OPER KEY_CLEARAGAIN = sdl2.SDLK_CLEARAGAIN KEY_CRSEL = sdl2.SDLK_CRSEL KEY_EXSEL = sdl2.SDLK_EXSEL KEY_KP_00 = sdl2.SDLK_KP_00 KEY_KP_000 = sdl2.SDLK_KP_000 KEY_THOUSANDSSEPARATOR = sdl2.SDLK_THOUSANDSSEPARATOR KEY_DECIMALSEPARATOR = sdl2.SDLK_DECIMALSEPARATOR KEY_CURRENCYUNIT = sdl2.SDLK_CURRENCYUNIT KEY_CURRENCYSUBUNIT = sdl2.SDLK_CURRENCYSUBUNIT KEY_KP_LEFTPAREN = sdl2.SDLK_KP_LEFTPAREN KEY_KP_RIGHTPAREN = sdl2.SDLK_KP_RIGHTPAREN KEY_KP_LEFTBRACE = sdl2.SDLK_KP_LEFTBRACE KEY_KP_RIGHTBRACE = sdl2.SDLK_KP_RIGHTBRACE KEY_KP_TAB = sdl2.SDLK_KP_TAB KEY_KP_BACKSPACE = sdl2.SDLK_KP_BACKSPACE KEY_KP_A = sdl2.SDLK_KP_A KEY_KP_B = sdl2.SDLK_KP_B KEY_KP_C = sdl2.SDLK_KP_C KEY_KP_D = sdl2.SDLK_KP_D KEY_KP_E = sdl2.SDLK_KP_E KEY_KP_F = sdl2.SDLK_KP_F KEY_KP_XOR = sdl2.SDLK_KP_XOR KEY_KP_POWER = sdl2.SDLK_KP_POWER KEY_KP_PERCENT = sdl2.SDLK_KP_PERCENT KEY_KP_LESS = sdl2.SDLK_KP_LESS KEY_KP_GREATER = sdl2.SDLK_KP_GREATER KEY_KP_AMPERSAND = sdl2.SDLK_KP_AMPERSAND KEY_KP_DBLAMPERSAND = sdl2.SDLK_KP_DBLAMPERSAND KEY_KP_VERTICALBAR = sdl2.SDLK_KP_VERTICALBAR KEY_KP_DBLVERTICALBAR = sdl2.SDLK_KP_DBLVERTICALBAR KEY_KP_COLON = sdl2.SDLK_KP_COLON KEY_KP_HASH = sdl2.SDLK_KP_HASH KEY_KP_SPACE = sdl2.SDLK_KP_SPACE KEY_KP_AT = sdl2.SDLK_KP_AT KEY_KP_EXCLAM = sdl2.SDLK_KP_EXCLAM KEY_KP_MEMSTORE = sdl2.SDLK_KP_MEMSTORE KEY_KP_MEMRECALL = sdl2.SDLK_KP_MEMRECALL KEY_KP_MEMCLEAR = sdl2.SDLK_KP_MEMCLEAR KEY_KP_MEMADD = sdl2.SDLK_KP_MEMADD KEY_KP_MEMSUBTRACT = sdl2.SDLK_KP_MEMSUBTRACT KEY_KP_MEMMULTIPLY = sdl2.SDLK_KP_MEMMULTIPLY KEY_KP_MEMDIVIDE = sdl2.SDLK_KP_MEMDIVIDE KEY_KP_PLUSMINUS = sdl2.SDLK_KP_PLUSMINUS KEY_KP_CLEAR = sdl2.SDLK_KP_CLEAR KEY_KP_CLEARENTRY = sdl2.SDLK_KP_CLEARENTRY KEY_KP_BINARY = sdl2.SDLK_KP_BINARY KEY_KP_OCTAL = sdl2.SDLK_KP_OCTAL KEY_KP_DECIMAL = sdl2.SDLK_KP_DECIMAL KEY_KP_HEXADECIMAL = sdl2.SDLK_KP_HEXADECIMAL KEY_LCTRL = sdl2.SDLK_LCTRL KEY_LSHIFT = sdl2.SDLK_LSHIFT KEY_LALT = sdl2.SDLK_LALT KEY_LGUI = sdl2.SDLK_LGUI KEY_RCTRL = sdl2.SDLK_RCTRL KEY_RSHIFT = sdl2.SDLK_RSHIFT KEY_RALT = sdl2.SDLK_RALT KEY_RGUI = sdl2.SDLK_RGUI KEY_MODE = sdl2.SDLK_MODE KEY_AUDIONEXT = sdl2.SDLK_AUDIONEXT KEY_AUDIOPREV = sdl2.SDLK_AUDIOPREV KEY_AUDIOSTOP = sdl2.SDLK_AUDIOSTOP KEY_AUDIOPLAY = sdl2.SDLK_AUDIOPLAY KEY_AUDIOMUTE = sdl2.SDLK_AUDIOMUTE KEY_MEDIASELECT = sdl2.SDLK_MEDIASELECT KEY_WWW = sdl2.SDLK_WWW KEY_MAIL = sdl2.SDLK_MAIL KEY_CALCULATOR = sdl2.SDLK_CALCULATOR KEY_COMPUTER = sdl2.SDLK_COMPUTER KEY_AC_SEARCH = sdl2.SDLK_AC_SEARCH KEY_AC_HOME = sdl2.SDLK_AC_HOME KEY_AC_BACK = sdl2.SDLK_AC_BACK KEY_AC_FORWARD = sdl2.SDLK_AC_FORWARD KEY_AC_STOP = sdl2.SDLK_AC_STOP KEY_AC_REFRESH = sdl2.SDLK_AC_REFRESH KEY_AC_BOOKMARKS = sdl2.SDLK_AC_BOOKMARKS KEY_BRIGHTNESSDOWN = sdl2.SDLK_BRIGHTNESSDOWN KEY_BRIGHTNESSUP = sdl2.SDLK_BRIGHTNESSUP KEY_DISPLAYSWITCH = sdl2.SDLK_DISPLAYSWITCH KEY_KBDILLUMTOGGLE = sdl2.SDLK_KBDILLUMTOGGLE KEY_KBDILLUMDOWN = sdl2.SDLK_KBDILLUMDOWN KEY_KBDILLUMUP = sdl2.SDLK_KBDILLUMUP KEY_EJECT = sdl2.SDLK_EJECT KEY_SLEEP = sdl2.SDLK_SLEEP","title":"main.keys"},{"location":"api/math/","text":"Math API main.math PI = 3.141592653589793238462643383279502884197 EULERNUMBER = 2.718281828459045 main.math.FLOOR(3.4)","title":"Math API"},{"location":"api/math/#math-api","text":"","title":"Math API"},{"location":"api/math/#mainmath","text":"PI = 3.141592653589793238462643383279502884197 EULERNUMBER = 2.718281828459045 main.math.FLOOR(3.4)","title":"main.math"},{"location":"changelog/3_0_0/","text":"3.0.0 Todo/Changelog [x] Engine [x] Window [x] Create window [x] Get data from window [x] Draw shapes [x] Draw images [x] Input [x] Storage system [x] Rendering options [x] Delta-Time [x] Pip package and SetupTools [x] Cython [x] Implement cython for extra speed [x] Dev version without cython [x] Vectors (stores x and y coordinates) [x] Create vector [x] GUI library [x] Text [x] Drawing (Build in draw function) [x] Buttons [x] Sound system [x] Sound player [x] File support [x] And more...","title":"3.0.0 Todo/Changelog"},{"location":"changelog/3_0_0/#300-todochangelog","text":"[x] Engine [x] Window [x] Create window [x] Get data from window [x] Draw shapes [x] Draw images [x] Input [x] Storage system [x] Rendering options [x] Delta-Time [x] Pip package and SetupTools [x] Cython [x] Implement cython for extra speed [x] Dev version without cython [x] Vectors (stores x and y coordinates) [x] Create vector [x] GUI library [x] Text [x] Drawing (Build in draw function) [x] Buttons [x] Sound system [x] Sound player [x] File support [x] And more...","title":"3.0.0 Todo/Changelog"},{"location":"changelog/4_0_0/","text":"4.0.0 Todo/Changelog [ ] UI (Using TKinter) [ ] Menu [ ] Create project [ ] Editor [ ] Code editor build in [ ] Run game [ ] Physics system using PyMunk [ ] Gravity [ ] Rendering [ ] Collision system [ ] Physics shapes","title":"4.0.0 Todo/Changelog"},{"location":"changelog/4_0_0/#400-todochangelog","text":"[ ] UI (Using TKinter) [ ] Menu [ ] Create project [ ] Editor [ ] Code editor build in [ ] Run game [ ] Physics system using PyMunk [ ] Gravity [ ] Rendering [ ] Collision system [ ] Physics shapes","title":"4.0.0 Todo/Changelog"},{"location":"tutorials/","text":"Fusion engine tutorials Unveiling the Tutorials Welcome to our tutorials! Here you will find step by step tutorials so you can understand fusion engine better! There are couple tutorials to get you started with basics and some are more advanced so you can create your first game with ease! Table of contents Tutorial 1: Setting Everything Up Tutorial 2: Basic Rendering Tutorial 1: Setting Everything Up This tutorial is about setting up fusion-engine so you can work on your project. Have fun! Start your journey: Tutorial 1 Tutorial 2: Basic Rendering In this tutorial we're covering the basics like creating a window and rendering a image. Before this tutorial, make sure you have everything setup, if not you can follow tutorial-1. Have fun! Start your journey: Tutorial 2","title":"Tutorial"},{"location":"tutorials/#fusion-engine-tutorials","text":"","title":"Fusion engine tutorials"},{"location":"tutorials/#unveiling-the-tutorials","text":"Welcome to our tutorials! Here you will find step by step tutorials so you can understand fusion engine better! There are couple tutorials to get you started with basics and some are more advanced so you can create your first game with ease!","title":"Unveiling the Tutorials"},{"location":"tutorials/#table-of-contents","text":"Tutorial 1: Setting Everything Up Tutorial 2: Basic Rendering","title":"Table of contents"},{"location":"tutorials/#tutorial-1-setting-everything-up","text":"This tutorial is about setting up fusion-engine so you can work on your project. Have fun! Start your journey: Tutorial 1","title":"Tutorial 1: Setting Everything Up"},{"location":"tutorials/#tutorial-2-basic-rendering","text":"In this tutorial we're covering the basics like creating a window and rendering a image. Before this tutorial, make sure you have everything setup, if not you can follow tutorial-1. Have fun! Start your journey: Tutorial 2","title":"Tutorial 2: Basic Rendering"},{"location":"tutorials/basics/","text":"Basic rendering tutorial Introduction This is a tutorial so you would understand the basics of the engine and how it works. In this tutorial we will learn how to render a window and draw some images on it. If you want to learn more, then go to our docs and select wiki. This tutorial also expect you to have everything setup, if not, head over to tutorial 1: setting everything up The Final Product Should Look like This: Creating a window So if you read tutorial 1 you know we have the main variable running our engine object. So now we create a window with the help of that main object: window = main.window.new_window(\"Tutorial 2\", 600, 600) The first argument that we give our function is our title, second argument is our width and third one is height Pre-loading image We will now pre-load a image so we can draw it later on our window. We do it like this: image = main.image.open_image(window, main.debug.DEBUGIMAGE, 0, 0, 600, 600) Fist argument is our window, second is our image path, third is our x position, fourth is our y position, fifth is our width and sixth is our height. As you maybe see were using main.debug.DEBUGIMAGE, which is a build in image into our engine for testing purposes. We will use it for our tutorial Starting a loop A loop is basicly what lets our window be open the whole time and not be automaticly closed. You also run there functions that need to ran every frame. So we start a loop like this: @main.window.loop def loop(): ... # Code goes here Drawing image So we still need to draw our image after loading it, and you can do that easily inside a loop like this: @main.window.loop def loop(): main.image.draw_image(image) As you see we have a draw_image function in our loop with the image loaded image as argument. Full code Here is our full code that we could through this tutorial: import fusionengine as fusion main = fusion.Main() window = main.window.new_window(\"Example: 1\", 600, 600) image = main.image.open_image(window, main.debug.DEBUGIMAGE, 0, 0, 600, 600) @main.window.loop def loop(): main.image.draw_image(image) Ending This was our basic tutorial to images. There are (or will be) more tutorials, so check them our. Or otherwise you could check our docs for more information. Happy coding!","title":"Basic rendering tutorial"},{"location":"tutorials/basics/#basic-rendering-tutorial","text":"","title":"Basic rendering tutorial"},{"location":"tutorials/basics/#introduction","text":"This is a tutorial so you would understand the basics of the engine and how it works. In this tutorial we will learn how to render a window and draw some images on it. If you want to learn more, then go to our docs and select wiki. This tutorial also expect you to have everything setup, if not, head over to tutorial 1: setting everything up The Final Product Should Look like This:","title":"Introduction"},{"location":"tutorials/basics/#creating-a-window","text":"So if you read tutorial 1 you know we have the main variable running our engine object. So now we create a window with the help of that main object: window = main.window.new_window(\"Tutorial 2\", 600, 600) The first argument that we give our function is our title, second argument is our width and third one is height","title":"Creating a window"},{"location":"tutorials/basics/#pre-loading-image","text":"We will now pre-load a image so we can draw it later on our window. We do it like this: image = main.image.open_image(window, main.debug.DEBUGIMAGE, 0, 0, 600, 600) Fist argument is our window, second is our image path, third is our x position, fourth is our y position, fifth is our width and sixth is our height. As you maybe see were using main.debug.DEBUGIMAGE, which is a build in image into our engine for testing purposes. We will use it for our tutorial","title":"Pre-loading image"},{"location":"tutorials/basics/#starting-a-loop","text":"A loop is basicly what lets our window be open the whole time and not be automaticly closed. You also run there functions that need to ran every frame. So we start a loop like this: @main.window.loop def loop(): ... # Code goes here","title":"Starting a loop"},{"location":"tutorials/basics/#drawing-image","text":"So we still need to draw our image after loading it, and you can do that easily inside a loop like this: @main.window.loop def loop(): main.image.draw_image(image) As you see we have a draw_image function in our loop with the image loaded image as argument.","title":"Drawing image"},{"location":"tutorials/basics/#full-code","text":"Here is our full code that we could through this tutorial: import fusionengine as fusion main = fusion.Main() window = main.window.new_window(\"Example: 1\", 600, 600) image = main.image.open_image(window, main.debug.DEBUGIMAGE, 0, 0, 600, 600) @main.window.loop def loop(): main.image.draw_image(image)","title":"Full code"},{"location":"tutorials/basics/#ending","text":"This was our basic tutorial to images. There are (or will be) more tutorials, so check them our. Or otherwise you could check our docs for more information. Happy coding!","title":"Ending"},{"location":"tutorials/platformer/","text":"Platformer tutorial This is a tutorial how to build a basic platformer using fusion-engine","title":"Platformer tutorial"},{"location":"tutorials/platformer/#platformer-tutorial","text":"This is a tutorial how to build a basic platformer using fusion-engine","title":"Platformer tutorial"},{"location":"tutorials/setup/","text":"Setting everything up Introduction Welcome to our fusion-engine tutorials! Here you can learn about our engine and how to use it! This will go easy over everything you need to know to start programming with fusion! So this tutorial is made to setup everything, so you can start programming with fusion-engine! But if you already have everything setup then head over to tutorial 2: basic rendering Installing So firstly we need to install fusion-engine. We have our package hoster at pypi so you can easly install it by running: pip install fusion-engine Importing Now we need to import fusion-engine to our project. We do it like this: import fusionengine as engine Setting up So after inporting we need to do some setup. We need to create a object of our engine so we can use it. We do it like this: main = engine.Main() Ending That was it, our engine is now setup! Now every function works from our main variable, as you might see later.","title":"Setting everything up"},{"location":"tutorials/setup/#setting-everything-up","text":"","title":"Setting everything up"},{"location":"tutorials/setup/#introduction","text":"Welcome to our fusion-engine tutorials! Here you can learn about our engine and how to use it! This will go easy over everything you need to know to start programming with fusion! So this tutorial is made to setup everything, so you can start programming with fusion-engine! But if you already have everything setup then head over to tutorial 2: basic rendering","title":"Introduction"},{"location":"tutorials/setup/#installing","text":"So firstly we need to install fusion-engine. We have our package hoster at pypi so you can easly install it by running: pip install fusion-engine","title":"Installing"},{"location":"tutorials/setup/#importing","text":"Now we need to import fusion-engine to our project. We do it like this: import fusionengine as engine","title":"Importing"},{"location":"tutorials/setup/#setting-up","text":"So after inporting we need to do some setup. We need to create a object of our engine so we can use it. We do it like this: main = engine.Main()","title":"Setting up"},{"location":"tutorials/setup/#ending","text":"That was it, our engine is now setup! Now every function works from our main variable, as you might see later.","title":"Ending"},{"location":"wiki/","text":"Wiki Welcome to our wiki! Here you will find all function with their small explanaion and how to use them. We have seperated the wiki in some parts, like main wiki, color wiki and more. You choose one you need. Can't find something? Then try looking in the main wiki So have luck! Table of contents Main Wiki External tools Wiki Color Wiki Font Wiki Key Wiki Math Wiki","title":"Wiki"},{"location":"wiki/#wiki","text":"Welcome to our wiki! Here you will find all function with their small explanaion and how to use them. We have seperated the wiki in some parts, like main wiki, color wiki and more. You choose one you need. Can't find something? Then try looking in the main wiki So have luck!","title":"Wiki"},{"location":"wiki/#table-of-contents","text":"Main Wiki External tools Wiki Color Wiki Font Wiki Key Wiki Math Wiki","title":"Table of contents"},{"location":"wiki/color/","text":"Using colors Our engine has some build in predefined colors so it's a bit easier for you with colors, to acess the colors you run: main.color.WHITE All colors The color name is always in capital letters. Here are all predefined colors: BLUE = (0, 0, 255, 255) BLACK = (0, 0, 0, 255) WHITE = (255, 255, 255, 255) GREEN = (255, 255, 255, 255) RED = (255, 0, 0, 255) YELLOW = (255, 255, 0, 255) PURPLE = (255, 0, 255, 255) CYAN = (0, 255, 255, 255) ORANGE = (255, 165, 0, 255) GRAY = (128, 128, 128, 255) BROWN = (165, 42, 42, 255) PINK = (255, 192, 203, 255) MAGENTA = (255, 0, 255, 255) SILVER = (192, 192, 192, 255) GOLD = (255, 215, 0, 255) BRONZE = (205, 127, 50, 255) LIME = (0, 255, 0, 255) OLIVE = (128, 128, 0, 255) TEAL = (0, 128, 128, 255) NAVY = (0, 0, 128, 255) MAROON = (128, 0, 0, 255) INDIGO = (75, 0, 130, 255) TURQUOISE = (64, 224, 208, 255) VIOLET = (238, 130, 238, 255) AQUA = (0, 255, 255, 255) TAN = (210, 180, 140, 255) BEIGE = (245, 245, 220, 255) IVORY = (255, 255, 240, 255) LAVENDER = (230, 230, 250, 255) MINT = (189, 252, 201, 255) SALMON = (250, 128, 114, 255) SCARLET = (255, 36, 0, 255) TEAL = (0, 128, 128, 255) TOMATO = (255, 99, 71, 255) CRIMSON = (220, 20, 60, 255) AZURE = (0, 128, 255, 255) Custom color If you want your own color, you just give your function a tuple argument with RGBA colors, here is an example: main.draw.drawRect(window, 100, 100, 400, 400, (255, 255, 255, 0)) Hex to rgba If you have a hex color and want to convert it to rgba you can use this function: main.colortools.hex_to_rgba(hex)","title":"Color"},{"location":"wiki/color/#using-colors","text":"Our engine has some build in predefined colors so it's a bit easier for you with colors, to acess the colors you run: main.color.WHITE","title":"Using colors"},{"location":"wiki/color/#all-colors","text":"The color name is always in capital letters. Here are all predefined colors: BLUE = (0, 0, 255, 255) BLACK = (0, 0, 0, 255) WHITE = (255, 255, 255, 255) GREEN = (255, 255, 255, 255) RED = (255, 0, 0, 255) YELLOW = (255, 255, 0, 255) PURPLE = (255, 0, 255, 255) CYAN = (0, 255, 255, 255) ORANGE = (255, 165, 0, 255) GRAY = (128, 128, 128, 255) BROWN = (165, 42, 42, 255) PINK = (255, 192, 203, 255) MAGENTA = (255, 0, 255, 255) SILVER = (192, 192, 192, 255) GOLD = (255, 215, 0, 255) BRONZE = (205, 127, 50, 255) LIME = (0, 255, 0, 255) OLIVE = (128, 128, 0, 255) TEAL = (0, 128, 128, 255) NAVY = (0, 0, 128, 255) MAROON = (128, 0, 0, 255) INDIGO = (75, 0, 130, 255) TURQUOISE = (64, 224, 208, 255) VIOLET = (238, 130, 238, 255) AQUA = (0, 255, 255, 255) TAN = (210, 180, 140, 255) BEIGE = (245, 245, 220, 255) IVORY = (255, 255, 240, 255) LAVENDER = (230, 230, 250, 255) MINT = (189, 252, 201, 255) SALMON = (250, 128, 114, 255) SCARLET = (255, 36, 0, 255) TEAL = (0, 128, 128, 255) TOMATO = (255, 99, 71, 255) CRIMSON = (220, 20, 60, 255) AZURE = (0, 128, 255, 255)","title":"All colors"},{"location":"wiki/color/#custom-color","text":"If you want your own color, you just give your function a tuple argument with RGBA colors, here is an example: main.draw.drawRect(window, 100, 100, 400, 400, (255, 255, 255, 0))","title":"Custom color"},{"location":"wiki/color/#hex-to-rgba","text":"If you have a hex color and want to convert it to rgba you can use this function: main.colortools.hex_to_rgba(hex)","title":"Hex to rgba"},{"location":"wiki/external/","text":"External tools Using pygame If you cant find some function you need in this engine, the you could use pygame as the engine is build on pygame. You dont need to import pygame, as that can make so issues, you just use: fusion.pg Make sure your not using main (the initialized class) but the module itself. Using Codon Compiler So you heard of codon , a python compiler with can compile your python code to machine code, which makes your code a lot faster But how do you use it? Well, its easy! You just install it and then modify these things in your code: Imports: from python import fusionengine as fusion Loop: You need to modify our loop to support codon, so you need to change it to this: while main.window.running(window): ... # Your own loop thing You may reconise this type of while loop from the main wiki as your second option.","title":"External tools"},{"location":"wiki/external/#external-tools","text":"","title":"External tools"},{"location":"wiki/external/#using-pygame","text":"If you cant find some function you need in this engine, the you could use pygame as the engine is build on pygame. You dont need to import pygame, as that can make so issues, you just use: fusion.pg Make sure your not using main (the initialized class) but the module itself.","title":"Using pygame"},{"location":"wiki/external/#using-codon-compiler","text":"So you heard of codon , a python compiler with can compile your python code to machine code, which makes your code a lot faster But how do you use it? Well, its easy! You just install it and then modify these things in your code: Imports: from python import fusionengine as fusion Loop: You need to modify our loop to support codon, so you need to change it to this: while main.window.running(window): ... # Your own loop thing You may reconise this type of while loop from the main wiki as your second option.","title":"Using Codon Compiler"},{"location":"wiki/fonts/","text":"Fonts Our engine has some build in fonts, the following fonts are available: Nunito Sans Light: main.fonts.NUNITO_LIGHT Saira Condensed Extrabold: main.fonts.SAIRACONDENSED_EXTRABOLD There will be more fonts available in the future.","title":"Fonts"},{"location":"wiki/fonts/#fonts","text":"Our engine has some build in fonts, the following fonts are available: Nunito Sans Light: main.fonts.NUNITO_LIGHT Saira Condensed Extrabold: main.fonts.SAIRACONDENSED_EXTRABOLD There will be more fonts available in the future.","title":"Fonts"},{"location":"wiki/keys/","text":"Keys We use PySDL2 for this, here are our key bindings to the sdl2 keys: KEY_UNKNOWN = sdl2.SDLK_UNKNOWN KEY_RETURN = sdl2.SDLK_RETURN KEY_ESCAPE = sdl2.SDLK_ESCAPE KEY_BACKSPACE = sdl2.SDLK_BACKSPACE KEY_TAB = sdl2.SDLK_TAB KEY_SPACE = sdl2.SDLK_SPACE KEY_EXCLAIM = sdl2.SDLK_EXCLAIM KEY_QUOTEDBL = sdl2.SDLK_QUOTEDBL KEY_HASH = sdl2.SDLK_HASH KEY_PERCENT = sdl2.SDLK_PERCENT KEY_DOLLAR = sdl2.SDLK_DOLLAR KEY_AMPERSAND = sdl2.SDLK_AMPERSAND KEY_QUOTE = sdl2.SDLK_QUOTE KEY_LEFTPAREN = sdl2.SDLK_LEFTPAREN KEY_RIGHTPAREN = sdl2.SDLK_RIGHTPAREN KEY_ASTERISK = sdl2.SDLK_ASTERISK KEY_PLUS = sdl2.SDLK_PLUS KEY_COMMA = sdl2.SDLK_COMMA KEY_MINUS = sdl2.SDLK_MINUS KEY_PERIOD = sdl2.SDLK_PERIOD KEY_SLASH = sdl2.SDLK_SLASH KEY_0 = sdl2.SDLK_0 KEY_1 = sdl2.SDLK_1 KEY_2 = sdl2.SDLK_2 KEY_3 = sdl2.SDLK_3 KEY_4 = sdl2.SDLK_4 KEY_5 = sdl2.SDLK_5 KEY_6 = sdl2.SDLK_6 KEY_7 = sdl2.SDLK_7 KEY_8 = sdl2.SDLK_8 KEY_9 = sdl2.SDLK_9 KEY_COLON = sdl2.SDLK_COLON KEY_SEMICOLON = sdl2.SDLK_SEMICOLON KEY_LESS = sdl2.SDLK_LESS KEY_EQUALS = sdl2.SDLK_EQUALS KEY_GREATER = sdl2.SDLK_GREATER KEY_QUESTION = sdl2.SDLK_QUESTION KEY_AT = sdl2.SDLK_AT KEY_LEFTBRACKET = sdl2.SDLK_LEFTBRACKET KEY_BACKSLASH = sdl2.SDLK_BACKSLASH KEY_RIGHTBRACKET = sdl2.SDLK_RIGHTBRACKET KEY_CARET = sdl2.SDLK_CARET KEY_UNDERSCORE = sdl2.SDLK_UNDERSCORE KEY_BACKQUOTE = sdl2.SDLK_BACKQUOTE KEY_a = sdl2.SDLK_a KEY_b = sdl2.SDLK_b KEY_c = sdl2.SDLK_c KEY_d = sdl2.SDLK_d KEY_e = sdl2.SDLK_e KEY_f = sdl2.SDLK_f KEY_g = sdl2.SDLK_g KEY_h = sdl2.SDLK_h KEY_i = sdl2.SDLK_i KEY_j = sdl2.SDLK_j KEY_k = sdl2.SDLK_k KEY_l = sdl2.SDLK_l KEY_m = sdl2.SDLK_m KEY_n = sdl2.SDLK_n KEY_o = sdl2.SDLK_o KEY_p = sdl2.SDLK_p KEY_q = sdl2.SDLK_q KEY_r = sdl2.SDLK_r KEY_s = sdl2.SDLK_s KEY_t = sdl2.SDLK_t KEY_u = sdl2.SDLK_u KEY_v = sdl2.SDLK_v KEY_w = sdl2.SDLK_w KEY_x = sdl2.SDLK_x KEY_y = sdl2.SDLK_y KEY_z = sdl2.SDLK_z KEY_CAPSLOCK = sdl2.SDLK_CAPSLOCK KEY_F1 = sdl2.SDLK_F1 KEY_F2 = sdl2.SDLK_F2 KEY_F3 = sdl2.SDLK_F3 KEY_F4 = sdl2.SDLK_F4 KEY_F5 = sdl2.SDLK_F5 KEY_F6 = sdl2.SDLK_F6 KEY_F7 = sdl2.SDLK_F7 KEY_F8 = sdl2.SDLK_F8 KEY_F9 = sdl2.SDLK_F9 KEY_F10 = sdl2.SDLK_F10 KEY_F11 = sdl2.SDLK_F11 KEY_F12 = sdl2.SDLK_F12 KEY_PRINTSCREEN = sdl2.SDLK_PRINTSCREEN KEY_SCROLLLOCK = sdl2.SDLK_SCROLLLOCK KEY_PAUSE = sdl2.SDLK_PAUSE KEY_INSERT = sdl2.SDLK_INSERT KEY_HOME = sdl2.SDLK_HOME KEY_PAGEUP = sdl2.SDLK_PAGEUP KEY_DELETE = sdl2.SDLK_DELETE KEY_END = sdl2.SDLK_END KEY_PAGEDOWN = sdl2.SDLK_PAGEDOWN KEY_RIGHT = sdl2.SDLK_RIGHT KEY_LEFT = sdl2.SDLK_LEFT KEY_DOWN = sdl2.SDLK_DOWN KEY_UP = sdl2.SDLK_UP KEY_NUMLOCKCLEAR = sdl2.SDLK_NUMLOCKCLEAR KEY_KP_DIVIDE = sdl2.SDLK_KP_DIVIDE KEY_KP_MULTIPLY = sdl2.SDLK_KP_MULTIPLY KEY_KP_MINUS = sdl2.SDLK_KP_MINUS KEY_KP_PLUS = sdl2.SDLK_KP_PLUS KEY_KP_ENTER = sdl2.SDLK_KP_ENTER KEY_KP_1 = sdl2.SDLK_KP_1 KEY_KP_2 = sdl2.SDLK_KP_2 KEY_KP_3 = sdl2.SDLK_KP_3 KEY_KP_4 = sdl2.SDLK_KP_4 KEY_KP_5 = sdl2.SDLK_KP_5 KEY_KP_6 = sdl2.SDLK_KP_6 KEY_KP_7 = sdl2.SDLK_KP_7 KEY_KP_8 = sdl2.SDLK_KP_8 KEY_KP_9 = sdl2.SDLK_KP_9 KEY_KP_0 = sdl2.SDLK_KP_0 KEY_KP_PERIOD = sdl2.SDLK_KP_PERIOD KEY_APPLICATION = sdl2.SDLK_APPLICATION KEY_POWER = sdl2.SDLK_POWER KEY_KP_EQUALS = sdl2.SDLK_KP_EQUALS KEY_F13 = sdl2.SDLK_F13 KEY_F14 = sdl2.SDLK_F14 KEY_F15 = sdl2.SDLK_F15 KEY_F16 = sdl2.SDLK_F16 KEY_F17 = sdl2.SDLK_F17 KEY_F18 = sdl2.SDLK_F18 KEY_F19 = sdl2.SDLK_F19 KEY_F20 = sdl2.SDLK_F20 KEY_F21 = sdl2.SDLK_F21 KEY_F22 = sdl2.SDLK_F22 KEY_F23 = sdl2.SDLK_F23 KEY_F24 = sdl2.SDLK_F24 KEY_EXECUTE = sdl2.SDLK_EXECUTE KEY_HELP = sdl2.SDLK_HELP KEY_MENU = sdl2.SDLK_MENU KEY_SELECT = sdl2.SDLK_SELECT KEY_STOP = sdl2.SDLK_STOP KEY_AGAIN = sdl2.SDLK_AGAIN KEY_UNDO = sdl2.SDLK_UNDO KEY_CUT = sdl2.SDLK_CUT KEY_COPY = sdl2.SDLK_COPY KEY_PASTE = sdl2.SDLK_PASTE KEY_FIND = sdl2.SDLK_FIND KEY_MUTE = sdl2.SDLK_MUTE KEY_VOLUMEUP = sdl2.SDLK_VOLUMEUP KEY_VOLUMEDOWN = sdl2.SDLK_VOLUMEDOWN KEY_KP_COMMA = sdl2.SDLK_KP_COMMA KEY_KP_EQUALSAS400 = sdl2.SDLK_KP_EQUALSAS400 KEY_ALTERASE = sdl2.SDLK_ALTERASE KEY_SYSREQ = sdl2.SDLK_SYSREQ KEY_CANCEL = sdl2.SDLK_CANCEL KEY_CLEAR = sdl2.SDLK_CLEAR KEY_PRIOR = sdl2.SDLK_PRIOR KEY_RETURN2 = sdl2.SDLK_RETURN2 KEY_SEPARATOR = sdl2.SDLK_SEPARATOR KEY_OUT = sdl2.SDLK_OUT KEY_OPER = sdl2.SDLK_OPER KEY_CLEARAGAIN = sdl2.SDLK_CLEARAGAIN KEY_CRSEL = sdl2.SDLK_CRSEL KEY_EXSEL = sdl2.SDLK_EXSEL KEY_KP_00 = sdl2.SDLK_KP_00 KEY_KP_000 = sdl2.SDLK_KP_000 KEY_THOUSANDSSEPARATOR = sdl2.SDLK_THOUSANDSSEPARATOR KEY_DECIMALSEPARATOR = sdl2.SDLK_DECIMALSEPARATOR KEY_CURRENCYUNIT = sdl2.SDLK_CURRENCYUNIT KEY_CURRENCYSUBUNIT = sdl2.SDLK_CURRENCYSUBUNIT KEY_KP_LEFTPAREN = sdl2.SDLK_KP_LEFTPAREN KEY_KP_RIGHTPAREN = sdl2.SDLK_KP_RIGHTPAREN KEY_KP_LEFTBRACE = sdl2.SDLK_KP_LEFTBRACE KEY_KP_RIGHTBRACE = sdl2.SDLK_KP_RIGHTBRACE KEY_KP_TAB = sdl2.SDLK_KP_TAB KEY_KP_BACKSPACE = sdl2.SDLK_KP_BACKSPACE KEY_KP_A = sdl2.SDLK_KP_A KEY_KP_B = sdl2.SDLK_KP_B KEY_KP_C = sdl2.SDLK_KP_C KEY_KP_D = sdl2.SDLK_KP_D KEY_KP_E = sdl2.SDLK_KP_E KEY_KP_F = sdl2.SDLK_KP_F KEY_KP_XOR = sdl2.SDLK_KP_XOR KEY_KP_POWER = sdl2.SDLK_KP_POWER KEY_KP_PERCENT = sdl2.SDLK_KP_PERCENT KEY_KP_LESS = sdl2.SDLK_KP_LESS KEY_KP_GREATER = sdl2.SDLK_KP_GREATER KEY_KP_AMPERSAND = sdl2.SDLK_KP_AMPERSAND KEY_KP_DBLAMPERSAND = sdl2.SDLK_KP_DBLAMPERSAND KEY_KP_VERTICALBAR = sdl2.SDLK_KP_VERTICALBAR KEY_KP_DBLVERTICALBAR = sdl2.SDLK_KP_DBLVERTICALBAR KEY_KP_COLON = sdl2.SDLK_KP_COLON KEY_KP_HASH = sdl2.SDLK_KP_HASH KEY_KP_SPACE = sdl2.SDLK_KP_SPACE KEY_KP_AT = sdl2.SDLK_KP_AT KEY_KP_EXCLAM = sdl2.SDLK_KP_EXCLAM KEY_KP_MEMSTORE = sdl2.SDLK_KP_MEMSTORE KEY_KP_MEMRECALL = sdl2.SDLK_KP_MEMRECALL KEY_KP_MEMCLEAR = sdl2.SDLK_KP_MEMCLEAR KEY_KP_MEMADD = sdl2.SDLK_KP_MEMADD KEY_KP_MEMSUBTRACT = sdl2.SDLK_KP_MEMSUBTRACT KEY_KP_MEMMULTIPLY = sdl2.SDLK_KP_MEMMULTIPLY KEY_KP_MEMDIVIDE = sdl2.SDLK_KP_MEMDIVIDE KEY_KP_PLUSMINUS = sdl2.SDLK_KP_PLUSMINUS KEY_KP_CLEAR = sdl2.SDLK_KP_CLEAR KEY_KP_CLEARENTRY = sdl2.SDLK_KP_CLEARENTRY KEY_KP_BINARY = sdl2.SDLK_KP_BINARY KEY_KP_OCTAL = sdl2.SDLK_KP_OCTAL KEY_KP_DECIMAL = sdl2.SDLK_KP_DECIMAL KEY_KP_HEXADECIMAL = sdl2.SDLK_KP_HEXADECIMAL KEY_LCTRL = sdl2.SDLK_LCTRL KEY_LSHIFT = sdl2.SDLK_LSHIFT KEY_LALT = sdl2.SDLK_LALT KEY_LGUI = sdl2.SDLK_LGUI KEY_RCTRL = sdl2.SDLK_RCTRL KEY_RSHIFT = sdl2.SDLK_RSHIFT KEY_RALT = sdl2.SDLK_RALT KEY_RGUI = sdl2.SDLK_RGUI KEY_MODE = sdl2.SDLK_MODE KEY_AUDIONEXT = sdl2.SDLK_AUDIONEXT KEY_AUDIOPREV = sdl2.SDLK_AUDIOPREV KEY_AUDIOSTOP = sdl2.SDLK_AUDIOSTOP KEY_AUDIOPLAY = sdl2.SDLK_AUDIOPLAY KEY_AUDIOMUTE = sdl2.SDLK_AUDIOMUTE KEY_MEDIASELECT = sdl2.SDLK_MEDIASELECT KEY_WWW = sdl2.SDLK_WWW KEY_MAIL = sdl2.SDLK_MAIL KEY_CALCULATOR = sdl2.SDLK_CALCULATOR KEY_COMPUTER = sdl2.SDLK_COMPUTER KEY_AC_SEARCH = sdl2.SDLK_AC_SEARCH KEY_AC_HOME = sdl2.SDLK_AC_HOME KEY_AC_BACK = sdl2.SDLK_AC_BACK KEY_AC_FORWARD = sdl2.SDLK_AC_FORWARD KEY_AC_STOP = sdl2.SDLK_AC_STOP KEY_AC_REFRESH = sdl2.SDLK_AC_REFRESH KEY_AC_BOOKMARKS = sdl2.SDLK_AC_BOOKMARKS KEY_BRIGHTNESSDOWN = sdl2.SDLK_BRIGHTNESSDOWN KEY_BRIGHTNESSUP = sdl2.SDLK_BRIGHTNESSUP KEY_DISPLAYSWITCH = sdl2.SDLK_DISPLAYSWITCH KEY_KBDILLUMTOGGLE = sdl2.SDLK_KBDILLUMTOGGLE KEY_KBDILLUMDOWN = sdl2.SDLK_KBDILLUMDOWN KEY_KBDILLUMUP = sdl2.SDLK_KBDILLUMUP KEY_EJECT = sdl2.SDLK_EJECT KEY_SLEEP = sdl2.SDLK_SLEEP","title":"Keys"},{"location":"wiki/keys/#keys","text":"We use PySDL2 for this, here are our key bindings to the sdl2 keys: KEY_UNKNOWN = sdl2.SDLK_UNKNOWN KEY_RETURN = sdl2.SDLK_RETURN KEY_ESCAPE = sdl2.SDLK_ESCAPE KEY_BACKSPACE = sdl2.SDLK_BACKSPACE KEY_TAB = sdl2.SDLK_TAB KEY_SPACE = sdl2.SDLK_SPACE KEY_EXCLAIM = sdl2.SDLK_EXCLAIM KEY_QUOTEDBL = sdl2.SDLK_QUOTEDBL KEY_HASH = sdl2.SDLK_HASH KEY_PERCENT = sdl2.SDLK_PERCENT KEY_DOLLAR = sdl2.SDLK_DOLLAR KEY_AMPERSAND = sdl2.SDLK_AMPERSAND KEY_QUOTE = sdl2.SDLK_QUOTE KEY_LEFTPAREN = sdl2.SDLK_LEFTPAREN KEY_RIGHTPAREN = sdl2.SDLK_RIGHTPAREN KEY_ASTERISK = sdl2.SDLK_ASTERISK KEY_PLUS = sdl2.SDLK_PLUS KEY_COMMA = sdl2.SDLK_COMMA KEY_MINUS = sdl2.SDLK_MINUS KEY_PERIOD = sdl2.SDLK_PERIOD KEY_SLASH = sdl2.SDLK_SLASH KEY_0 = sdl2.SDLK_0 KEY_1 = sdl2.SDLK_1 KEY_2 = sdl2.SDLK_2 KEY_3 = sdl2.SDLK_3 KEY_4 = sdl2.SDLK_4 KEY_5 = sdl2.SDLK_5 KEY_6 = sdl2.SDLK_6 KEY_7 = sdl2.SDLK_7 KEY_8 = sdl2.SDLK_8 KEY_9 = sdl2.SDLK_9 KEY_COLON = sdl2.SDLK_COLON KEY_SEMICOLON = sdl2.SDLK_SEMICOLON KEY_LESS = sdl2.SDLK_LESS KEY_EQUALS = sdl2.SDLK_EQUALS KEY_GREATER = sdl2.SDLK_GREATER KEY_QUESTION = sdl2.SDLK_QUESTION KEY_AT = sdl2.SDLK_AT KEY_LEFTBRACKET = sdl2.SDLK_LEFTBRACKET KEY_BACKSLASH = sdl2.SDLK_BACKSLASH KEY_RIGHTBRACKET = sdl2.SDLK_RIGHTBRACKET KEY_CARET = sdl2.SDLK_CARET KEY_UNDERSCORE = sdl2.SDLK_UNDERSCORE KEY_BACKQUOTE = sdl2.SDLK_BACKQUOTE KEY_a = sdl2.SDLK_a KEY_b = sdl2.SDLK_b KEY_c = sdl2.SDLK_c KEY_d = sdl2.SDLK_d KEY_e = sdl2.SDLK_e KEY_f = sdl2.SDLK_f KEY_g = sdl2.SDLK_g KEY_h = sdl2.SDLK_h KEY_i = sdl2.SDLK_i KEY_j = sdl2.SDLK_j KEY_k = sdl2.SDLK_k KEY_l = sdl2.SDLK_l KEY_m = sdl2.SDLK_m KEY_n = sdl2.SDLK_n KEY_o = sdl2.SDLK_o KEY_p = sdl2.SDLK_p KEY_q = sdl2.SDLK_q KEY_r = sdl2.SDLK_r KEY_s = sdl2.SDLK_s KEY_t = sdl2.SDLK_t KEY_u = sdl2.SDLK_u KEY_v = sdl2.SDLK_v KEY_w = sdl2.SDLK_w KEY_x = sdl2.SDLK_x KEY_y = sdl2.SDLK_y KEY_z = sdl2.SDLK_z KEY_CAPSLOCK = sdl2.SDLK_CAPSLOCK KEY_F1 = sdl2.SDLK_F1 KEY_F2 = sdl2.SDLK_F2 KEY_F3 = sdl2.SDLK_F3 KEY_F4 = sdl2.SDLK_F4 KEY_F5 = sdl2.SDLK_F5 KEY_F6 = sdl2.SDLK_F6 KEY_F7 = sdl2.SDLK_F7 KEY_F8 = sdl2.SDLK_F8 KEY_F9 = sdl2.SDLK_F9 KEY_F10 = sdl2.SDLK_F10 KEY_F11 = sdl2.SDLK_F11 KEY_F12 = sdl2.SDLK_F12 KEY_PRINTSCREEN = sdl2.SDLK_PRINTSCREEN KEY_SCROLLLOCK = sdl2.SDLK_SCROLLLOCK KEY_PAUSE = sdl2.SDLK_PAUSE KEY_INSERT = sdl2.SDLK_INSERT KEY_HOME = sdl2.SDLK_HOME KEY_PAGEUP = sdl2.SDLK_PAGEUP KEY_DELETE = sdl2.SDLK_DELETE KEY_END = sdl2.SDLK_END KEY_PAGEDOWN = sdl2.SDLK_PAGEDOWN KEY_RIGHT = sdl2.SDLK_RIGHT KEY_LEFT = sdl2.SDLK_LEFT KEY_DOWN = sdl2.SDLK_DOWN KEY_UP = sdl2.SDLK_UP KEY_NUMLOCKCLEAR = sdl2.SDLK_NUMLOCKCLEAR KEY_KP_DIVIDE = sdl2.SDLK_KP_DIVIDE KEY_KP_MULTIPLY = sdl2.SDLK_KP_MULTIPLY KEY_KP_MINUS = sdl2.SDLK_KP_MINUS KEY_KP_PLUS = sdl2.SDLK_KP_PLUS KEY_KP_ENTER = sdl2.SDLK_KP_ENTER KEY_KP_1 = sdl2.SDLK_KP_1 KEY_KP_2 = sdl2.SDLK_KP_2 KEY_KP_3 = sdl2.SDLK_KP_3 KEY_KP_4 = sdl2.SDLK_KP_4 KEY_KP_5 = sdl2.SDLK_KP_5 KEY_KP_6 = sdl2.SDLK_KP_6 KEY_KP_7 = sdl2.SDLK_KP_7 KEY_KP_8 = sdl2.SDLK_KP_8 KEY_KP_9 = sdl2.SDLK_KP_9 KEY_KP_0 = sdl2.SDLK_KP_0 KEY_KP_PERIOD = sdl2.SDLK_KP_PERIOD KEY_APPLICATION = sdl2.SDLK_APPLICATION KEY_POWER = sdl2.SDLK_POWER KEY_KP_EQUALS = sdl2.SDLK_KP_EQUALS KEY_F13 = sdl2.SDLK_F13 KEY_F14 = sdl2.SDLK_F14 KEY_F15 = sdl2.SDLK_F15 KEY_F16 = sdl2.SDLK_F16 KEY_F17 = sdl2.SDLK_F17 KEY_F18 = sdl2.SDLK_F18 KEY_F19 = sdl2.SDLK_F19 KEY_F20 = sdl2.SDLK_F20 KEY_F21 = sdl2.SDLK_F21 KEY_F22 = sdl2.SDLK_F22 KEY_F23 = sdl2.SDLK_F23 KEY_F24 = sdl2.SDLK_F24 KEY_EXECUTE = sdl2.SDLK_EXECUTE KEY_HELP = sdl2.SDLK_HELP KEY_MENU = sdl2.SDLK_MENU KEY_SELECT = sdl2.SDLK_SELECT KEY_STOP = sdl2.SDLK_STOP KEY_AGAIN = sdl2.SDLK_AGAIN KEY_UNDO = sdl2.SDLK_UNDO KEY_CUT = sdl2.SDLK_CUT KEY_COPY = sdl2.SDLK_COPY KEY_PASTE = sdl2.SDLK_PASTE KEY_FIND = sdl2.SDLK_FIND KEY_MUTE = sdl2.SDLK_MUTE KEY_VOLUMEUP = sdl2.SDLK_VOLUMEUP KEY_VOLUMEDOWN = sdl2.SDLK_VOLUMEDOWN KEY_KP_COMMA = sdl2.SDLK_KP_COMMA KEY_KP_EQUALSAS400 = sdl2.SDLK_KP_EQUALSAS400 KEY_ALTERASE = sdl2.SDLK_ALTERASE KEY_SYSREQ = sdl2.SDLK_SYSREQ KEY_CANCEL = sdl2.SDLK_CANCEL KEY_CLEAR = sdl2.SDLK_CLEAR KEY_PRIOR = sdl2.SDLK_PRIOR KEY_RETURN2 = sdl2.SDLK_RETURN2 KEY_SEPARATOR = sdl2.SDLK_SEPARATOR KEY_OUT = sdl2.SDLK_OUT KEY_OPER = sdl2.SDLK_OPER KEY_CLEARAGAIN = sdl2.SDLK_CLEARAGAIN KEY_CRSEL = sdl2.SDLK_CRSEL KEY_EXSEL = sdl2.SDLK_EXSEL KEY_KP_00 = sdl2.SDLK_KP_00 KEY_KP_000 = sdl2.SDLK_KP_000 KEY_THOUSANDSSEPARATOR = sdl2.SDLK_THOUSANDSSEPARATOR KEY_DECIMALSEPARATOR = sdl2.SDLK_DECIMALSEPARATOR KEY_CURRENCYUNIT = sdl2.SDLK_CURRENCYUNIT KEY_CURRENCYSUBUNIT = sdl2.SDLK_CURRENCYSUBUNIT KEY_KP_LEFTPAREN = sdl2.SDLK_KP_LEFTPAREN KEY_KP_RIGHTPAREN = sdl2.SDLK_KP_RIGHTPAREN KEY_KP_LEFTBRACE = sdl2.SDLK_KP_LEFTBRACE KEY_KP_RIGHTBRACE = sdl2.SDLK_KP_RIGHTBRACE KEY_KP_TAB = sdl2.SDLK_KP_TAB KEY_KP_BACKSPACE = sdl2.SDLK_KP_BACKSPACE KEY_KP_A = sdl2.SDLK_KP_A KEY_KP_B = sdl2.SDLK_KP_B KEY_KP_C = sdl2.SDLK_KP_C KEY_KP_D = sdl2.SDLK_KP_D KEY_KP_E = sdl2.SDLK_KP_E KEY_KP_F = sdl2.SDLK_KP_F KEY_KP_XOR = sdl2.SDLK_KP_XOR KEY_KP_POWER = sdl2.SDLK_KP_POWER KEY_KP_PERCENT = sdl2.SDLK_KP_PERCENT KEY_KP_LESS = sdl2.SDLK_KP_LESS KEY_KP_GREATER = sdl2.SDLK_KP_GREATER KEY_KP_AMPERSAND = sdl2.SDLK_KP_AMPERSAND KEY_KP_DBLAMPERSAND = sdl2.SDLK_KP_DBLAMPERSAND KEY_KP_VERTICALBAR = sdl2.SDLK_KP_VERTICALBAR KEY_KP_DBLVERTICALBAR = sdl2.SDLK_KP_DBLVERTICALBAR KEY_KP_COLON = sdl2.SDLK_KP_COLON KEY_KP_HASH = sdl2.SDLK_KP_HASH KEY_KP_SPACE = sdl2.SDLK_KP_SPACE KEY_KP_AT = sdl2.SDLK_KP_AT KEY_KP_EXCLAM = sdl2.SDLK_KP_EXCLAM KEY_KP_MEMSTORE = sdl2.SDLK_KP_MEMSTORE KEY_KP_MEMRECALL = sdl2.SDLK_KP_MEMRECALL KEY_KP_MEMCLEAR = sdl2.SDLK_KP_MEMCLEAR KEY_KP_MEMADD = sdl2.SDLK_KP_MEMADD KEY_KP_MEMSUBTRACT = sdl2.SDLK_KP_MEMSUBTRACT KEY_KP_MEMMULTIPLY = sdl2.SDLK_KP_MEMMULTIPLY KEY_KP_MEMDIVIDE = sdl2.SDLK_KP_MEMDIVIDE KEY_KP_PLUSMINUS = sdl2.SDLK_KP_PLUSMINUS KEY_KP_CLEAR = sdl2.SDLK_KP_CLEAR KEY_KP_CLEARENTRY = sdl2.SDLK_KP_CLEARENTRY KEY_KP_BINARY = sdl2.SDLK_KP_BINARY KEY_KP_OCTAL = sdl2.SDLK_KP_OCTAL KEY_KP_DECIMAL = sdl2.SDLK_KP_DECIMAL KEY_KP_HEXADECIMAL = sdl2.SDLK_KP_HEXADECIMAL KEY_LCTRL = sdl2.SDLK_LCTRL KEY_LSHIFT = sdl2.SDLK_LSHIFT KEY_LALT = sdl2.SDLK_LALT KEY_LGUI = sdl2.SDLK_LGUI KEY_RCTRL = sdl2.SDLK_RCTRL KEY_RSHIFT = sdl2.SDLK_RSHIFT KEY_RALT = sdl2.SDLK_RALT KEY_RGUI = sdl2.SDLK_RGUI KEY_MODE = sdl2.SDLK_MODE KEY_AUDIONEXT = sdl2.SDLK_AUDIONEXT KEY_AUDIOPREV = sdl2.SDLK_AUDIOPREV KEY_AUDIOSTOP = sdl2.SDLK_AUDIOSTOP KEY_AUDIOPLAY = sdl2.SDLK_AUDIOPLAY KEY_AUDIOMUTE = sdl2.SDLK_AUDIOMUTE KEY_MEDIASELECT = sdl2.SDLK_MEDIASELECT KEY_WWW = sdl2.SDLK_WWW KEY_MAIL = sdl2.SDLK_MAIL KEY_CALCULATOR = sdl2.SDLK_CALCULATOR KEY_COMPUTER = sdl2.SDLK_COMPUTER KEY_AC_SEARCH = sdl2.SDLK_AC_SEARCH KEY_AC_HOME = sdl2.SDLK_AC_HOME KEY_AC_BACK = sdl2.SDLK_AC_BACK KEY_AC_FORWARD = sdl2.SDLK_AC_FORWARD KEY_AC_STOP = sdl2.SDLK_AC_STOP KEY_AC_REFRESH = sdl2.SDLK_AC_REFRESH KEY_AC_BOOKMARKS = sdl2.SDLK_AC_BOOKMARKS KEY_BRIGHTNESSDOWN = sdl2.SDLK_BRIGHTNESSDOWN KEY_BRIGHTNESSUP = sdl2.SDLK_BRIGHTNESSUP KEY_DISPLAYSWITCH = sdl2.SDLK_DISPLAYSWITCH KEY_KBDILLUMTOGGLE = sdl2.SDLK_KBDILLUMTOGGLE KEY_KBDILLUMDOWN = sdl2.SDLK_KBDILLUMDOWN KEY_KBDILLUMUP = sdl2.SDLK_KBDILLUMUP KEY_EJECT = sdl2.SDLK_EJECT KEY_SLEEP = sdl2.SDLK_SLEEP","title":"Keys"},{"location":"wiki/math/","text":"Types of PI in Fusion Engine These are used for certain miscellaneous math things. Full version of pi (3.141592653589793238462643383279502884197): main.math.PI A slightly smaller version that python's math library uses (3.141592653589793): main.math.SMALLERPI An extremely shortened version of pi (3.14): main.math.SMALLPI This allows you to get the floor value of a number. main.math.FLOOR(3.4) Euler's Number You can read more about it here. main.math.EULERNUMBER","title":"Math"},{"location":"wiki/math/#types-of-pi-in-fusion-engine","text":"These are used for certain miscellaneous math things. Full version of pi (3.141592653589793238462643383279502884197): main.math.PI A slightly smaller version that python's math library uses (3.141592653589793): main.math.SMALLERPI An extremely shortened version of pi (3.14): main.math.SMALLPI This allows you to get the floor value of a number. main.math.FLOOR(3.4)","title":"Types of PI in Fusion Engine"},{"location":"wiki/math/#eulers-number","text":"You can read more about it here. main.math.EULERNUMBER","title":"Euler's Number"},{"location":"wiki/wiki/","text":"Main Wiki Create window To create a window were thing are draw, then you need to use this: window = main.window.new_window(\"Example: 1\", 800, 600) Start loop In a loop you can draw things and it will run with the FPS that is setup. To start a loop, you have two choices: Choice 1: @main.window.loop def loop(): ... # Your own loop things Choice 2: while main.window.running(window): ... # Your own loop thing There is basically no difference, they all are doing the same thing, you use what you prefer. In our examples we use choice 1. Default message If you tried using our engine you may have encountered this message being printed to terminal: Fusion Engine 1.0.2 (Pygame-ce 2.3.0, Python 3.11.4) Welcome to Fusion Engine! https://github.com/dimkauzh/fusion-engine To disable this behavior, you just give the main class when initting this argument: message=False , like this: import fusionengine as fusion main = fusion.Main(\"message=False\") Set Background color If you want to set a background color, you use this function before all draw functions: main.draw.set_background_color(window, main.color.WHITE) DeltaTime if you want to access delta time, you use this: main.window.DELTATIME Predefined shapes We have some predefined shapes that can be used and be drew on the screen. Here are some: Rectangle: main.shape.new_rect(x, y, width, height, color) More shapes will be coming soon Window icon So you want to change the icon of your window? Well, its easy: main.window.change_icon(\"path_to_icon\") Set FPS To set the framerate of your window, you use this: main.window.set_fps(60) Vectors Vector2d If you want to create a 2d vector that stores x and y, then you do this: vector = main.vector.new_vector2d(10, 10) Draw a line To draw a line, you use this: # x1 y1 x2 y2 color main.draw.draw_line(window, 100, 100, 200, 200, main.color.BLUE) Draw rectangle If you just want to draw a rectangle to test or to use it for your game/app, then you have 3 options: Option one: just draw a rectangle main.draw.draw_rect(window, 100, 100, 400, 400, main.color.BLUE) Second option: draw predefined rectangle: main.draw.draw_own_rect(window, your_rect) Third option: Draw a rectangle of lines # x y w h color main.draw.draw_line_rect(window, 100, 100, 400, 400, main.color.BLUE) Draw image You first need to create a variable with your image and image data: image = main.image.open_image(window, main.DEBUGIMAGE, 100, 100, 400, 400) main.DEBUGIMAGE is an image that is included with the engine, so you can use it freely. Then you need to render it (In the best situation this will happen in your loop): main.image.draw_image(image) Create entity WARNING: PRE ALPHA (It's in really early stages) If you want a player or an enemy or some moving object in your game, you can use an entity, thats an object that helps you manage things in your game: # x y w h entity = main.body.Entity(window, 100, 100, 50, 50) Draw rect with entity If you want to draw a rectangle that is basically in your entity, then you do it like this: entity.draw_image(main.color.BLACK) Draw image with entity If you want to draw a image on your entity, then you do this: entity.image(\"image_path\") Sound Load sound To load a sound you do this: your_sound = main.sound.load_sound(\"path_to_sound\") Play sound To play your loaded sound you use this: your_sound.play() Stop sound To stop your playing sound you use this: your_sound.stop() Backround music To start playing background music you use this: main.sound.play_background_music(\"path_to_sound\") Storage system Init my_db = JsonStorage(\"my_db.json\") This how you initialize your json storage system Insertion my_db.insert({\"first_name\": \"john\", \"last_name\": \"wick\", \"gold\": 50}) my_db.insert({\"first_name\": \"alexander\", \"last_name\": \"wick\", \"gold\": 20}) The code inserts two entries into the storage. The inserted data contains information about individuals' first names, last names, and gold amounts. Reading Copy code my_db.search({\"last_name\": \"wick\"}) my_db.search({\"last_name\": \"wick\"}, get_index=True) The code demonstrates reading operations. It searches for entries with the last name \"wick\" and retrieves results with and without index information. Updating alex['gold'] += 20 my_db.update(alex_index, alex) The code showcases how to update data in the storage. In this case, it increases the \"gold\" value for an entry with the first name \"alexander\" by 20. Deleting my_db.delete(john_index) The code demonstrates deletion of data by removing an entry with the first name \"john\" from the storage. Saving to Disk my_db.save() The code shows how to save the modified data back to the storage file on disk. Keyboard input Keydown if you need keyboard input, then use this if statement with your own key (see key tab for all key names): if main.event.key_down(main.keys.KEY_a): print(\"Key A pressed\") Keydown once If you need keydown to be only once, then you use this: if main.event.key_down_once(main.keys.KEY_a): print(\"Key A pressed\") User Interface (UI) Creating a small ui for your application/game is easy with our following tools: Buttons To create a simple button we do the following: # Create the button outside the loop button = main.ui.button.new_button( window, main.shape.new_rect_button(200, 200, 200, 200), \"Hello World\" ) Button clicked If you want to check if your button was pressed or is being pressed, then you do that this way: @main.window.loop def loop(): if button.button_pressed(): ... # Do your stuff Rendering text If you want to render some fonts, then you can do it like this: Option 1: Render text with build into fusion or your own font # x y font size color main.ui.text.print_text(window, \"Your text\", 10, 10, main.fonts.NUNITO_LIGHT, 20, main.color.WHITE) Option 2: Render text with system font Its the same option 1, but you change the font to name of the font, like this: main.ui.text.print_text(window, \"Your text\", 10, 10, \"Arial\", 20, main.color.WHITE) Quit The quitting of the engine is done automaticly for you, so you dont have to worry about it. Force to quit If you want to force quit due to some reason, its pretty easy: main.window.force_quit()","title":"Main Wiki"},{"location":"wiki/wiki/#main-wiki","text":"","title":"Main Wiki"},{"location":"wiki/wiki/#create-window","text":"To create a window were thing are draw, then you need to use this: window = main.window.new_window(\"Example: 1\", 800, 600)","title":"Create window"},{"location":"wiki/wiki/#start-loop","text":"In a loop you can draw things and it will run with the FPS that is setup. To start a loop, you have two choices: Choice 1: @main.window.loop def loop(): ... # Your own loop things Choice 2: while main.window.running(window): ... # Your own loop thing There is basically no difference, they all are doing the same thing, you use what you prefer. In our examples we use choice 1.","title":"Start loop"},{"location":"wiki/wiki/#default-message","text":"If you tried using our engine you may have encountered this message being printed to terminal: Fusion Engine 1.0.2 (Pygame-ce 2.3.0, Python 3.11.4) Welcome to Fusion Engine! https://github.com/dimkauzh/fusion-engine To disable this behavior, you just give the main class when initting this argument: message=False , like this: import fusionengine as fusion main = fusion.Main(\"message=False\")","title":"Default message"},{"location":"wiki/wiki/#set-background-color","text":"If you want to set a background color, you use this function before all draw functions: main.draw.set_background_color(window, main.color.WHITE)","title":"Set Background color"},{"location":"wiki/wiki/#deltatime","text":"if you want to access delta time, you use this: main.window.DELTATIME","title":"DeltaTime"},{"location":"wiki/wiki/#predefined-shapes","text":"We have some predefined shapes that can be used and be drew on the screen. Here are some: Rectangle: main.shape.new_rect(x, y, width, height, color) More shapes will be coming soon","title":"Predefined shapes"},{"location":"wiki/wiki/#window-icon","text":"So you want to change the icon of your window? Well, its easy: main.window.change_icon(\"path_to_icon\")","title":"Window icon"},{"location":"wiki/wiki/#set-fps","text":"To set the framerate of your window, you use this: main.window.set_fps(60)","title":"Set FPS"},{"location":"wiki/wiki/#vectors","text":"","title":"Vectors"},{"location":"wiki/wiki/#vector2d","text":"If you want to create a 2d vector that stores x and y, then you do this: vector = main.vector.new_vector2d(10, 10)","title":"Vector2d"},{"location":"wiki/wiki/#draw-a-line","text":"To draw a line, you use this: # x1 y1 x2 y2 color main.draw.draw_line(window, 100, 100, 200, 200, main.color.BLUE)","title":"Draw a line"},{"location":"wiki/wiki/#draw-rectangle","text":"If you just want to draw a rectangle to test or to use it for your game/app, then you have 3 options: Option one: just draw a rectangle main.draw.draw_rect(window, 100, 100, 400, 400, main.color.BLUE) Second option: draw predefined rectangle: main.draw.draw_own_rect(window, your_rect) Third option: Draw a rectangle of lines # x y w h color main.draw.draw_line_rect(window, 100, 100, 400, 400, main.color.BLUE)","title":"Draw rectangle"},{"location":"wiki/wiki/#draw-image","text":"You first need to create a variable with your image and image data: image = main.image.open_image(window, main.DEBUGIMAGE, 100, 100, 400, 400) main.DEBUGIMAGE is an image that is included with the engine, so you can use it freely. Then you need to render it (In the best situation this will happen in your loop): main.image.draw_image(image)","title":"Draw image"},{"location":"wiki/wiki/#create-entity-warning-pre-alpha-its-in-really-early-stages","text":"If you want a player or an enemy or some moving object in your game, you can use an entity, thats an object that helps you manage things in your game: # x y w h entity = main.body.Entity(window, 100, 100, 50, 50)","title":"Create entity WARNING: PRE ALPHA (It's in really early stages)"},{"location":"wiki/wiki/#draw-rect-with-entity","text":"If you want to draw a rectangle that is basically in your entity, then you do it like this: entity.draw_image(main.color.BLACK)","title":"Draw rect with entity"},{"location":"wiki/wiki/#draw-image-with-entity","text":"If you want to draw a image on your entity, then you do this: entity.image(\"image_path\")","title":"Draw image with entity"},{"location":"wiki/wiki/#sound","text":"","title":"Sound"},{"location":"wiki/wiki/#load-sound","text":"To load a sound you do this: your_sound = main.sound.load_sound(\"path_to_sound\")","title":"Load sound"},{"location":"wiki/wiki/#play-sound","text":"To play your loaded sound you use this: your_sound.play()","title":"Play sound"},{"location":"wiki/wiki/#stop-sound","text":"To stop your playing sound you use this: your_sound.stop()","title":"Stop sound"},{"location":"wiki/wiki/#backround-music","text":"To start playing background music you use this: main.sound.play_background_music(\"path_to_sound\")","title":"Backround music"},{"location":"wiki/wiki/#storage-system","text":"","title":"Storage system"},{"location":"wiki/wiki/#init","text":"my_db = JsonStorage(\"my_db.json\") This how you initialize your json storage system","title":"Init"},{"location":"wiki/wiki/#insertion","text":"my_db.insert({\"first_name\": \"john\", \"last_name\": \"wick\", \"gold\": 50}) my_db.insert({\"first_name\": \"alexander\", \"last_name\": \"wick\", \"gold\": 20}) The code inserts two entries into the storage. The inserted data contains information about individuals' first names, last names, and gold amounts.","title":"Insertion"},{"location":"wiki/wiki/#reading","text":"Copy code my_db.search({\"last_name\": \"wick\"}) my_db.search({\"last_name\": \"wick\"}, get_index=True) The code demonstrates reading operations. It searches for entries with the last name \"wick\" and retrieves results with and without index information.","title":"Reading"},{"location":"wiki/wiki/#updating","text":"alex['gold'] += 20 my_db.update(alex_index, alex) The code showcases how to update data in the storage. In this case, it increases the \"gold\" value for an entry with the first name \"alexander\" by 20.","title":"Updating"},{"location":"wiki/wiki/#deleting","text":"my_db.delete(john_index) The code demonstrates deletion of data by removing an entry with the first name \"john\" from the storage.","title":"Deleting"},{"location":"wiki/wiki/#saving-to-disk","text":"my_db.save() The code shows how to save the modified data back to the storage file on disk.","title":"Saving to Disk"},{"location":"wiki/wiki/#keyboard-input","text":"","title":"Keyboard input"},{"location":"wiki/wiki/#keydown","text":"if you need keyboard input, then use this if statement with your own key (see key tab for all key names): if main.event.key_down(main.keys.KEY_a): print(\"Key A pressed\")","title":"Keydown"},{"location":"wiki/wiki/#keydown-once","text":"If you need keydown to be only once, then you use this: if main.event.key_down_once(main.keys.KEY_a): print(\"Key A pressed\")","title":"Keydown once"},{"location":"wiki/wiki/#user-interface-ui","text":"Creating a small ui for your application/game is easy with our following tools:","title":"User Interface (UI)"},{"location":"wiki/wiki/#buttons","text":"To create a simple button we do the following: # Create the button outside the loop button = main.ui.button.new_button( window, main.shape.new_rect_button(200, 200, 200, 200), \"Hello World\" )","title":"Buttons"},{"location":"wiki/wiki/#button-clicked","text":"If you want to check if your button was pressed or is being pressed, then you do that this way: @main.window.loop def loop(): if button.button_pressed(): ... # Do your stuff","title":"Button clicked"},{"location":"wiki/wiki/#rendering-text","text":"If you want to render some fonts, then you can do it like this: Option 1: Render text with build into fusion or your own font # x y font size color main.ui.text.print_text(window, \"Your text\", 10, 10, main.fonts.NUNITO_LIGHT, 20, main.color.WHITE) Option 2: Render text with system font Its the same option 1, but you change the font to name of the font, like this: main.ui.text.print_text(window, \"Your text\", 10, 10, \"Arial\", 20, main.color.WHITE)","title":"Rendering text"},{"location":"wiki/wiki/#quit","text":"The quitting of the engine is done automaticly for you, so you dont have to worry about it.","title":"Quit"},{"location":"wiki/wiki/#force-to-quit","text":"If you want to force quit due to some reason, its pretty easy: main.window.force_quit()","title":"Force to quit"}]} \ No newline at end of file diff --git a/sitemap.xml.gz b/sitemap.xml.gz index 5fb589d..0173b48 100644 Binary files a/sitemap.xml.gz and b/sitemap.xml.gz differ diff --git a/tutorials/index.html b/tutorials/index.html index aba66d9..37c2de6 100644 --- a/tutorials/index.html +++ b/tutorials/index.html @@ -67,7 +67,7 @@