Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (477)
Games in Android Showcase (107)
games submitted by our members
Games in WIP (535)
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]
1  Games Center / WIP games, tools & toy projects / Re: Eclipse - Moon Base Simulator on: 2013-09-08 20:58:09
Cool. I mean the construction button. You have to open the construction tab, and the buttons in the top left for some reason don't work. And then if you open a type in the tab, it pops below it, and it is all a bit confusing. Its like if you had to open the minecraft creative tab to pick a block and then you could use only that block.

I have to ask how did you get your jar to open on click, mine you have to go into the cmd to open.
2  Games Center / WIP games, tools & toy projects / Re: Eclipse - Moon Base Simulator on: 2013-09-08 19:21:53
I played it, it was OK. I think it has a lot of potential, the art is pretty nice and i really like the music.
Really i dont understand what the point of having to enter the menu to access the different buttons. I think you should just put one of every material where they are now, and let them use numbers or click on them to change.
I don't really see a goal in mind, but then again, games like minecraft didnt have goals either. I guess since it is a moon base simulator, it doesnt really need one
A tutorial would really come in handy, i didnt understand what to do and how the controls worked. I think you should prioritize stuff like that before you make trading with the complex graph simulations.

Good luck.
3  Game Development / Newbie & Debugging Questions / Re: Rendering an Image once and De-rendering on close on: 2013-09-02 22:20:18
Wow, thanks for all the suggestions everyone, i will definitely implement rendering only objects on screen. Also, i checked out the parallax scrolling video, and it looks really awesome! So i'll be figuring out a solution for that as well, and dumping the old images for individual sprite stars.
4  Game Development / Game Play & Game Design / Re: How to render a map... on: 2013-09-02 16:46:47
Hey, i think what you're getting at is how to store information, keep that information even if the game is turned off, and read the information to re-create the scenes. One possible method, that i like is XML. There are many types, including DOM, SAX, JDOM, etc. The great thing is that you write the format, and no IDE is required.
If you want to read more, just hop over to http://www.mkyong.com/tutorials/java-xml-tutorials/ to get started. It has stuff like writing to, reading from, creating, enumerating xml files.

Good luck.
5  Game Development / Newbie & Debugging Questions / Re: Rendering an Image once and De-rendering on close on: 2013-09-02 16:23:13
Quick run down on rendering.

Normally,

Update game logic.

Clear current drawing buffer. (this clears everything previously draw)

Render everything.

Swap buffers, flip, blit or w/e. Depends on how you are double buffering and what not.

repeat

Things are cleared every frame. What you seem to need is to draw the images into a texture/image and then just draw that image on the screen and not recreate said texture/image every frame. Also, what you are trying may not be the best way to go about it. If you are doing a space background (stars, planets, dust), then just rendering a bunch of star sprites may be faster due to fill rate which may be what you are hitting. If you could explain what you are trying a little more I am sure myself or some other more experienced member can help you.  Smiley

Hi, thanks for the suggestions!

Ok, so i have my screen, and i'm rendering my ship, enemy ship, planets, and a bunch of other dynamic stuff. The background i am rendering is just black with some stars on it, repeated, as shown in code above. The background image is a 5000 by 2000, and im having trouble rendering it as one piece, hence the code in my first post. My question is that if could somehow make it more efficient. Your suggestion of rendering individual stars could work, only rendering the ones i could see. That has produced some problems in the past, but i'll give it a shot. I can't clarify anymore, that's basically everything on the topic.

So, maybe i could take the screenwidth and screenheight, (+camX, camY of course) and search for all sprites with coordinates in between and draw those sprites only? Would that create too much of a burden on the game, or would it be a viable option? Are there any better ways of doing this?
6  Game Development / Newbie & Debugging Questions / Re: Rendering an Image once and De-rendering on close on: 2013-09-02 00:22:27
Ah, its OK.

The BigImage thing still doesn't work. I get a java.nio.BufferUnderflowException error, since apparently i'm running out of memory. I added memory by using -Xmx128m -Xms128m to give the vm more room, but still it gives the error. I've tried using other file formats such as VGA. Some more help would be appreciated, or other solutions all together.

And for rendering, i tested it that on pausing it stops rendering and everything disappeared, so i guess the solution i envisioned is pretty much impossible.
7  Game Development / Newbie & Debugging Questions / Re: Rendering an Image once and De-rendering on close on: 2013-09-01 23:49:32
Thanks for all the suggestions! Firstly, my image is not a solid color, it is a black image dotted with star like shapes, so scaling will make it look weird.
I will go try out BigImage, it looks promising, but it might become obsolete when i create random background with many different star fragments later on(this is fine for now).

Sorry, i recently started creating games (i coded other applications for a while), so i don't really know how rendering works down at core levels, but if only drawing an image once and making it stay there cannot work, you could just say it.

Thanks for the suggestions.
8  Game Development / Newbie & Debugging Questions / Re: Rendering an Image once and De-rendering on close on: 2013-09-01 22:51:07
That doesn't help, since the image is too big to render in one piece. That's why i cut it up and rendered the pieces in the code above, since the GPU can't handle one huge image. I've tried only rendering it under the window, but that just created a lot of flickering and graphical bugs.
My question is how to instead of rendering it every game loop, rendering it just once at the beginning of the state.
9  Game Development / Newbie & Debugging Questions / Rendering an Image once and De-rendering on close on: 2013-09-01 18:24:46
I'm using the Slick2d library to create a game, with a large background. I'm using
1  
2  
3  
4  
5  
6  
7  
mapback.startUse();
      for(float x = 0; x < mapwidth; x+=200){
         for(float y = 0; y < mapheight; y+=200){
         mapback.getSubImage(0,0).drawEmbedded(x,y,200,200);
         }
      }
      mapback.endUse();

to draw the same background over a large area, but it takes a bit of GPU and its slowing my game down and creating graphical glitches.

So is there a way to draw the image once (maybe in the init()) with OpenGL or something, so that i dont have to update it every loop. The image is static and only goes away when the state changes, so i will have to also dispose of the image, too.

Thanks in advance.
Pages: [1]
 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

Riven (7 views)
2014-07-29 12:53:52

Dwinin (7 views)
2014-07-29 10:59:34

E.R. Fleming (23 views)
2014-07-29 03:07:13

E.R. Fleming (9 views)
2014-07-29 03:06:25

pw (39 views)
2014-07-24 01:59:36

Riven (39 views)
2014-07-23 21:16:32

Riven (26 views)
2014-07-23 21:07:15

Riven (28 views)
2014-07-23 20:56:16

ctomni231 (59 views)
2014-07-18 06:55:21

Zero Volt (51 views)
2014-07-17 23:47:54
HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54

HotSpot Options
by Roquen
2014-05-06 15:03:10

Escape Analysis
by Roquen
2014-04-29 22:16:43

Experimental Toys
by Roquen
2014-04-28 13:24:22
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!