Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
the_dungeon_project
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
12
Issues
12
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
genie_logiciel_2015
the_dungeon_project
Commits
554cd675
Commit
554cd675
authored
Jan 09, 2016
by
Huot Mathieu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
set in full screen, permanent input re-fixed, improved readme, proper game quit
parent
783b6545
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
25 additions
and
36 deletions
+25
-36
README.md
README.md
+14
-6
src/assets/WarriorWIP.png
src/assets/WarriorWIP.png
+0
-0
src/graphics/guiSkeleton/GraphicsMaster.java
src/graphics/guiSkeleton/GraphicsMaster.java
+8
-18
src/graphics/guiSkeleton/MainFrame.java
src/graphics/guiSkeleton/MainFrame.java
+3
-3
src/graphics/guiSkeleton/RepaintTimer.java
src/graphics/guiSkeleton/RepaintTimer.java
+0
-9
No files found.
README.md
View file @
554cd675
################### INSTALLATION AND REQUIRED FEATURES ###################
################### INSTALLATION AND REQUIRED FEATURES ###################
This project require java 1.8. To install it on debian stable or ubuntu 14.04 see in the wiki (TODO)
This project require java 1.8.
To install it on debian stable or ubuntu 14.04 see in the wiki.
Make sure to have java 1.8 : java -version.
To compile:
To compile:
cd project folder
cd project folder
make
make
To run
To run:
Graphical version:
make play
Terminal version:
make play-term
To compile and run:
Make sure to have java 1.8 : java -version
Graphical version :
To play on graphical version :
make buildplay
make buildplay
T
o play on t
erminal version :
Terminal version :
make buildplay-term
make buildplay-term
################### HOW TO PLAY ###################
################### HOW TO PLAY ###################
...
@@ -79,7 +88,6 @@ This game was created between september 2015 and january 2016.
...
@@ -79,7 +88,6 @@ This game was created between september 2015 and january 2016.
It was designed in a software engineering course of M1 at ENS Cachan, France.
It was designed in a software engineering course of M1 at ENS Cachan, France.
The following people were the developers :
The following people were the developers :
-Arrighi Emmanuel
-Arrighi Emmanuel
-Aubian Guillaume
-Babonnaud William
-Babonnaud William
-Beauseigneur Clément
-Beauseigneur Clément
-Begel Myriam
-Begel Myriam
...
...
src/assets/Warrior
WIP.png
→
src/assets/WarriorWIP.png
View file @
554cd675
File moved
src/graphics/guiSkeleton/GraphicsMaster.java
View file @
554cd675
...
@@ -2,7 +2,8 @@ package graphics.guiSkeleton;
...
@@ -2,7 +2,8 @@ package graphics.guiSkeleton;
import
graphics.graphical_abstraction.GraphicsMasterAbstraction
;
import
graphics.graphical_abstraction.GraphicsMasterAbstraction
;
import
graphics.graphical_abstraction.panel.PanelAbstraction
;
import
graphics.graphical_abstraction.panel.PanelAbstraction
;
import
graphics.guiSkeleton.guiPanel.*
;
import
graphics.guiSkeleton.guiPanel.GamePanel
;
import
graphics.guiSkeleton.guiPanel.UnitialisedGUIPanel
;
import
graphics.guiSkeleton.guiPanel.menuPanel.*
;
import
graphics.guiSkeleton.guiPanel.menuPanel.*
;
import
graphics.guiSkeleton.guiPanel.menuPanel.characterChoice.MultiPlayer_CharacterChoicePanel
;
import
graphics.guiSkeleton.guiPanel.menuPanel.characterChoice.MultiPlayer_CharacterChoicePanel
;
import
graphics.guiSkeleton.guiPanel.menuPanel.characterChoice.SinglePlayer_CharacterChoicePanel
;
import
graphics.guiSkeleton.guiPanel.menuPanel.characterChoice.SinglePlayer_CharacterChoicePanel
;
...
@@ -13,9 +14,11 @@ import graphics.guiSkeleton.guiPanel.menuPanel.gameLoad.SinglePlayer_LoadGamePan
...
@@ -13,9 +14,11 @@ import graphics.guiSkeleton.guiPanel.menuPanel.gameLoad.SinglePlayer_LoadGamePan
import
graphics.guiSkeleton.guiPanel.menuPanel.multiPlayer_MenuPanel.MultiPlayer_MenuPanel
;
import
graphics.guiSkeleton.guiPanel.menuPanel.multiPlayer_MenuPanel.MultiPlayer_MenuPanel
;
import
graphics.guiSkeleton.guiPanel.menuPanel.multiPlayer_MenuPanel.SeverCreatedPanel
;
import
graphics.guiSkeleton.guiPanel.menuPanel.multiPlayer_MenuPanel.SeverCreatedPanel
;
import
graphics.guiSkeleton.inputManagement.MainFrameKeyListener
;
import
graphics.guiSkeleton.inputManagement.MainFrameKeyListener
;
import
graphics.ingame_input_listener.InputConfiguration
;
import
ingame_programming.IGPpanel
;
import
ingame_programming.IGPpanel
;
import
javax.swing.*
;
import
javax.swing.*
;
import
java.awt.event.WindowEvent
;
/**
/**
* Created by dupriez on 10/11/15.
* Created by dupriez on 10/11/15.
...
@@ -33,13 +36,10 @@ public class GraphicsMaster extends GraphicsMasterAbstraction {
...
@@ -33,13 +36,10 @@ public class GraphicsMaster extends GraphicsMasterAbstraction {
// instantiated a second time by mistake)
// instantiated a second time by mistake)
/** Singleton pattern implementation **/
/** Singleton pattern implementation **/
//private static GraphicsMaster thisGraphicsMaster
private
MainFrame
mainFrame
;
//protected MainFrame mainFrame;
//protected static GraphicsMasterAbstraction thisGraphicsMaster = new GraphicsMaster();
private
GraphicsMaster
()
{
private
GraphicsMaster
()
{
//this.thisGraphicsMaster = new GraphicsMaster()
;
super
.
mainFrame
=
mainFrame
;
mapGUIStatesToGUIPanel
.
put
(
GUIStates
.
UNINITIALISED
,
new
UnitialisedGUIPanel
(
this
));
mapGUIStatesToGUIPanel
.
put
(
GUIStates
.
UNINITIALISED
,
new
UnitialisedGUIPanel
(
this
));
mapGUIStatesToGUIPanel
.
put
(
GUIStates
.
MAIN_MENU
,
new
MainMenuPanel
(
this
));
mapGUIStatesToGUIPanel
.
put
(
GUIStates
.
MAIN_MENU
,
new
MainMenuPanel
(
this
));
mapGUIStatesToGUIPanel
.
put
(
GUIStates
.
GAME_PANEL
,
new
GamePanel
(
this
));
mapGUIStatesToGUIPanel
.
put
(
GUIStates
.
GAME_PANEL
,
new
GamePanel
(
this
));
...
@@ -85,12 +85,6 @@ public class GraphicsMaster extends GraphicsMasterAbstraction {
...
@@ -85,12 +85,6 @@ public class GraphicsMaster extends GraphicsMasterAbstraction {
public
void
run
()
{
public
void
run
()
{
mainFrame
=
new
MainFrame
();
mainFrame
=
new
MainFrame
();
mainFrame
.
init
(
mainFrameKeyListener
);
mainFrame
.
init
(
mainFrameKeyListener
);
//MainFrame mf = (MainFrame)mainFrame;
//mf.setFocusable(true); //For the keyListener to work
//mf.addKeyListener(mainFrameKeyListener);
//mf.revalidate();
//mf.setVisible(true);
changeGUIStateTo
(
GUIStates
.
MAIN_MENU
);
changeGUIStateTo
(
GUIStates
.
MAIN_MENU
);
}
}
});
});
...
@@ -107,10 +101,8 @@ public class GraphicsMaster extends GraphicsMasterAbstraction {
...
@@ -107,10 +101,8 @@ public class GraphicsMaster extends GraphicsMasterAbstraction {
*/
*/
@Override
@Override
public
void
exitGUI
()
{
public
void
exitGUI
()
{
((
MainFrame
)
mainFrame
).
setVisible
(
false
);
InputConfiguration
.
UpdateConfigurationWhenGameLeaves
();
//Maybe "dispose" is not as definitive as the method exitGUI() should be
mainFrame
.
dispatchEvent
(
new
WindowEvent
(
mainFrame
,
WindowEvent
.
WINDOW_CLOSING
));
((
MainFrame
)
mainFrame
).
dispose
();
//TODO: make it terminates the program
}
}
/**
/**
...
@@ -134,8 +126,6 @@ public class GraphicsMaster extends GraphicsMasterAbstraction {
...
@@ -134,8 +126,6 @@ public class GraphicsMaster extends GraphicsMasterAbstraction {
private
void
setGUIStateTo
(
GUIStates
arg_guiState
)
{
private
void
setGUIStateTo
(
GUIStates
arg_guiState
)
{
PanelAbstraction
guiPanelToDisplay
=
mapGUIStatesToGUIPanel
.
get
(
arg_guiState
);
PanelAbstraction
guiPanelToDisplay
=
mapGUIStatesToGUIPanel
.
get
(
arg_guiState
);
mainFrame
.
add
(
guiPanelToDisplay
);
mainFrame
.
add
(
guiPanelToDisplay
);
//mainFrame.revalidate();
//mainFrame.repaint();
guiPanelToDisplay
.
initialise
();
guiPanelToDisplay
.
initialise
();
guiState
=
arg_guiState
;
guiState
=
arg_guiState
;
}
}
...
...
src/graphics/guiSkeleton/MainFrame.java
View file @
554cd675
...
@@ -19,10 +19,10 @@ public class MainFrame extends JFrame implements FrameAbstraction {
...
@@ -19,10 +19,10 @@ public class MainFrame extends JFrame implements FrameAbstraction {
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
public
MainFrame
()
{
public
MainFrame
()
{
//Annoying for network tests
//Annoying for network tests
//
setInFullScreen();
setInFullScreen
();
setSize
(
new
Dimension
(
500
,
500
));
//
setSize(new Dimension(500,500));
//
setResizable(false);
setResizable
(
false
);
setDefaultCloseOperation
(
JFrame
.
EXIT_ON_CLOSE
);
setDefaultCloseOperation
(
JFrame
.
EXIT_ON_CLOSE
);
RepaintTimer
.
getInstance
().
setMainFrameToRepaint
(
this
);
RepaintTimer
.
getInstance
().
setMainFrameToRepaint
(
this
);
try
{
try
{
...
...
src/graphics/guiSkeleton/RepaintTimer.java
View file @
554cd675
...
@@ -31,8 +31,6 @@ public class RepaintTimer {
...
@@ -31,8 +31,6 @@ public class RepaintTimer {
int
i
=
0
;
int
i
=
0
;
private
int
PLAYING_FRAMERATE
=
33
;
// unit: ms
private
int
PLAYING_FRAMERATE
=
33
;
// unit: ms
///TODO not used ?
// private int COOL_FRAMERATE = 5000; // unit: ms
private
boolean
mainFrameToRepaintSet
=
false
;
private
boolean
mainFrameToRepaintSet
=
false
;
private
MainFrame
mainFrameToRepaint
;
private
MainFrame
mainFrameToRepaint
;
// the java Timer the class RepaintTimer uses
// the java Timer the class RepaintTimer uses
...
@@ -63,10 +61,6 @@ public class RepaintTimer {
...
@@ -63,10 +61,6 @@ public class RepaintTimer {
* Set the delay of the RepaintTimer to PLAYING_FRAMERATE
* Set the delay of the RepaintTimer to PLAYING_FRAMERATE
*/
*/
public
void
enterPlayingFramerateMode
()
{
public
void
enterPlayingFramerateMode
()
{
//swingTimer.setDelay(PLAYING_FRAMERATE);
// //TODO: should maybe restart the timer here
// swingTimer.restart();
if
(
debug
){
LOGGER
.
info
(
"playingFramerateMode entered"
);}
if
(
debug
){
LOGGER
.
info
(
"playingFramerateMode entered"
);}
swingTimer
=
new
javax
.
swing
.
Timer
(
PLAYING_FRAMERATE
,
repaintActionListener
);
swingTimer
=
new
javax
.
swing
.
Timer
(
PLAYING_FRAMERATE
,
repaintActionListener
);
...
@@ -77,9 +71,6 @@ public class RepaintTimer {
...
@@ -77,9 +71,6 @@ public class RepaintTimer {
* Set the delay of the RepaintTimer to COOL_FRAMERATE
* Set the delay of the RepaintTimer to COOL_FRAMERATE
*/
*/
public
void
exitPlayingFrameRateMode
()
{
public
void
exitPlayingFrameRateMode
()
{
// swingTimer.setDelay(COOL_FRAMERATE);
// //TODO: should maybe restart the timer here
// swingTimer.restart();
if
(
debug
){
LOGGER
.
info
(
"playingFramerateMode exited"
);}
if
(
debug
){
LOGGER
.
info
(
"playingFramerateMode exited"
);}
swingTimer
.
stop
();
swingTimer
.
stop
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment