Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
CyberTorii committed May 12, 2024
0 parents commit c3c17f0
Show file tree
Hide file tree
Showing 29 changed files with 1,517 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Compiled class file
*.class

# Log file
*.log

# BlueJ files
*.ctxt

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
replay_pid*
3 changes: 3 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions .idea/artifacts/PACMAN2P.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .idea/description.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/encodings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions .idea/project-template.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

124 changes: 124 additions & 0 deletions .idea/uiDesigner.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024 Quentin MAMMA

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
20 changes: 20 additions & 0 deletions PACMAN2P.iml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module-library">
<library>
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/annotations/20.1.0/annotations-20.1.0.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
</component>
</module>
22 changes: 22 additions & 0 deletions PACMAN_MAP.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
11111211111111111211111
12222222222122222222221
14111211112121111211141
12111211112121111211121
12222222222222222222221
12111211211111211211121
12222211222122211222221
11111211112121111211111
11111212222222221211111
11111212111011121211111
22222222100000122222222
11111212111111121211111
11111212222222221211111
11111212111111121211111
12222222222122222222221
14111211112121111211141
12211222222222222211221
11211212111111121211211
12222212222122221222221
12111111112121111111121
12222222222222222222221
11111111112121111111111
40 changes: 40 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# PACMAN-2-PLAYERS
## Context:
It’s as part of a school project (in duo) of 2nd year of engineering school that we programmed a Pac-Man playable with 2 players on a same computer. The objective was to use animations on JavaFx. We also made some changes to the classic gameplay.

## Gameplay:
It uses the same gameplay as the classic Pac-Man with some differences. You would pay attention to collisions between players which cause loss of life, to bonuses which does not necessarily transform players into berserker mode, but which can also give an extra life or a score bonus. The different exits of the map don’t necessarily lead to the opposite exit: it’s random. Use the arrow keys to move with one player and the `W`, `A`, `S`, `D` keys to move with the other player.

### Bonuses:
There will be 3 types of bonus which will be generated randomly according to predefined probabilities:
- Berserk mode: 3/5.
- An extra life: 1/5.
- 200 additional score points: 1/5.

### Rule for creating a Map:
To create your map, you must create a text file which will have the same name of the file containing the basic map: "PACMAN_MAP.txt". I advise you to keep the basic map either under another name or in another folder so you can recover it at any time. When you start to compose your map, you will have to respect the following code:
- Put a "0" for enemies spawns (compulsory),
- Put a "1" for walls,
- Put a "2" for paths containing a score ball,
- Put a "3" for empty paths,
- Put a "4" for the paths containing a bonus.

<p align="center">
<img alt="Pac_Man_Gameplay" src="assets/Pac_Man_Gameplay.jpg" width="720"/>
</p>

## Features:
1. You have the option to customize the map.
2. You can download skins from the internet to customize your game (.gif for the classic player and .png for the berserker player and enemies). The names of the images must remain the same as the original.
3. In the main menu, you can choose to play with 1 or 2 players as well as the number of enemies.

<p align="center">
<img alt="Pac_Man_Menu" src="assets/Pac_Man_Menu.jpg" width="720"/>
</p>

## Available:
If you wish to view or modify the source code it is available under the folder name "PACMAN2P". The game was coded in JavaFx on IntelliJ. If you only want to play, you just need to download the "PACMAN2P The Game" in release section.

## State:
- [ ] Work in progress
- [x] Work completed
Binary file added assets/Pac_Man_Gameplay.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/Pac_Man_Menu.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added ghost.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added ghost_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
43 changes: 43 additions & 0 deletions out/artifacts/PACMAN2P/PACMAN2P.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<html><head>
<SCRIPT src="http://java.com/js/dtjava.js"></SCRIPT>
<script>
function launchApplication(jnlpfile) {
dtjava.launch( {
url : 'PACMAN2P.jnlp'
},
{
javafx : '8.0+'
},
{}
);
return false;
}
</script>

<script>
function javafxEmbedPACMAN2P_id() {
dtjava.embed(
{
id : 'PACMAN2P_id',
url : 'PACMAN2P.jnlp',
placeholder : 'javafx-app-placeholder',
width : '600',
height : '400'
},
{
javafx : '8.0+'
},
{}
);
}
<!-- Embed FX application into web page once page is loaded -->
dtjava.addOnloadCallback(javafxEmbedPACMAN2P_id);
</script>

</head><body>
<h2>Test page for <b>PACMAN2P</b></h2>
<b>Webstart:</b> <a href='PACMAN2P.jnlp' onclick="return launchApplication('PACMAN2P.jnlp');">click to launch this app as webstart</a><br><hr><br>

<!-- Applet will be inserted here -->
<div id='javafx-app-placeholder'></div>
</body></html>
15 changes: 15 additions & 0 deletions out/artifacts/PACMAN2P/PACMAN2P.jnlp
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<jnlp spec="1.0" xmlns:jfx="http://javafx.com" href="PACMAN2P.jnlp">
<information>
<title>PACMAN2P</title>
<vendor>Unknown</vendor>
<description>PACMAN2P</description>
<offline-allowed/>
</information>
<resources>
<j2se version="1.6+" href="http://java.sun.com/products/autodl/j2se"/>
<jar href="PACMAN2P.jar" size="21420" download="eager" />
</resources>
<jfx:javafx-desc width="600" height="400" main-class="com.company.MVP" name="PACMAN2P" />
<update check="background"/>
</jnlp>
Binary file added pacman.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pacman_berserker.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit c3c17f0

Please sign in to comment.