Skip to content

OrcThinker/OdinPlayground

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Odin Playground

Just trying to write some simple game-like features in Odin with raylib

It’s my first try at odin. So far language feels pretty noice so I decided to give building something a go Overall the project will be just mashing things until they work. There is alot of math that has not been tought through. I am just coding Odin to get a hang of it and verify if I’d like to try to code something bigger in it It’s pretty cool in that way that you can just download .exe and run it to play

Most likely will have to rewrite the entire project now that I have a semblance of how to use ODIN lang to add it a bit more structure but also to fix math. It will be either done inside this project or in an entirely new one

Features

There are few things I think my be cool to try to implement

Player movement (moreso camera movement)

Simple implementation of movement where a character is always at the centre of the screen

Shooting

Spawning objects on mouse click. Maybe some different patters of shooting that may be later on a bunch of different weapons. Once I add some entites / enemies. Bullet collision with a target and target loosing health -> being deleted

Enemies

Just some basic entities that will chase you so there is a game. Dmg on touch nothing special. Maybe varying movement, health, damage

Movement collision / walls

For sure limiting a place where a player can move. Maybe adding walls which players cannot pass (this is kinda nasty in a way becouse it will require an implementation of a pathfinding algo for enemies)

Multiple floors

Just added a “portal” when you finish the level aka kill all “Enemies left” Each level is just 1 more enemy to kill

Walls

Drew black borders and disallowed player to move outside of bounds in a janky way

Textures

Drawing 1~4 number from .png on a player texture to have some “animation”

Lose condition

Player has hp and when it reaches 0 they lose, the game shows “you lose” screen and soon after the game exits

Known bugs

  • At one point math went wrong, didn’t bother to fix it so it won’t work correctly if played on diffrent resolution than 800x600
  • Enemy may spawn in such a way that they won’t exist thus making progression impossible

Summary

I would consider this project a success. I’ve seen the following:

  • string manipulation
  • raylibs rendering for: shapes, text and textures
  • odin memory tracking allocator
  • basic odinlang syntax
  • odinlang random values
  • odinlang math lib

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages