Welcome, Guest |
You have to register before you can post on our site.
|
Forum Statistics |
» Members: 8,079
» Latest member: seanac11
» Forum threads: 10,350
» Forum posts: 91,276
Full Statistics
|
Online Users |
There are currently 228 online users. » 0 Member(s) | 226 Guest(s) Bing, Yandex
|
Latest Threads |
I'm leaving the site too....
Forum: 2DWorlds Discussion
Last Post: Jacob_
07-03-2023, 04:59 AM
» Replies: 12
» Views: 6,403
|
hi there.
Forum: 2DWorlds Discussion
Last Post: Jacob_
01-03-2020, 04:30 AM
» Replies: 1
» Views: 771
|
obroke
Forum: Current Games
Last Post: FrancisSah
09-06-2017, 10:11 AM
» Replies: 0
» Views: 20,541
|
fcouldn't
Forum: Current Games
Last Post: FrancisSah
09-06-2017, 09:02 AM
» Replies: 0
» Views: 8,251
|
qhow
Forum: Current Games
Last Post: PhilipShums
09-06-2017, 07:25 AM
» Replies: 0
» Views: 2,137
|
zstone
Forum: Current Games
Last Post: TimothyTox
09-06-2017, 07:03 AM
» Replies: 0
» Views: 1,002
|
vbit
Forum: Current Games
Last Post: FrancisSah
09-06-2017, 03:00 AM
» Replies: 0
» Views: 981
|
sildenafil 100 mg sandoz
Forum: Current Games
Last Post: RichardLen
09-06-2017, 12:28 AM
» Replies: 0
» Views: 1,198
|
mhis
Forum: Current Games
Last Post: TimothyTox
09-05-2017, 04:09 PM
» Replies: 0
» Views: 1,005
|
sildenafil citrate 100mg ...
Forum: Current Games
Last Post: Waltertog
09-05-2017, 12:27 PM
» Replies: 0
» Views: 960
|
|
|
Oh crud.... |
Posted by: Qwertygiy - 08-11-2011, 04:05 PM - Forum: Skins
- Replies (6)
|
 |
I accidentally got the faces wrong on my new advanced-template character.
On the site, I'm still your friendly maniac with a blowtorch.
In-game, I'm a moonwalking masked penguin with an orange sweater.
|
|
|
Create your own 2D game [Tutorial] |
Posted by: Nice - 08-11-2011, 01:27 PM - Forum: Programming
- Replies (4)
|
 |
I've been studying on 2D game creating now for a kinda long time and now I decided to create a tutorial for everyone who wants to make their own 2D game's like buildism.
[Tutorial]
-What you need?-
You need to study on java hardly tough it's kinda easy to use.
You will also need for example Net Beans. Net Beans is a good program to use if you want to build on your 2D game.
-Now, get started-
First you need to open Net beans or whatever you use.
Then you will have to make sure you do a Package which contains 3 classes.
You can just name the Package whatever you want.
I named my package: MyGame
The 3 classes are going to be: Frame, Dude, Board.
The 3 classes are going to look like this:
1: package MyGame;
2:
3: public class Frame {
4:
5: }
6:
1: package MyGame;
2:
3: public class Dude {
4:
5: }
6:
1: package MyGame;
2:
3: public class Board {
4:
5: }
6:
Make sure you add all the scripts into new page's.
Just Don't add the frame and the board and the dude classes into the same page if you understand what I mean.
Now when you made the following steps, the scripts can talk to each other trough the "package MyGame;".
Now the next steps...
Now in the Frame class, you add:
1: package MyGame;
2:
3: public class Frame {
4:
5: public static void main (String[] args) {
6: }
7: }
And now you will have to start creating the frame, and when it's finished it should look like this:
1: package MyGame;
2:
3: import javax.swing.*;
4:
5: public class Frame {
6:
7: public static void main (String[] args) {
8: JFrame frame = new JFrame ("game") ;
9: frame.add (new Board () ) ;
10: frame.setDefaultCloseOperation (JFram
11: e.EXIT_ON_CLOSE) ;
12: frame.setSize (1200,365) ;
13: frame.setVisible (true) ;
14: }
15: }
16:
The "JFrame frame = new JFrame ("game") ; is the game name.
you can change the "game" to whatever you want to but remember to change it inside the " " and use the Shift x 2 button to create the ".
And the (1200,365) is the background image.
And you can put the main character and the background image into C:/ so that you can axes 'em from there into your (frame) class.
And as you could see the code: "frame.add (new Board () ) ;" will basically start the board class.
So lets move into the Board class.
Next steps...
You have to add some basic stuff into the Board class because it constructs the board from the frame so you have to add:
1: package MyGame;
2:
3: public class Board {
4:
5: public Board () {
6:
7: }
8: }
9:
Good work! Now you have to create an instance of the Dude into the board. You simply add: Dude p; And when you done that you need to get the Dude's Image, so you will need to add: Image img; And you will need to import it into the background.
Now you will need to add: p = new Dude () ; under the Public Board text, and add: setFocusable (true) ; under the New Dude text. Now you will need to expand the JPanel so you need to add: extends JPanel { beside the "public class Board" text. A few more things...
I forgot to ... just add: import java.awt.Image;
and add: import javax.swing.*;
Add 'em under the package text.
Good work.
Now the next steps...
Now you will need to get your image so you will need to add:
ImageIcon i = new ImageIcon ("C:/test.png") ;
I will add more sometime...
|
|
|
Would This Script Work? |
Posted by: Hippo - 08-11-2011, 01:18 PM - Forum: Scripting
- Replies (4)
|
 |
sleep(3)
game.World.Lava Ball:Fixed = false
sleep(3)
game.World.Lava Ball1:Fixed = false
sleep(3)
game.World.Lava Ball2:Fixed = false
sleep(3)
game.World.Lava Ball3:Fixed = false
sleep(3)
game.World.Lava Ball4:Fixed = false
sleep(3)
game.World.Lava Ball5:Fixed = false
sleep(3)
game.World.Lava Ball6:Fixed = false
sleep(3)
game.World.Lava Ball7:Fixed = false
end
The idea of it is to make the lava balls fall one by one. Also, does anyone have a regen script I could use?
|
|
|
I'm creating a 2D game. |
Posted by: Nice - 08-11-2011, 09:47 AM - Forum: Programming
- No Replies
|
 |
I'm creating it with java.
DAY 1.
Created the frame, dude/user, and the board.
I fixed a few bugs from the scripts I created.
DAY 2.
I will start continuing to create the board a bit and the dude and the frame.
The board looks like this:
package javaapplication1;
import java.awt.Image;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.*;
import javax.swing.*;
public class Board extends JPanel implements ActionListener{
Dude p;
Image img;
Timer time;
public Board () {
p = new Dude () ;
setFocusable (true) ;
ImageIcon i = new ImageIcon ("C:/specit.png") ;
img = i.getImage () ;
time = new Timer (5, this) ;
time.start () ;
}
public void actionPerformed (ActionEvent e) {
}
|
|
|
|