Java-Gaming.org Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (744)
Games in Android Showcase (225)
games submitted by our members
Games in WIP (825)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: 1 ... 8 9 [10]
 91 
 on: 2017-12-08 10:03:43 
Started by Apo - Last post by Apo
Day 8: Change

Today it is a one button game where you have to collect all yellow coins.
If you click, the red triangles will rotate and the green triangles will be visible or invisible.

You have to solve 10 levels to get the hint of the day.


 92 
 on: 2017-12-08 09:00:23 
Started by nik312123 - Last post by princec
There is no way around graphics taking up the amount of system RAM that they do. The best you can do is pack them all tightly into a single big BufferedImage and blit out chunks when you want.
"Blitting" btw is an old term, "blit" being short for "block image transfer". In other words, copying a rectangle of pixels from one place to another. It's almost always hardware accelerated these days, even with BufferedImage, and BufferedImage is a perfectly sensible way to do everything.

Of course if you wanted to do something a bit more modern you'd use JavaFX. And if you wanted to get a bit more fancy, LWJGL.

Cas Smiley

 93 
 on: 2017-12-08 07:49:44 
Started by nik312123 - Last post by nik312123
So, the main thing I seem to be getting from this thread is that sprite sheets are a good way of reducing memory usage. The way my game is set up, the intermediate loading screen would not really work too well. Although, I'll look into it anyway.

I'm going to use a profiler to see what things are taking the most resources. (I already know that BufferedImages take up around 99% of the RAM usage, so I'll try and look more specifically at the methods.) I'll update with any questions I have involving that later.

Other than that, I can't seem to find many other ways to reduce the amount of RAM being taken up by the large quantity of images I have. If there are any other general tips anyone could provide when dealing with many resources, I would appreciate it.

 94 
 on: 2017-12-08 06:57:00 
Started by nik312123 - Last post by Abuse
Maybe I'm confused, but I recall that Java automatically caches a VolatileImage copy of a BufferedImage somewhere if you draw that image a lot, meaning that it is in fact best to use BufferedImages for your regular textures.

Essentially yes, VolatileImages are generally only of relevance for the target of a draw, not a source.
Typically of use if you're doing some fancy compositing, or buffering.

If all you're doing is drawing images, stay well clear of them.

 95 
 on: 2017-12-08 05:36:49 
Started by dime26 - Last post by CyanPrime
@CyanPrime

 96 
 on: 2017-12-08 03:20:33 
Started by SHC - Last post by SHC
Thank you all for the responses. I have opted to the startup as well, and it is extremely fun way (though we are working with PureScript, a functional programming language). I just finished moving to the new city.

 97 
 on: 2017-12-08 02:27:18 
Started by nik312123 - Last post by cygnus
Maybe I'm confused, but I recall that Java automatically caches a VolatileImage copy of a BufferedImage somewhere if you draw that image a lot, meaning that it is in fact best to use BufferedImages for your regular textures.

 98 
 on: 2017-12-08 02:12:09 
Started by nik312123 - Last post by nik312123
Hmmm... Based on what I looked up for "blitting," I do resize some images in Graphics.drawImage() or use AffineTransform. I also have several images where I change the AlphaComposite to change the transparency. If I am misinterpreting the term "blitting," please let me know.

 99 
 on: 2017-12-08 01:06:27 
Started by michaelreldred - Last post by michaelreldred
Thanks! a lot for the advice, I updated it and hopefully the tiles are a little more clear.

And about the windows build; I don't like how big it is, but I have a lot of friends who are useless technologically, so I wanted to make it easy for them

 100 
 on: 2017-12-07 23:37:27 
Started by nik312123 - Last post by princec
All in the docs: https://docs.oracle.com/javase/7/docs/api/java/awt/image/VolatileImage.html

Maybe more trouble than it's worth though. Exactly how much blitting are you going to be doing?

Cas Smiley

Pages: 1 ... 8 9 [10]
 
Ecumene (150 views)
2017-09-30 02:57:34

theagentd (225 views)
2017-09-26 18:23:31

cybrmynd (304 views)
2017-08-02 12:28:51

cybrmynd (291 views)
2017-08-02 12:19:43

cybrmynd (301 views)
2017-08-02 12:18:09

Sralse (292 views)
2017-07-25 17:13:48

Archive (980 views)
2017-04-27 17:45:51

buddyBro (1108 views)
2017-04-05 03:38:00

CopyableCougar4 (1685 views)
2017-03-24 15:39:42

theagentd (1434 views)
2017-03-24 15:32: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
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!