ADAM DAGHMAH 1 week ago
parent 5d82fa2cb2
commit 5d9a60571f

@ -0,0 +1,10 @@
<!DOCTYPE html>
<html>
<head>
<title>I Love X Engine</title>
</head>
<body>
<h1>I Love X Engine (Electron)</h1>
</body>
</html>

@ -0,0 +1,20 @@
const { app, BrowserWindow } = require('electron');
const path = require('path');
function createWindow() {
const win = new BrowserWindow({
width: 1024,
height: 768,
webPreferences: {
nodeIntegration: true,
contextIsolation: false,
}
});
win.loadFile('index.html');
}
app.whenReady().then(createWindow);
app.on('window-all-closed', () => {
if (process.platform !== 'darwin') app.quit();
});

@ -1,20 +1,21 @@
{
"name": "i-love-x-engine",
"version": "1.0.0",
"description": "",
"main": "index.js",
"description": "Modulaire Electron game engine voor spelshows",
"main": "main.js",
"directories": {
"doc": "docs",
"test": "tests"
},
"scripts": {
"start": "electron .",
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "https://git.pack.house/adamdaghmah/i-love-x-engine"
},
"keywords": [],
"keywords": ["electron", "game-engine", "spelshow"],
"author": "",
"license": "ISC",
"devDependencies": {

@ -1,26 +0,0 @@
const ConfigLoader = require('./core/config-loader');
const AssetManager = require('./core/asset-manager');
const EventBus = require('./core/event-bus');
const GameLoop = require('./core/game-loop');
// Config pad kan via argumenten komen, standaard default.json
const configPath = process.argv[2] || '../configs/default.json';
const config = ConfigLoader.load(configPath);
const assetManager = new AssetManager(config.assetsDir || '../assets/default');
assetManager.loadAssets();
const eventBus = new EventBus();
const gameLoop = new GameLoop({
onUpdate: () => {
// Hier komt de game logica per tick
console.log('Game update');
},
onEnd: () => {
console.log('Game ended');
}
});
console.log('Engine gestart met config:', configPath);
gameLoop.start();
Loading…
Cancel
Save