mirror of
https://github.com/AeThex-Corporation/AeThex-OS.git
synced 2026-04-17 22:27:19 +00:00
- ModuleManager: Central tracking for installed marketplace modules - DataAnalyzerWidget: Real-time CPU/RAM/Battery/Storage widget (unlocked by Data Analyzer module) - BottomNavBar: Navigation bar for Projects/Chat/Marketplace/Settings - RootShell: Real root command execution utility - TerminalActivity: Full root shell with neofetch, sysinfo, real Linux commands - Terminal Pro module: Adds aliases (ll, la, h), command history - ArcadeActivity + SnakeGame: Pixel Arcade module unlocks retro games - fade_in/fade_out animations for smooth transitions
5.4 KiB
5.4 KiB
AeThex Connect - Nexus SDK Plugin
Integrate AeThex Connect communication into your games using the Nexus Engine.
Installation
npm install @aethex/connect-nexus-plugin
Or include directly in your game:
<script src="https://cdn.aethex.app/nexus-sdk/connect-plugin.js"></script>
Quick Start
// Initialize Nexus Engine
const nexus = new NexusEngine({
gameId: 'your-game-id',
gameName: 'Your Awesome Game'
});
// Initialize AeThex Connect Plugin
const connectPlugin = new AeThexConnectPlugin(nexus, {
apiUrl: 'https://connect.aethex.app/api',
apiKey: 'your-nexus-api-key',
enableOverlay: true,
enableNotifications: true,
overlayPosition: 'top-right',
autoMute: true
});
// Initialize on game start
await connectPlugin.initialize();
Configuration Options
| Option | Type | Default | Description |
|---|---|---|---|
apiUrl |
string | https://connect.aethex.app/api |
AeThex Connect API URL |
apiKey |
string | required | Your Nexus API key |
enableOverlay |
boolean | true |
Show in-game overlay |
enableNotifications |
boolean | true |
Show in-game notifications |
overlayPosition |
string | 'top-right' |
Overlay position: 'top-right', 'top-left', 'bottom-right', 'bottom-left' |
autoMute |
boolean | true |
Auto-mute voice chat during matches |
Features
In-Game Overlay
The plugin automatically creates an in-game overlay that shows:
- Friends list with online status
- Current game they're playing
- Quick message access
- Unread message notifications
Auto-Mute
Voice chat automatically mutes when players enter a match and unmutes when returning to menu. Configure with autoMute: false to disable.
Cross-Game Presence
Friends can see what game you're playing in real-time, with states:
in-menu- In main menuin-match- Currently playingpaused- Game paused
Events
The plugin listens to these Nexus Engine events:
match:start
nexus.emit('match:start', {
map: 'Forest Arena',
mode: 'Team Deathmatch',
teamId: 'team-red'
});
match:end
nexus.emit('match:end', {
score: 150,
won: true,
duration: 1234
});
game:pause
nexus.emit('game:pause');
game:resume
nexus.emit('game:resume');
game:exit
nexus.emit('game:exit');
Methods
initialize()
Initialize the plugin and start game session.
const success = await connectPlugin.initialize();
if (success) {
console.log('AeThex Connect ready!');
}
updateSessionState(state, metadata)
Manually update game session state.
await connectPlugin.updateSessionState('in-match', {
mapName: 'Desert Storm',
gameMode: 'Capture the Flag'
});
showNotification(notification)
Show a custom in-game notification.
connectPlugin.showNotification({
icon: '🎉',
title: 'Achievement Unlocked',
body: 'You earned the "Victory" badge!'
});
endSession()
End the game session (called automatically on game exit).
await connectPlugin.endSession();
destroy()
Cleanup and remove plugin.
connectPlugin.destroy();
Example: Full Integration
import NexusEngine from '@aethex/nexus-engine';
import AeThexConnectPlugin from '@aethex/connect-nexus-plugin';
class MyGame {
async initialize() {
// Initialize Nexus
this.nexus = new NexusEngine({
gameId: 'hide-and-seek-extreme',
gameName: 'Hide and Seek Extreme',
platform: 'PC'
});
// Initialize Connect Plugin
this.connect = new AeThexConnectPlugin(this.nexus, {
apiKey: process.env.NEXUS_API_KEY,
enableOverlay: true,
overlayPosition: 'top-right',
autoMute: true
});
await this.connect.initialize();
}
startMatch(matchData) {
// Notify Nexus (Connect plugin listens)
this.nexus.emit('match:start', {
map: matchData.map,
mode: matchData.mode,
teamId: matchData.teamId
});
// Your game logic...
}
endMatch(results) {
// Notify Nexus
this.nexus.emit('match:end', {
score: results.score,
won: results.won,
duration: results.duration
});
// Show custom notification
this.connect.showNotification({
icon: '🏆',
title: 'Match Complete',
body: `Final Score: ${results.score}`
});
}
cleanup() {
this.connect.destroy();
}
}
Testing
Test the plugin in development mode:
const connectPlugin = new AeThexConnectPlugin(nexus, {
apiUrl: 'http://localhost:5000/api', // Local dev server
apiKey: 'test-key',
enableOverlay: true
});
Troubleshooting
Overlay not appearing
- Check that
enableOverlay: truein config - Ensure API key is valid
- Check browser console for errors
Auto-mute not working
- Verify you're emitting
match:startandmatch:endevents - Check that
autoMute: truein config
Friends not showing
- Ensure player is logged into AeThex Connect
- Check network connectivity
- Verify API URL is correct
Support
For issues or questions:
- GitHub: github.com/AeThex-Corporation/AeThex-Connect
- Discord: discord.gg/aethex
- Email: support@aethex.app
License
MIT License - See LICENSE file for details