This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
A simple snake game in odin and raylib | |
- Video: https://youtu.be/b0NLJBoTtvg | |
- Hot-reload template: https://github.com/karl-zylinski/odin-raylib-hot-reload-game-template | |
*/ | |
package main |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import "core:fmt" | |
import "core:math" | |
import "core:math/linalg" | |
import "core:math/rand" | |
import "core:slice" | |
import rl "vendor:raylib" | |
// MARK: Consts |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use bevy::diagnostic::{FrameTimeDiagnosticsPlugin, LogDiagnosticsPlugin}; | |
use bevy::prelude::*; | |
use bevy::window::close_on_esc; | |
const WW: f32 = 1200.0; | |
const WH: f32 = 900.0; | |
const BG_COLOR: (u8, u8, u8) = (25, 20, 43); | |
fn main() { | |
App::new() |