-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🌈🩸 -> #16 Phaser/Unity scaffolding for ship ai
- Loading branch information
1 parent
d986102
commit 664c97a
Showing
4 changed files
with
358 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
(From Slack): | ||
I’m working on spaceship AI for | ||
Going to start with AI for 2d (arcade-style) games and progress them to 3d support, both in Phaser & Unity3d (maybe even Pygame -> supports the AI projects we’re working on...) | ||
Possible NFT mint/panoptes backend? | ||
What about multiplayer support? (coming soon) | ||
“Minimal AI” for player-controlled ships |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
const config = { | ||
width: 1400, | ||
height: 750, | ||
backgroundColor: "#FFFFF", | ||
parent: "gameContainer", | ||
scene: [GameScene], | ||
physics: { | ||
default: 'arcade' | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,311 @@ | ||
body { | ||
margin: 0; | ||
padding: 10px; | ||
} | ||
|
||
* { | ||
box-sizing: border-box; | ||
} | ||
|
||
input { | ||
height: 40px; | ||
display: block; | ||
margin: 0; | ||
padding: 5px 10px; | ||
border: 0; | ||
border-right: 1px solid silver; | ||
border-radius: 0; | ||
font-size: 16px; | ||
} | ||
|
||
.intro-body { | ||
font-family: "VT323"; | ||
font-size: 22px; | ||
text-align: center; | ||
color: #fff; | ||
background-color: black; | ||
background-image: url("https://cdn.glitch.com/f66772e3-bbf6-4f6d-b5d5-94559e3c1c6f%2FScreenshot%202020-05-19%20at%2013.36.26.png?v=1589892011044"); | ||
} | ||
|
||
.intro-img { | ||
width: 80%; | ||
max-width: 800px; | ||
} | ||
|
||
.room-full-body { | ||
font-family: "VT323"; | ||
font-size: 52px; | ||
text-align: center; | ||
color: #fff; | ||
background-color: black; | ||
background-image: url("https://cdn.glitch.com/f66772e3-bbf6-4f6d-b5d5-94559e3c1c6f%2FScreenshot%202020-05-19%20at%2013.36.26.png?v=1589892011044"); | ||
} | ||
|
||
.index-body { | ||
font-family: "VT323"; | ||
font-size: 22px; | ||
color: #fff; | ||
background-color: black; | ||
} | ||
|
||
.game-text { | ||
max-width: 700px; | ||
margin-left: auto; | ||
margin-right: auto; | ||
} | ||
|
||
.game-instructions { | ||
width: 80%; | ||
margin: 20px auto; | ||
padding-top: 20px; | ||
font-size: 30px; | ||
} | ||
|
||
.create-room { | ||
width: 60%; | ||
margin: 0 auto; | ||
padding: 10px 0; | ||
text-align: center; | ||
display: inline-block; | ||
} | ||
|
||
.button-center { | ||
display: inline-block; | ||
} | ||
|
||
.text-center { | ||
text-align: center; | ||
} | ||
|
||
.room-input { | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
width: 70%; | ||
margin: 0 auto; | ||
padding: 10px 0; | ||
} | ||
|
||
.nickname { | ||
width: 30%; | ||
min-width: 300px; | ||
margin: 30px auto 10px; | ||
text-align: center; | ||
} | ||
|
||
#score { | ||
width: 100px; | ||
margin-right: 10px; | ||
} | ||
|
||
#room-code { | ||
width: 480px; | ||
} | ||
|
||
#deaths { | ||
margin-left: auto; | ||
text-align: right; | ||
} | ||
|
||
.game-area { | ||
display: flex; | ||
justify-content: space-between; | ||
} | ||
|
||
.game-div { | ||
margin: 20px; | ||
max-width: 1200px; | ||
text-align: center; | ||
} | ||
|
||
.game-div-container { | ||
text-align: center; | ||
display: block; | ||
} | ||
|
||
.game-headline-left { | ||
float: left; | ||
} | ||
|
||
.game-headline-right { | ||
float: right; | ||
} | ||
|
||
.winner-body { | ||
font-family: "VT323"; | ||
font-size: 62px; | ||
text-align: center; | ||
color: #fff; | ||
background-color: black; | ||
background-image: url("https://cdn.glitch.com/f66772e3-bbf6-4f6d-b5d5-94559e3c1c6f%2FScreenshot%202020-05-19%20at%2013.36.26.png?v=1589892011044"); | ||
} | ||
|
||
.winner-div { | ||
width: 80%; | ||
margin: 0 auto; | ||
padding-top: 20px; | ||
font-size: 82px; | ||
} | ||
|
||
.winner-text { | ||
text-transform: uppercase; | ||
} | ||
|
||
.runner-ups-div { | ||
width: 80%; | ||
margin: 0 auto; | ||
padding-top: 20px; | ||
font-size: 42px; | ||
} | ||
|
||
.bg-modal { | ||
display: none; | ||
position: absolute; | ||
top: 0; | ||
justify-content: center; | ||
align-items: center; | ||
width: 100%; | ||
height: 100%; | ||
color: #fff; | ||
background-color: rgba(0, 0, 0, 0.7); | ||
} | ||
|
||
.modal-content { | ||
position: relative; | ||
width: 500px; | ||
height: 300px; | ||
padding: 20px; | ||
border: 5px solid white; | ||
border-radius: 4px; | ||
text-align: center; | ||
} | ||
|
||
.button { | ||
display: inline-block; | ||
margin-top: 10px; | ||
padding: 10px 28px; | ||
border: 2px solid white; | ||
border-radius: 10px; | ||
text-decoration: none; | ||
font-size: 16px; | ||
font-family: "VT323"; | ||
color: white; | ||
background-color: #000; | ||
} | ||
|
||
.button:hover { | ||
border: 2px solid black; | ||
color: #000; | ||
background-color: white; | ||
} | ||
|
||
.button:active { | ||
border: 2px solid black; | ||
color: #000; | ||
background-color: white; | ||
} | ||
|
||
label { | ||
display: block; | ||
margin: 15px auto; | ||
} | ||
|
||
.close { | ||
position: absolute; | ||
top: 0; | ||
right: 14px; | ||
font-size: 42px; | ||
cursor: pointer; | ||
} | ||
|
||
.text-group { | ||
border: none; | ||
color: white; | ||
background-color: black; | ||
} | ||
|
||
.input-button { | ||
flex-shrink: 0; | ||
width: max-content; | ||
height: 40px; | ||
padding: 0 20px; | ||
border: 0; | ||
color: var(--gray); | ||
font-weight: 400; | ||
font-size: 1rem; | ||
text-transform: uppercase; | ||
} | ||
|
||
.input-button:hover { | ||
color: white; | ||
background-color: var(--gray); | ||
} | ||
|
||
.room-input-text { | ||
margin: 0 10px; | ||
} | ||
|
||
.room-code { | ||
min-width: 300px; | ||
} | ||
|
||
.img-invaders { | ||
width: 60%; | ||
} | ||
|
||
.copy { | ||
width: 60px; | ||
height: 60px; | ||
} | ||
|
||
.audio-control { | ||
display: flex; | ||
width: 100px; | ||
margin-right: 10px; | ||
} | ||
|
||
.audio-label { | ||
margin: 0 15px; | ||
} | ||
|
||
.audio-chkbox { | ||
padding: 0; | ||
height: 25px; | ||
} | ||
|
||
/*======================*/ | ||
|
||
.game-card { | ||
margin: 10px 50px; | ||
padding: 50px; | ||
background-image: url("https://user-images.githubusercontent.com/5900152/90127067-85382380-dd5c-11ea-87b1-4946c0df92d8.jpg"); | ||
} | ||
|
||
.info-bar { | ||
display: flex; | ||
padding: 10px 50px; | ||
justify-content: space-evenly; | ||
} | ||
|
||
.start-btn-div { | ||
text-align: center; | ||
font-family: inherit; | ||
} | ||
|
||
.start-info-card { | ||
width: 50%; | ||
margin: 20px; | ||
} | ||
|
||
.nav-tabs { | ||
justify-content: center; | ||
} | ||
|
||
.input-box { | ||
text-align: center; | ||
} | ||
|
||
.create-wait-msg { | ||
display: none; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<title>Space Invaders</title> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
<meta name="description" content="Multiplayer space invaders" /> | ||
<link | ||
id="favicon" | ||
rel="icon" | ||
href="https://glitch.com/edit/favicon-app.ico" | ||
type="image/x-icon" | ||
/> | ||
<!-- link to arcade style font --> | ||
<link | ||
href="https://fonts.googleapis.com/css2?family=VT323&display=swap" | ||
rel="stylesheet" | ||
/> | ||
<!-- link to stylesheet --> | ||
<link rel="stylesheet" href="/style.css"> | ||
<!-- link to Phaser CDN --> | ||
<script src="https://cdn.jsdelivr.net/npm/phaser@3.15.1/dist/phaser-arcade-physics.min.js"></script> | ||
<!-- link to the script --> | ||
<script src="/script.js" defer></script> | ||
</head> | ||
<body class="index-body"> | ||
<!--this div will house our game canvas--> | ||
<div class="game-div" id="gameContainer"></div> | ||
</body> | ||
</html> |