- Voodoo is the most memorable game in junior high school life. At that time, although there are internet cafes but not how to play.
- As a step-by-step 4980 learning Machine (after the 4988,5980,5988 Learning Machine), the year has a series of classic games, now really feel that the game team is really good, the quality of the single, the game is only hundreds of KB, but playable, The plot and visualization have reached a height of a learning machine with only 4MB of memory.
- At that time, step by step high this kind of machine learning Classic game has: Three Kingdoms BR, Knight line (actually want to do this game, but it was a pity, did not play too much), voodoo (playing customs-the ultimate spoiler: Inorganic road length is the biggest villain)
- The first design of the Lord's screen of Voldemort.
- Of course, the inside of the picture itself p out of a painting up.
- Then is the current progress of the file project directory
- In the domain package, there is the main function and the master function.
- Domain.java
1 Package Com.edp.domain; 2 3 Public class Domain {4 Public Static void Main (string[] args) {5 New ktdlgame (). Initframe (); 6 }7 }
- Very simply, there is only one line of code in Domain.java, just to start the window initialization and opening.
- Ktdlgame.java
1 PackageCom.edp.domain;2 3 ImportJava.awt.Graphics;4 5 ImportJavax.swing.JFrame;6 7 ImportCom.edp.huabi.PaintHead;8 ImportCom.edp.interf.ChangLiangQingDan;9 Ten@SuppressWarnings ("Serial") One Public classKtdlgameextendsJFrameImplementschangliangqingdan{ A PublicGraphics G; - PublicPainthead Painthead; - the Public voidInitframe () { - This. SetSize (600,600); - This. setdefaultcloseoperation (3); - //setting a form cannot change size + This. setresizable (false); - This. Setlocationrelativeto (NULL); + //Add Panel APainthead ph =NewPainthead ( This); at This. Add (ph); - This. setvisible (true); - - } -}
- The keynote function is also simple, define a method Initframe, and initialize the form with the tools (methods) inside the JFrame package. Then use the previously overloaded Painthead.java for specific page design operations.
"Code note" Multi-threaded game development--Voodoo: The first step--Start the Game Interface implementation (a)