• Hey, guest user. Hope you're enjoying NeoGAF! Have you considered registering for an account? Come join us and add your take to the daily discourse.

FRIDAY NIGHT [OT] - Official NeoGAF Weekend Kickoff

Peggies

Gold Member
I'm not in a good place and haven't in a good while now ie: I won't mind not waking up tomorrow ykwyk. But i have family so yeah. Tired of decades of daily battles. I just can't ATM. Survival mode and all. It's not personal friend.
Gravity Falls Hug GIF

Good thing is: you're never alone in feeling low! We're many :messenger_winking:
 

Krathoon

Member
The funny thing is, when I am alone, I will feel kind of depressed, but I realize it is bullshit.

I guess you call it emotional maturity.

I probably need some projects to do.
 

V1LÆM

Gold Member
I'm not in a good place and haven't in a good while now ie: I won't mind not waking up tomorrow ykwyk. But i have family so yeah. Tired of decades of daily battles. I just can't ATM. Survival mode and all. It's not personal friend.
You should know I’m only joking :) reply only when you want of course! Hope you feel better and if you wanna talk then I’m here to listen!
 

HRK69

Member
The funny thing is, when I am alone, I will feel kind of depressed, but I realize it is bullshit.

I guess you call it emotional maturity.

I probably need some projects to do.
I’ve noticed that being around people makes me feel depressed lol

Over the past couple of years, I’ve started to develop a low-key dislike for people in general. I just want to be alone
 

V1LÆM

Gold Member
I got this from just typing "create a basic trading card game in html".

B1slYq5.jpg


It's very basic but holy shit. I could fuck about with it more and maybe make something good with it

I might sign up for the paid version
:messenger_open_mouth:
 
Last edited:

V1LÆM

Gold Member
jfc

now each card has its own skills and the enemy card fights automatically! it ends when one card ends up with 0 hp.

RfnnHxG.jpg


here is what code it generated:

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Trading Card Game</title>
<style>
body {
font-family: Arial, sans-serif;
padding: 20px;
}
.battlefield {
display: flex;
justify-content: space-around;
align-items: center;
margin-top: 20px;
}
.card {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
border: 1px solid #ddd;
border-radius: 8px;
padding: 20px;
margin-bottom: 10px;
background-color: #f9f9f9;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
text-align: center;
}
.card img {
width: 100px;
height: 100px;
margin-bottom: 10px;
}
.log {
margin-top: 20px;
}
button {
background-color: #007BFF;
color: white;
border: none;
padding: 10px 15px;
border-radius: 5px;
cursor: pointer;
}
button:hover {
background-color: #0056b3;
}
.skill {
margin: 5px 0;
cursor: pointer;
color: #007BFF;
}
.skill:hover {
text-decoration: underline;
}
.disabled {
pointer-events: none;
opacity: 0.5;
}
.hidden {
display: none;
}
</style>
</head>
<body>
<h1>Trading Card Game</h1>

<div class="battlefield">
<div id="player-card" class="card"></div>
<div id="enemy-card" class="card"></div>
</div>

<button onclick="startBattle()">Start Battle!</button>

<div class="log" id="battle-log">
<h2>Battle Log</h2>
<ul></ul>
</div>

<script>
const playerDeck = [
{ id: 1, name: "Dragon", attack: 8, defense: 6, image: "https://via.placeholder.com/100?text=Dragon", skills: ["Fireball", "Wing Attack", "Claw Swipe", "Roar"] },
{ id: 2, name: "Knight", attack: 6, defense: 7, image: "https://via.placeholder.com/100?text=Knight", skills: ["Shield Bash", "Sword Slash", "Parry", "Battle Cry"] },
{ id: 3, name: "Wizard", attack: 7, defense: 5, image: "https://via.placeholder.com/100?text=Wizard", skills: ["Magic Bolt", "Teleport", "Mana Burn", "Frost Nova"] },
];

const enemyDeck = [
{ id: 1, name: "Goblin", attack: 5, defense: 4, image: "https://via.placeholder.com/100?text=Goblin", skills: ["Stab", "Sneak Attack", "Throw Rock", "Taunt"] },
{ id: 2, name: "Orc", attack: 7, defense: 6, image: "https://via.placeholder.com/100?text=Orc", skills: ["Smash", "Charge", "Headbutt", "War Cry"] },
{ id: 3, name: "Troll", attack: 6, defense: 8, image: "https://via.placeholder.com/100?text=Troll", skills: ["Regenerate", "Crush", "Boulder Throw", "Stomp"] },
];

let currentPlayerCard;
let currentEnemyCard;
let currentTurn = 1; // 1 for player, 2 for enemy
let gameOver = false;

