Hi !
Featured games (91)
games approved by the League of Dukes
Games in Showcase (757)
Games in Android Showcase (229)
games submitted by our members
Games in WIP (844)
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 18: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 17: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 20: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 14: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 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 14:23:13
Quick run down on rendering.


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.


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-01 22: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 21: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 20: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 16:24:46
I'm using the Slick2d library to create a game, with a large background. I'm using
      for(float x = 0; x < mapwidth; x+=200){
         for(float y = 0; y < mapheight; y+=200){

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]
EgonOlsen (78 views)
2018-06-10 19:43:48

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

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

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

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

nelsongames (157 views)
2018-04-24 18:14:32

ivj94 (898 views)
2018-03-24 14:47:39

ivj94 (162 views)
2018-03-24 14:46:31

ivj94 (811 views)
2018-03-24 14:43:53

Solater (175 views)
2018-03-17 05:04:08
Java Gaming Resources
by philfrei
2017-12-05 19:38:37

Java Gaming Resources
by philfrei
2017-12-05 19:37:39

Java Gaming Resources
by philfrei
2017-12-05 19:36:10

Java Gaming Resources
by philfrei
2017-12-05 19:33:10

List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05 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‑
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!