Getting Started with OdycJs
1. Using the Online Editor
The easiest and quickest way to start creating a game is to use the online editor.
2. Importing the Library from a CDN
For those who prefer working locally without a complex build setup, you can import the library from a CDN.
- Create an HTML file on your computer.
- Insert the following code:
<!doctype html><html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> </head> <body> <script> const game = odyc.createGame({ title: 'My Awesome Game' }) </script> </body></html>
- Open your
html
file in a browser.
3. Using a Bundler
If you want to use a bundler like Vite:
- Install OdyC via npm:
npm install odyc
- Import OdyC into your main JavaScript or TypeScript file:
import { createGame } from 'odyc'
const game = createGame({ title: 'My Awesome Game'})