const renderCard = (card, containerId, isActive, hideSkills = false) => {
const container = document.getElementById(containerId);
container.innerHTML = `
<img src="${card.image}" alt="${card.name}">
<strong>${card.name}</strong>
<p>Attack: ${card.attack}</p>
<p>Defense: ${card.defense}</p>
<div id="skills-${containerId}" class="${isActive && !hideSkills ? '' : 'disabled'} ${hideSkills ? 'hidden' : ''}">
${card.skills.map(skill => `<p class="skill" onclick="useSkill('${skill}', '${containerId}')">${skill}</p>`).join('')}
</div>
`;
};

const startBattle = () => {
gameOver = false;
currentPlayerCard = playerDeck[Math.floor(Math.random() * playerDeck.length)];
currentEnemyCard = enemyDeck[Math.floor(Math.random() * enemyDeck.length)];

renderCard(currentPlayerCard, 'player-card', currentTurn === 1);
renderCard(currentEnemyCard, 'enemy-card', currentTurn === 2, true);

const log = document.getElementById('battle-log').querySelector('ul');
log.innerHTML = '';
const logEntry = document.createElement('li');
logEntry.textContent = `Battle started: ${currentPlayerCard.name} vs ${currentEnemyCard.name}`;
log.appendChild(logEntry);
};

const useSkill = (skill, user) => {
if (gameOver || (currentTurn === 1 && user !== 'player-card') || (currentTurn === 2 && user !== 'enemy-card')) {
return;
}

const log = document.getElementById('battle-log').querySelector('ul');
const logEntry = document.createElement('li');

if (user === 'player-card') {
logEntry.textContent = `Player's ${currentPlayerCard.name} used ${skill}!`;
currentEnemyCard.defense -= Math.floor(Math.random() * 4) + 2;
if (currentEnemyCard.defense <= 0) {
endGame('Player Wins!');
return;
}
currentTurn = 2;
renderCard(currentEnemyCard, 'enemy-card', false, true);
enemyTurn();
} else {
logEntry.textContent = `Enemy's ${currentEnemyCard.name} used ${skill}!`;
currentPlayerCard.defense -= Math.floor(Math.random() * 4) + 2;
if (currentPlayerCard.defense <= 0) {
endGame('Enemy Wins!');
return;
}
currentTurn = 1;
}

log.appendChild(logEntry);

renderCard(currentPlayerCard, 'player-card', currentTurn === 1);
};

const enemyTurn = () => {
if (gameOver || currentTurn !== 2) return;

setTimeout(() => {
const skill = currentEnemyCard.skills[Math.floor(Math.random() * currentEnemyCard.skills.length)];
useSkill(skill, 'enemy-card');
}, 1000);
};

const endGame = (result) => {
gameOver = true;
const log = document.getElementById('battle-log').querySelector('ul');
const finalLog = document.createElement('li');
finalLog.textContent = result;
log.appendChild(finalLog);
};
</script>
</body>
</html>
 

Maiden Voyage

Gold™ Member
I got this from just typing "create a basic trading card game in html".

B1slYq5.jpg


It's very basic but holy shit. I could fuck about with it more and maybe make something good with it

I might sign up for the paid version
:messenger_open_mouth:
Deepseek via Ollama is free which is the only reason I’m giving it a go. Still not useful for me in my day to day but I actually want to get it running on my phone to see if I can use it meaningfully at work. I might need to setup a tunnel to my home network to get it to work. I’ll have to explore some and see what options exist.

you can copy and paste that into a text editor and save with .html extension and open in a browser to try it :)
I’ll give it a shot this weekend. PM me when you make new versions. I am curious if I can make an incremental game.
 

V1LÆM

Gold Member
Deepseek via Ollama is free which is the only reason I’m giving it a go. Still not useful for me in my day to day but I actually want to get it running on my phone to see if I can use it meaningfully at work. I might need to setup a tunnel to my home network to get it to work. I’ll have to explore some and see what options exist.


I’ll give it a shot this weekend. PM me when you make new versions. I am curious if I can make an incremental game.
i might give deepseek a shot if it's free and can match the paid chatgpt.

i've used my limit for today so can't do anymore with it. i did manage to add a healing potion function but after that it stopped working.

i'm not paying 200/month lol but i might try the 20/month chatgpt after trying deepseek.
 

V1LÆM

Gold Member
also i'd love to be able to use AI for work but not sure how i'd do it. i'm too stupid. i like computers and tech but how people can do things with computers amazes me.
Download this:

In your terminal, ollama pull deepseek-r1

Then ollama run deepseek-r1

Only takes a few mins

see above lol.

i have fucked about with terminal/powershell etc but i don't really know what i'm doing. installing stable diffusion was difficult enough for me lol
 

Maiden Voyage

Gold™ Member
also i'd love to be able to use AI for work but not sure how i'd do it. i'm too stupid. i like computers and tech but how people can do things with computers amazes me.


see above lol.

i have fucked about with terminal/powershell etc but i don't really know what i'm doing. installing stable diffusion was difficult enough for me lol
The only thing you’re doing in the terminal after installing the app are those commands above. You can download other models using the first command. Models are here:

The second command engages your prompt
 
Top Bottom