Java-Gaming.org Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (777)
Games in Android Showcase (231)
games submitted by our members
Games in WIP (856)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
   Home   Help   Search   Login   Register   
  Show Posts
Pages: 1 [2] 3
31  Game Development / Shared Code / Re: Connect4 my first something on: 2013-07-31 17:32:34
Quote
Well, no one care about your code quality as long it solves the problem.
No , I want to be a good programmer ...
Quote
for college task submission.
In which year of college??
Quote
His file is only 170 lines long...
Yes , for you are few , for me that program from a year i a lot  , surely your college quality is better ...
32  Game Development / Shared Code / Re: Connect4 my first something on: 2013-07-30 17:10:17
OMG ... is too difficult read all code ... without comment of the code ... and I generally program with Timer so is too difficult... And then my game have the triple of the linecode ... Emo
Another thing , in this game I have decided to don't use any Timer , because I need to repaint only when insert a pawn , so in keypressed i repaint my screen not is more efficient than repaint every time ??...
33  Discussions / General Discussions / Re: Models programming on: 2013-07-30 16:23:20
Quote
Haha, how long are you programming already? Wink
One year ...
Quote
A thread is just something like a timer... Why learn it at university? LOL, just use it, you don't have to 'learn' threads but USE them...
I hate this mentality , I program with Timer because i know what I am doing , use thread without know their working not is for me ... Informatics is a logical form science not a form of handicraft....
Quote
Do not mess with threads (yet).
Look up about game loops on this site or even better, use a framework like libgdx where you just can add on your render and logic stuff to a given predefined and working game architecture.

Ok generally in this forum see game threads programmed , so your answer is to study threads...??
34  Discussions / General Discussions / Re: Models programming on: 2013-07-30 12:51:19
Bad english = Bad problem..
I have study in a tutorial on zetcode ...http://zetcode.com/tutorials/javagamestutorial/
I started with my first game using Timer class ... Now I saw that all said that is better using Thread instead of Timer ...
I saw also that the programming with Timer is completly different respect the programming with Thread... So given that i prefer attend to study Thread at university, I could continue to program with Timer or when i restart with Thread i must restudy all beacause the programming models is completly different??
 
35  Discussions / General Discussions / Models programming on: 2013-07-30 11:06:29
I see that there are a lot of way to program a game for example: i use paint() and a timer... someone paintComponent.. other use thread with various method like rum cycle ecc ecc..
Now I see that the programming is different between methods , I have avoided to study thread because I wanted to study thread at university ... but now if  when start with thread i must restudy averythings then I start now ...
What do you recommend me??
36  Game Development / Shared Code / Re: Connect4 my first something on: 2013-07-30 07:47:15
Ah ok ,
this is only an attempt i spend few time in this, and now want to pass to another project ...
The game is ugly also because I am not able to draw decent sprite and drawing sprite is very boring for me ...
Quote
Ah I remember I made one back in college, to demonstrate AI or thing.
Oh interesting , my problem is that i don't know where start to program a AI... I have finish only my first year at university ...
37  Game Development / Newbie & Debugging Questions / Re: Package Problem on: 2013-07-29 22:03:10
Solved! Grin
Yes ... with this.getClass().getResource();
Thanks!
38  Game Development / Shared Code / Connect4 my first something on: 2013-07-29 21:57:32
Hi,
I've avoided to post in showcase because is a so simple game that is not appropriate in Showcase forum's part.
However this is the link to download the game is a .rar file and inside there is in dist a .jar file ...
http://ge.tt/1tIi0Gn/v/0?c
Bye
39  Game Development / Newbie & Debugging Questions / Re: Package Problem on: 2013-07-29 21:00:05
The images are in the same directory of files .java so my code is :
1  
ImageIcon ii= new ImageIcon(nameoffile.png)

I know that image are in the same directory java try it here ....
40  Game Development / Newbie & Debugging Questions / Package Problem on: 2013-07-29 20:09:23
Hi,
is the first time that I use Netbeans...  I 've finish my  little and ugly first game , so i 've a problem.... my directory src contains another directory called like the game's name, in this there are the file.java and image .png, every file.java contains the command:
1  
package nameofdirectorywhereisthefile 

