Show Posts
|
|
Pages: [1] 2 3
|
|
2
|
Game Development / Newbie & Debugging Questions / Re: Can someone please explain this to me :)
|
on: 2013-01-19 06:26:53
|
|
Right I understand that however I don't understand how we are linking BufferedImage image = new BufferedImage(WIDTH, HEIGHT, BufferedImage.TYPE_INT_ARGB); int pixels[] = ((DataBufferInt) image.getRaster().getDataBuffer()).getData(); ^ This is just copying this?^
^but how does editing this have any effect on ^ Since we are just copying the right to the left?
My only assumption is that this is working as pass by reference, I didn't realize java allows pass by reference for arrays? Scratch that right..java is only pass by value
|
|
|
|
|
3
|
Game Development / Newbie & Debugging Questions / Re: Can someone please explain this to me :)
|
on: 2013-01-19 06:17:29
|
|
I'm still confused, Image is independent. Then you are saying pixel array is equal to the contents of image so now pixels has the contents of Image however how does that change image's contents.
I mean I would imagine this, Image = pixels;
but we have so.. pixels = image is only setting the contents of pixels to image not the reverse right?
|
|
|
|
|
4
|
Game Development / Newbie & Debugging Questions / Can someone please explain this to me :)
|
on: 2013-01-19 06:00:04
|
Experimenting with a new way to render images, trying to understand what notch did with his rendering which is quite popular for Java games now, I'm slightly confused on how this bit of code is working. 1 2 3 4 5 6 7 8
| BufferedImage image = new BufferedImage(WIDTH, HEIGHT, BufferedImage.TYPE_INT_ARGB); int pixels[] = ((DataBufferInt) image.getRaster().getDataBuffer()).getData();
and then.. render(Graphics g){ g.drawImage(image..etc) } |
How is editing pixels affecting image?
|
|
|
|
|
5
|
Game Development / Newbie & Debugging Questions / Re: Method not working w/o Sys.outs...Please help am baffled
|
on: 2012-05-29 01:25:41
|
Meaning it doesn't work is that the thread just doesn't go/stop if I take the Sys outs away. The object of this method is to start a loop which it looks at my games System time and takes a snapshot of the current time and then designated time to time something for example if its 30secs game time and you want 5seconds of something to start or sleep it goes till 35secs then terminates. TEtarget.GEStart(); is the TimerEvent classes calling to a Interface method GEStart which is passed through the constructor during initialization of the object. GeStart can be anything its just like Runnable. if (TimeWizard.mainTimeSecs <= currTime) once false it = else and eventContinue to false ending the while loop. Btw this is added to a thread. 1 2 3 4 5 6 7 8 9 10
| public void teGO() { new Thread(this).start();
}
@Override public void run() { this.startEvent();
} |
End result 1
| new TimedEvent(9,this).teGO(); |
Pretty much this class is a custom timer running by my games system time. Any entity or object can use this to trigger events because I have a method which tells once this is finished or not via TimerEvents method which other classes check. 1 2 3
| public boolean eventStatus() { return eventAlive; } |
You are able to pick a time to Run during the duration say for 5 seconds or choose to go after 5 seconds eventForDuration =true then it goes for the designated duration otherwise false it goes after the set duration. So yea it appears my thread is just hanging for some reason. EDIT: Solved..yea changing from a boolean to a void fixed things and just cleaning the code a bit, thanks guys UprigthPath good calls btw.
|
|
|
|
|
7
|
Java Game APIs & Engines / Java 2D / Re: 2DGraphics PixelArray vs G2d.drawImage(...)..
|
on: 2012-04-22 23:54:16
|
|
Thanks for the responses, I mean is there one that is more professional than another? Do you all just use Draw when making a game, is it acceptable for an app? Does one get higher fps than another? I just really want to make sure before I put the cap on my game's graphical capabilities =D
|
|
|
|
|
8
|
Java Game APIs & Engines / Java 2D / 2DGraphics PixelArray vs G2d.drawImage(...)..
|
on: 2012-04-22 02:44:51
|
|
Ok, so i'm just starting to finish my GFx API in my game and I've watched some tutorials where people add every entity into the games Pixel array instead of just doing g2d.draw(image,x,y) to a Canvas, they instead do pixel raster to images. Is this really needed or is G2D.draw(bufferedimages) suffice for mediocre game. My game art style is a 2D sidescroller like type gamerpg such as Dungeon Fighter online etc.
My question is, what benefits are there to using pixel arrays? Is this needed for my type of game? Also is this easy to integrate?
Thanks in advance, Tips*hat* Jay
|
|
|
|
|
10
|
Game Development / Game Play & Game Design / Re: Canvas setting background Image for games/Other Canvas/graphic questions
|
on: 2012-03-26 04:00:23
|
deltaTime/1e9 * 1000 is the same as deltaTime/1e6. Ah true XD Still a bit confused on 1 2 3 4 5 6 7 8 9 10 11 12 13
| public void render() { do{ do{ Graphics2D g = (Graphics2D)bufferStrategy.getDrawGraphics(); b3.paint(g); g.dispose(); }while(bufferStrategy.contentsRestored()); bufferStrategy.show(); }while(bufferStrategy.contentsLost()); } |
As Opposed to 1 2 3 4 5 6 7 8 9 10
| public void render() { Graphics2D g = (Graphics2D) bufferStrategy.getDrawGraphics(); g.clearRect(0, 0, WIDTH, HEIGHT); b3.paint(g); g.dispose(); bufferStrategy.show();
} |
I thought that clearRect was needed?
|
|
|
|
|
11
|
Game Development / Game Play & Game Design / Re: Canvas setting background Image for games/Other Canvas/graphic questions
|
on: 2012-03-26 03:01:38
|
This is correct right? 1 2 3 4 5 6 7
| protected void update(long deltaTime){ b3.update((int)((deltaTime/1e9)*1000)); } |
Also can you explain exactly what is going on here? The render that you gave me. 1 2 3 4 5 6 7 8 9 10 11 12 13
| public void render() { do{ do{ Graphics2D g = (Graphics2D)bufferStrategy.getDrawGraphics(); b3.paint(g); g.dispose(); }while(bufferStrategy.contentsRestored()); bufferStrategy.show(); }while(bufferStrategy.contentsLost()); } |
Ok everything is ALOT smoother, although Images are now somewhat jittery. Is there something that I don't have here that is making it do so? is this paint method correct? Do I need to add any thing, no disposing no super.paint right? the main game class will handle that in the render loop right? 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
| public void paint(Graphics2D g) { g.drawImage(bg, 0, 0, this); g.setColor(Color.RED); g.fillRect(playerSprite.getX() - 5, playerSprite.getY() - 40, playerSprite.returnHealth(), 10); g.setColor(Color.GREEN); g.drawRect(playerSprite.getX() - 5, playerSprite.getY() - 40, 70, 10);
g.setColor(Color.GREEN); g.drawString(playerSprite.getMTag(), playerSprite.getX() - 20, playerSprite.getY() - 10);
g.drawImage(playerSprite.getsprite(), playerSprite.getX(), playerSprite.getY(), this); monsterSprite.Render(g);
fps(g); } |
========================Everything in main======================================================================== 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167
| import java.awt.Canvas; import java.awt.Dimension; import java.awt.Graphics2D; import java.awt.Image; import java.awt.event.KeyAdapter; import java.awt.event.KeyEvent; import java.awt.event.MouseAdapter; import java.awt.image.BufferStrategy; import java.awt.image.BufferedImage; import java.io.IOException;
import javax.swing.ImageIcon; import javax.swing.JFrame; import javax.swing.JPanel;
public class Game implements Runnable{ BufferedImageLoader BuffLoad = new BufferedImageLoader(); BufferedImage sprite_sheet = null; BufferedImage sprite; Image image; ImageIcon ii ; public Board3 b3; int WIDTH = 0; int HEIGHT = 0; SonageArenaFrame SAF; JFrame frame; Canvas canvas; BufferStrategy bufferStrategy; public Game(){ frame= new JFrame("DemoCanvas"); b3= new Board3();
WIDTH=b3.bg.getWidth(null); HEIGHT= b3.bg.getHeight(null); frame.add(SAF.p, "South"); JPanel panel = (JPanel) frame.getContentPane(); panel.setPreferredSize(new Dimension(WIDTH, HEIGHT)); panel.setLayout(null); canvas = new Canvas(); canvas.addKeyListener(new TAdapter()); canvas.setBounds(0, 0, WIDTH, HEIGHT); canvas.setIgnoreRepaint(true); panel.add(canvas); canvas.addMouseListener(new MouseControl()); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.pack(); frame.setResizable(true); frame.setVisible(true); canvas.createBufferStrategy(3); bufferStrategy = canvas.getBufferStrategy(); canvas.requestFocus(); } private class MouseControl extends MouseAdapter{ } long desiredFPS =60; boolean running = true; public void run() { final long DESIRED_LOOP = Math.round(1e9 / desiredFPS); long lastTime = System.nanoTime(); while(true) { long deltaTime = System.nanoTime() - lastTime; lastTime += deltaTime; update(deltaTime); render(); long sleepTime = Math.round((DESIRED_LOOP)-(System.nanoTime()-lastTime)); if(sleepTime <= 0) continue; long prevTime = System.nanoTime(); while(System.nanoTime()-prevTime <= sleepTime) { if(System.nanoTime()-prevTime <= sleepTime * 0.9) try { Thread.sleep(1); } catch (InterruptedException e) { e.printStackTrace(); } else Thread.yield(); } } } public void render() { do{ do{ Graphics2D g = (Graphics2D)bufferStrategy.getDrawGraphics(); b3.paint(g); g.dispose(); }while(bufferStrategy.contentsRestored()); bufferStrategy.show(); }while(bufferStrategy.contentsLost()); } protected void update(long deltaTime){ b3.update((int)((deltaTime/1e9)*1000)); System.out.println((int)((deltaTime/1e9)*1000)); } protected void render(Graphics2D g){ b3.paint(g); } private class TAdapter extends KeyAdapter {
public void keyReleased(KeyEvent e) { b3.playerSprite.keyReleased(e); }
public void keyPressed(KeyEvent e) { b3.playerSprite.keyPressed(e); } } public static void main(String [] args){ Game ex = new Game(); new Thread(ex).start(); } } |
|
|
|
|
|
12
|
Game Development / Game Play & Game Design / Re: Canvas setting background Image for games/Other Canvas/graphic questions
|
on: 2012-03-26 00:19:02
|
First off are you giving me permission to use that game loop in my game? Second I pasted the code in Eclipse to try it out and it's saying I need try/catch block XD might want to edit that. EDIT: Gotcha EDIT: Oh and you are supposed to be using BufferStrategy in a certain way. Refer to code Smiley Also I tried out everthing and am getting very weird resutls flashing screen and such. -------------------------------------------------------------------------------------------------------------------------------------------------- 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176
| import java.awt.Canvas; import java.awt.Dimension; import java.awt.Graphics2D; import java.awt.Image; import java.awt.event.KeyAdapter; import java.awt.event.KeyEvent; import java.awt.event.MouseAdapter; import java.awt.image.BufferStrategy; import java.awt.image.BufferedImage; import java.io.IOException;
import javax.swing.ImageIcon; import javax.swing.JFrame; import javax.swing.JPanel;
public class Game implements Runnable{ final int WIDTH = 1366; final int HEIGHT = 768; BufferedImageLoader BuffLoad = new BufferedImageLoader(); BufferedImage sprite_sheet = null; BufferedImage sprite; Image image; ImageIcon ii ; public Image bg; public Board3 b3; SonageArenaFrame SAF; JFrame frame; Canvas canvas; BufferStrategy bufferStrategy; public Game(){ frame= new JFrame("DemoCanvas"); b3= new Board3(); frame.add(SAF.p, "South"); JPanel panel = (JPanel) frame.getContentPane(); panel.setPreferredSize(new Dimension(WIDTH, HEIGHT)); panel.setLayout(null); canvas = new Canvas(); canvas.addKeyListener(new TAdapter()); canvas.setBounds(0, 0, WIDTH, HEIGHT); canvas.setIgnoreRepaint(true); panel.add(canvas); canvas.addMouseListener(new MouseControl()); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.pack(); frame.setResizable(true); frame.setVisible(true); try { bg = javax.imageio.ImageIO.read(new java.net.URL(getClass() .getResource("/Trees!.png"), "Trees!.png")); } catch (Exception eee) { System.out.println(eee.toString()); } ii = new ImageIcon(this.getClass().getResource("/FireFlame.png")); try { sprite_sheet = BuffLoad.loadImage("/PetSword2.png"); } catch (IOException IEE) { } canvas.createBufferStrategy(3); bufferStrategy = canvas.getBufferStrategy(); canvas.requestFocus(); } private class MouseControl extends MouseAdapter{ } long desiredFPS =60; boolean running = true; public void run() { final long DESIRED_LOOP = Math.round(1e9 / desiredFPS); long lastTime = System.nanoTime(); while(true) { long deltaTime = System.nanoTime() - lastTime; lastTime += deltaTime; update(deltaTime); render(); long sleepTime = Math.round((DESIRED_LOOP)-(System.nanoTime()-lastTime)); if(sleepTime <= 0) continue; long prevTime = System.nanoTime(); while(System.nanoTime()-prevTime <= sleepTime) { if(System.nanoTime()-prevTime <= sleepTime * 0.9) try { Thread.sleep(1); } catch (InterruptedException e) { e.printStackTrace(); } else Thread.yield(); } } } public void render() { do{ do{ Graphics2D g = (Graphics2D)bufferStrategy.getDrawGraphics(); b3.paint(g); g.dispose(); }while(bufferStrategy.contentsRestored()); bufferStrategy.show(); }while(bufferStrategy.contentsLost()); } protected void update(long deltaTime){ b3.update((int)deltaTime); System.out.println(deltaTime); } protected void render(Graphics2D g){ b3.paint(g); } private class TAdapter extends KeyAdapter {
public void keyReleased(KeyEvent e) { b3.playerSprite.keyReleased(e); }
public void keyPressed(KeyEvent e) { b3.playerSprite.keyPressed(e); } } public static void main(String [] args){ Game ex = new Game(); new Thread(ex).start(); } } |
|
|
|
|
|
13
|
Game Development / Game Play & Game Design / Re: Canvas setting background Image for games/Other Canvas/graphic questions
|
on: 2012-03-25 23:57:40
|
Doesn't seem to do so though the higher Increase the FPS the faster objects are moving XD. Also from switching from my JPanel setup/non delta gameloop to this and canvas I've noticed some choppiness not sure why..performance hasn't gone up, I must've fked something up.. Main game Loop from the tutorials section that i'm using until I make my own/master delta time and canvas 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170
| import java.awt.Canvas; import java.awt.Dimension; import java.awt.Graphics2D; import java.awt.Image; import java.awt.event.KeyAdapter; import java.awt.event.KeyEvent; import java.awt.event.MouseAdapter; import java.awt.image.BufferStrategy; import java.awt.image.BufferedImage; import java.io.IOException;
import javax.swing.ImageIcon; import javax.swing.JFrame; import javax.swing.JPanel;
public class Game implements Runnable{ final int WIDTH = 1366; final int HEIGHT = 768; BufferedImageLoader BuffLoad = new BufferedImageLoader(); BufferedImage sprite_sheet = null; BufferedImage sprite; Image image; ImageIcon ii ; public Image bg; public Board3 b3; SonageArenaFrame SAF; JFrame frame; Canvas canvas; BufferStrategy bufferStrategy; public Game(){ frame= new JFrame("DemoCanvas"); b3= new Board3(); frame.add(SAF.p, "South"); JPanel panel = (JPanel) frame.getContentPane(); panel.setPreferredSize(new Dimension(WIDTH, HEIGHT)); panel.setLayout(null); canvas = new Canvas(); canvas.addKeyListener(new TAdapter()); canvas.setBounds(0, 0, WIDTH, HEIGHT); canvas.setIgnoreRepaint(true); panel.add(canvas); canvas.addMouseListener(new MouseControl()); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.pack(); frame.setResizable(true); frame.setVisible(true); try { bg = javax.imageio.ImageIO.read(new java.net.URL(getClass() .getResource("/Trees!.png"), "Trees!.png")); } catch (Exception eee) { System.out.println(eee.toString()); } ii = new ImageIcon(this.getClass().getResource("/FireFlame.png")); try { sprite_sheet = BuffLoad.loadImage("/PetSword2.png"); } catch (IOException IEE) { } canvas.createBufferStrategy(3); bufferStrategy = canvas.getBufferStrategy(); canvas.requestFocus(); } private class MouseControl extends MouseAdapter{ } long desiredFPS =60; long desiredDeltaLoop = (1000*1000*1000)/desiredFPS; boolean running = true; public void run(){ long beginLoopTime; long endLoopTime; long currentUpdateTime = System.nanoTime(); long lastUpdateTime; long deltaLoop; while(running){ beginLoopTime = System.nanoTime(); render(); lastUpdateTime = currentUpdateTime; currentUpdateTime = System.nanoTime(); update((int) ((currentUpdateTime - lastUpdateTime)/(1000*1000))); endLoopTime = System.nanoTime(); deltaLoop = endLoopTime - beginLoopTime; if(deltaLoop > desiredDeltaLoop){ }else{ try{ Thread.sleep((desiredDeltaLoop - deltaLoop)/(1000*1000)); }catch(InterruptedException e){ } } } } private void render() { Graphics2D g = (Graphics2D) bufferStrategy.getDrawGraphics(); g.clearRect(0, 0, WIDTH, HEIGHT); render(g); g.dispose(); bufferStrategy.show(); } protected void update(int deltaTime){ b3.update(deltaTime); System.out.println(deltaTime); } protected void render(Graphics2D g){ b3.paint(g); } private class TAdapter extends KeyAdapter {
public void keyReleased(KeyEvent e) { b3.playerSprite.keyReleased(e); }
public void keyPressed(KeyEvent e) { b3.playerSprite.keyPressed(e); } } public static void main(String [] args){ Game ex = new Game(); new Thread(ex).start(); } } |
|
|
|
|
|
15
|
Game Development / Game Play & Game Design / Re: Canvas setting background Image for games/Other Canvas...<Solved>
|
on: 2012-03-25 22:51:18
|
Ok so.. if xVel= 3; delta = 14/1000 = .014 xPos += (xVel * delta); ? And you're saying this should sync things further?.. Also am I understanding Delta? such as in a board class passing through delta to other classes where I can control time such as adding counters to delta and then testing time such as delta being passed into my sprite class's setTick method? This is really the only thing I don't seem to understand in game design..other wise I feel that i'm ready to move on with my game, but as of now this is the only problem i'm having with graphics and time updating. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
| public void setTick(int delta) { tick += delta; Main sprite tick for movement mainTime += delta; aniTime += delta; aniTime2+=delta; if (tick >= 500) { mainSpriteTick++; tick = 0;
} } |
|
|
|
|
|
17
|
Game Development / Game Play & Game Design / Re: Canvas setting background Image for games/Other Canvas/graphic questions
|
on: 2012-03-25 21:57:33
|
Is my logic correct? Such as accumulating delta time and updating stuff w.e time I want like 500ms? And where should I be multiplying delta? For example In my setTick Method in my monster Sprite class for my main sprite movement it updates every 500ms. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
| public void setTick(int delta) { tick += delta; mainTime += delta; aniTime += delta; aniTime2+=delta; if (tick >= 500) { mainSpriteTick++; tick = 0;
} |
|
|
|
|
|
18
|
Game Development / Game Play & Game Design / Re: Canvas setting background Image for games/Other Canvas/graphic questions
|
on: 2012-03-25 19:15:24
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
| long desiredFPS =100; long desiredDeltaLoop = (1000*1000*1000)/desiredFPS; boolean running = true; public void run(){ long beginLoopTime; long endLoopTime; long currentUpdateTime = System.nanoTime(); long lastUpdateTime; long deltaLoop; while(running){ beginLoopTime = System.nanoTime(); render(); lastUpdateTime = currentUpdateTime; currentUpdateTime = System.nanoTime(); update((int) ((currentUpdateTime - lastUpdateTime)/(1000*1000))); endLoopTime = System.nanoTime(); deltaLoop = endLoopTime - beginLoopTime; if(deltaLoop > desiredDeltaLoop){ }else{ try{ Thread.sleep((desiredDeltaLoop - deltaLoop)/(1000*1000)); }catch(InterruptedException e){ } } } } |
1 2 3 4 5
| protected void update(int deltaTime){ b3.update(deltaTime); System.out.println(deltaTime); } |
Then I take delta pass it through update which is then passed through set delta method to my board class b3.update(delta time) that is then passed through for other methods dealing with time such as animations and movement. Or is that incorrect? The other methods in the board class such as playerSprite.setTime(takes in delta from the board class) and then looks over that time and checks if seconds go by or minutes to do game updates based on the overall delta time of the main games time. Example of MonsterSprites methods dealing with delta time. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
| public void setTick(int delta) { tick += delta; mainTime += delta; aniTime += delta; aniTime2+=delta; if (tick >= 500) { mainSpriteTick++; tick = 0;
} } |
When I set it to 100fps as opposed to60fps at 100 fps things seem to move slightly faster than they should like 3 frames tick for monster movement looks like 5-6 at 100fps+. Isn't this correct? What am I doing wrong??? It appears that my game Logic is faster than it should or should I not even worry about 100fps as long as 60fps stays the same? I was before just using timer every 14ms to update an action preformed method to do update logic and repaint(), found this loop on the forums and it seems much better although, can someone please explain how to sync game logic properly? Thanks
|
|
|
|
|
29
|
Game Development / Game Play & Game Design / Re: Canvas setting background Image for games
|
on: 2012-03-24 20:44:21
|
|
@Ra4king yea I understand that part, but for a background Image in canvas how do I set a static background Image like paint component does in Jpanel or do I just draw it first? I don't want to have to keep re painting it right? 2nd question, to clear a canvas you do clear rect right or something else?
|
|
|
|
|
|
Add your game by posting it in the WIP section,
or publish it in Showcase.
The first screenshot will be displayed as a thumbnail.
|
|