now all work on my pc but when i passed my game in another pc and double-click on file .jar the game start but the game paint nothing like if it doesn't found the image .png .....
41  Game Development / Newbie & Debugging Questions / First attempt on: 2013-07-23 09:55:10
Hi ,
I started few time ago to create a Force4 game, is a game with 2 player "player blue" and "player red" you could play with a friend near for now , a day maybe could program the online to play with a friend but is too difficult for me now  , before I ve programmed this with ASCII art without problem now with the grafics is all hard ... Now my problem is that during the method KeyPressed of the Board2 class I would call repaint, but  like API said, repaint is esecute after the end of a event... I must call repaint() in the middle of the method, otherwise don't paint the last pawn when I win ...
I post a link where I've upload my game ... I believe that it is bad programmed...
http://ge.tt/72244bm?c
42  Discussions / General Discussions / Re: Sprite on: 2013-07-21 19:36:34
I've follow this tutorial so i ve used MS paint , and with ezimba a site to modify the image i set trasparency , i've also downloaded paint.net , so post image :
Before trasparency:
http://imageshack.us/photo/my-images/96/uln.png/
After modific:
http://imageshack.us/photo/my-images/41/nkr.gif/
If you want I coul post a screnn shot of programa whit y=0, sorry for language but I am not english and hate this language...
43  Discussions / General Discussions / Re: Sprite on: 2013-07-21 19:10:16
Ok, i use paint like tutorial and with difficult i ve found ezimba a site that permit to modify image ...
Now ,another problem, i've set the trasparency and all work , but when i put my sprite to y=0 , my sprite not is in the down part of screen but a bit more up , so i think that because , the background is trasparence but exsist and so it is calculate like part of sprite and so don't solve my problem..
44  Discussions / General Discussions / Re: Sprite on: 2013-07-21 17:34:15
How?? Huh
45  Discussions / General Discussions / Re: Sprite on: 2013-07-21 09:26:06
Ok thanks I get start with this : http://www.hongkiat.com/blog/pixel-art-tutorials/ , the first tutorial ...
But i've a problem after drawing the cube if I load the file.png , java paint also the background and the tutorial don't explain like avoid this..
46  Discussions / General Discussions / Re: Sprite on: 2013-07-20 21:49:50
When a person want to create a game must draw the sprite , or coul take it from some sites or other?
I m a novice , i've study a little tutorial , now I want to try something but I'm not able to draw sprite...
47  Discussions / General Discussions / Sprite on: 2013-07-20 21:24:10
Hi,
where do you take sprite for your games??
48  Game Development / Newbie & Debugging Questions / Re: Noob question on: 2013-05-28 16:35:08
From API :
Quote

paint
public void paint(Graphics g)
Invoked by Swing to draw components. Applications should not invoke paint directly, but should instead use the repaint method to schedule the component for redrawing.
You have right, sorry.
Thanks at all to be patients , I will treasure of these advice.....
49  Game Development / Newbie & Debugging Questions / Re: Noob question on: 2013-05-27 17:36:31
Ok.... I am not so stupid  Grin
But this page don't say to me the things that you said me in this post about the mechanism of swing .... 
It only list all method and costructor ....
50  Game Development / Newbie & Debugging Questions / Re: Noob question on: 2013-05-27 16:17:45
Ok thanks at all .....
Only a thing how could know the method of swing that are like paint, where i must try in API?
51  Game Development / Newbie & Debugging Questions / Re: Noob question on: 2013-05-26 20:44:38
1  
Do you know what threads are?

No sorry i start to read this tutorial after have finished the lessons of Programming 2 in my University , i thought that it is enough.....
52  Game Development / Newbie & Debugging Questions / Re: Noob question on: 2013-05-26 08:37:17
Sorry for my bad english , but i don't understand in the end the panel is painted like a framerate or like a  event-programmed object(like you have say in previous post?)
53  Game Development / Newbie & Debugging Questions / Re: Noob question on: 2013-05-25 09:09:23
Quote
if you move them out of the screen -> move them back, minimize them, change size etc.
Ah! I think that this work like a framerate.... Instaed is event-programmed , he was draw first when he was add an after when you said ... If is so I have understand all  Grin
54  Game Development / Newbie & Debugging Questions / Re: Noob question on: 2013-05-24 17:27:51
Ok repaint() is ok , the problem about this was about overidding , instead the problem was with paint() that automatically print the panel without invocation...
55  Game Development / Newbie & Debugging Questions / Re: Noob question on: 2013-05-24 16:09:14
Quote
    paint() invokes paintComponent().
    If the ui property is non-null, paintComponent() invokes ui.update().
    If the component's opaque property is true, ui.update() fills the component's background with the background color and invokes ui.paint().
    ui.paint() renders the content of the component.
Without invokes paint() , he automatically invokes paintComponent() this is the sense Huh
If yes , so if i for same motif in a part of game don't want to draw the panel ??
   
56  Game Development / Newbie & Debugging Questions / Re: Noob question on: 2013-05-24 15:26:46
Quote
It gets called when the swing system decides it needs to be redrawn.
Ok , also if not is very clear.... I believe in this , but is difficult for me accepted this magic  Grin
Quote
I believe you can call paint(Graphics) explicitly with repaint() but this isn't necessary as far as I know.
Uhm... Overriding a method consist in rewrite a method for an underclass maintaining same name and paramaters....  repaint()??
57  Game Development / Newbie & Debugging Questions / Noob question on: 2013-05-23 20:30:41
Hi!
I have started to read the java 2D games tutorial, and I don't understand a thing , following i post the code :
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Image;
import javax.swing.ImageIcon;
import javax.swing.JPanel;

public class Board extends JPanel{
   Image Cattura;
public Board(){

   ImageIcon img= new ImageIcon("Cattura.jpg");
   Cattura= img.getImage();
}
public void paint(Graphics g){
   Graphics2D g2d= (Graphics2D) g;
   g2d.drawImage(Cattura,10,10,null);
}
}


This is the panel file ;

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
import javax.swing.JFrame;


public class Image extends JFrame {

    public Image() {

        add(new Board());

        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        setSize(280, 240);
        setLocationRelativeTo(null);
        setTitle("Cattura");
        setVisible(true);
    }

    public static void main(String[] args) {
        new Image();
    }
}

And this is the main , I don't understand how is possible the drawing of image, yes there is the drawing method "paint" but this is not recall in the main so what it the logic of this trick???
58  Discussions / Miscellaneous Topics / Re: Hello on: 2012-11-01 23:22:31
I'm very confused, probably because I'm inexpert , so I believe that must do a step back , and recognize that is too early ...
I' m not surrending , but now is better if I study very well Java , so after Programming I exams maybe  could be to do something ....
59  Discussions / Miscellaneous Topics / Re: Hello on: 2012-10-30 20:13:27
Damn, isn't complete where I must be studied? Huh
60  Discussions / Miscellaneous Topics / Re: Hello on: 2012-10-30 20:09:30
Quote
As it says at the top of the page: Read the Java Gaming Resources, or peek at the official Java tutorials.
Thanks but the in link of Killer Game Programming in Java there aren't any part of book , so I've find the book in Google book so read the complete version. Cheesy
Only experience with game programming is with pygame that is very easy ... so i believe that this time thing are harder.
Pages: 1 [2] 3
 
hadezbladez (295 views)
2018-11-16 13:46:03

hadezbladez (164 views)
2018-11-16 13:41:33

hadezbladez (295 views)
2018-11-16 13:35:35

hadezbladez (75 views)
2018-11-16 13:32:03

EgonOlsen (2156 views)
2018-06-10 19:43:48

EgonOlsen (2183 views)
2018-06-10 19:43:44

EgonOlsen (1370 views)
2018-06-10 19:43:20

DesertCoockie (1988 views)
2018-05-13 18:23:11

nelsongames (1631 views)
2018-04-24 18:15:36

nelsongames (2279 views)
2018-04-24 18:14:32
Deployment and Packaging
by mudlee
2018-08-22 18:09:50

Java Gaming Resources
by gouessej
2018-08-22 08:19:41

Deployment and Packaging
by gouessej
2018-08-22 08:04:08

Deployment and Packaging
by gouessej
2018-08-22 08:03:45

Deployment and Packaging
by philfrei
2018-08-20 02:33:38

Deployment and Packaging
by philfrei
2018-08-20 02:29:55

Deployment and Packaging
by philfrei
2018-08-19 23:56:20

Deployment and Packaging
by philfrei
2018-08-19 23:54:46
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!