Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (499)
Games in Android Showcase (118)
games submitted by our members
Games in WIP (568)
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
1  Game Development / Game Mechanics / Re: Animation (Java/Swing) on: 2012-04-15 16:35:19
I suggest to show draw animation first and then draw complete set
2  Game Development / Newbie & Debugging Questions / Re: 2D tile render on: 2012-04-15 09:23:02
If all your tiles have the same size then you don't need sub images. All you need is to calculate tile index in image and draw that spec. place using drawImage(Image img, int x, int y, int width, int height, Color bgcolor, ImageObserver observer)
3  Java Game APIs & Engines / Java 2D / Re: Strings into buttons ??? on: 2012-04-14 15:37:10
Yup, this is how you put strings into buttons:
Click to Play

I like where this thread go  Grin Grin Grin Grin Grin Grin Grin Grin Grin Grin Grin  Smiley Cheesy Grin Grin Grin Grin Grin Grin
4  Java Game APIs & Engines / Java 2D / Re: Strings into buttons ??? on: 2012-04-14 14:55:56
I think he doesn't know what is swing  Grin. What I have read i understood that he may just render string on screen and want that it would work like button (be clickable and so on)  Smiley
5  Java Game APIs & Engines / Java 2D / Re: [SOLVED] Problem displaying an isometric map portion on: 2012-04-04 07:41:04
Thanks! That looks nice!

Please don't forget to keep posting your progress Smiley

By the way, I kind of feel like the map itself looks weird, why don't you just make it a diamond? So the visible area is even in every axis. I hope you can understand what I mean Smiley Keep it up!
Correct me if I am wrong but there is diamond in that screenshot, but its too big so only top is shown
6  Game Development / Newbie & Debugging Questions / Re: Problems creating jar files. on: 2012-03-31 07:06:59
Jar file is simple archive with .jar ending and you can create with any compressor (7zip or other). And to make it executable it should contain META-INF/MANIFEST.MF file that contains "Main-Class:yourClass"
7  Game Development / Game Mechanics / Re: Handle mouse hovering in the screen. on: 2012-03-30 15:44:28
Unless space is really big you can ignore it  Grin
8  Game Development / Newbie & Debugging Questions / Re: Prevent jar from being easily reverse engineered. on: 2012-03-28 07:26:18
My opinion about security of jar is that its too much hard work for very small benefit.
9  Game Development / Newbie & Debugging Questions / Re: How do I make mouse movement natural? on: 2012-03-28 07:19:33
Trust me you aren't alone thinking that way  Grin and most don't troll about it  Grin. And that makes illusion that your the one and only  Grin  Grin  Grin.
10  Discussions / General Discussions / Re: Flash is a plague on: 2012-03-27 16:56:42
Or if you want to watch Youtube but not ads you could install flash blocking addons like Flashblock for Firefox or other similar.
11  Game Development / Newbie & Debugging Questions / Re: Umm.. Hi? on: 2012-03-24 15:09:51
I just thought 'Hm. Everything is the problem!' Smiley
Nice point of view  Grin
12  Game Development / Performance Tuning / Re: Best motion algorithm on: 2012-03-24 14:59:27
But I think that you should put break after each case or don't make that case, because switch without breaks could execute unwanted code which don't belong to that case (or belong to other case)

switch!=if
That function is clean and correct.

Also, shouldn't this be placed in the newbie section? Wink

Mike
Well looks who's here Cheesy
But i think that if you think that my post is wrong you are wrong!
Switch without break is just a lines of code and no switch.
Case without break is damned to execute all other following cases and code;
P.S. No offence.
13  Game Development / Performance Tuning / Re: Best motion algorithm on: 2012-03-23 15:18:15
Well looks like my eyes deceive me. Because I only look at code but don't compiled it. But I think that you should put break after each case or don't make that case, because switch without breaks could execute unwanted code which don't belong to that case (or belong to other case). And I must admire to teletubo that awt, swing isn't made for games, but you can use it if you don't have anything better. (But mostly there is)

If this is real code then it has some grammatical mistakes and compiler shouldn't compile or run.
Looks like you are missing some ; and break in some switch cases. Also there maybe some other problems that I don't see.
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
   private class DirectionKeyListener extends KeyAdapter {        
        public void keyReleased(KeyEvent event) {
           
          switch (event.getKeyCode()) {
                case KeyEvent.VK_UP:
                case KeyEvent.VK_DOWN:
                    inc_y=0;
                    break;
                case KeyEvent.VK_LEFT:
                case KeyEvent.VK_RIGHT:
                    inc_x=0;
                    break;
            }
        }
    }

14  Game Development / Performance Tuning / Re: Best motion algorithm on: 2012-03-23 14:44:45
If this is real code then it has some grammatical mistakes and compiler shouldn't compile or run.
Looks like you are missing some ; and break in some switch cases. Also there maybe some other problems that I don't see.
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
   private class DirectionKeyListener extends KeyAdapter {        
        public void keyReleased(KeyEvent event) {
           
          switch (event.getKeyCode()) {
                case KeyEvent.VK_UP:
                case KeyEvent.VK_DOWN:
                    inc_y=0;
                    break;
                case KeyEvent.VK_LEFT:
                case KeyEvent.VK_RIGHT:
                    inc_x=0;
                    break;
            }
        }
    }

15  Game Development / Newbie & Debugging Questions / Re: Datastructure for a lot of "People" on: 2012-03-21 13:48:57
Hello,
I think you should use ArrayList or HashMap those structures are mostly used, depending on what you need. And if you don't want to lose any people during performance I suggest to implement checking then you switch between active, passive.
You also can have all those people in memory but don't render passives that way you don't lose any and you don't need to ask SQL each time people state change.
16  Games Center / WIP games, tools & toy projects / Re: Unnamed 4k game on: 2012-03-19 08:20:07
You have Ship battle engine but no Ship building?! That's weird Smiley Just make a shipyard building with 3 predefined ships to choose from.

The overall premise sounds OK. But don't try to bite more you can chew. The opponents and various planets might be too much (or maybe not). Take a look at the ancient Utopia (http://www.lemonamiga.com/games/details.php?id=1102 ), just one planet and dumb aliens appearing from th edge of the map, the gameplay was cool enough. Since you have one planet mostly implemented maybe go that route instead of a full blown space empire?
I think you understand it wrong. I mean Ship building as a concept: you use resources and shipyards (and time) to produce ships. For now you just click and ship pop out from nowhere.
There is 8 predefined ship types (and I don't think I will create more ):
Fighter - cheap fodder and bomber killers.
Bomber - very fast, cheap suicide  bomber capital ships killer. (fighter)
Corvette - capital ships support ship.
Antifighter Frigate - fighter killer capital ship.
Plasma Frigate - capital ships killer.
Destroyer - name says everything Cheesy Bad boy (vulnerable to bomber attacks).
Carrier - armoured Support, Transport capital ship. Possible fighters and corvette launch platform.
Transport - simple resources transporter.

And for a planet you only need to implement one planet and then all other planet can use that planet as a model but with different parameters. And for empire I currently have one Star system and I wouldn't create more at the moment. Later maybe  Grin for now 1 is OK.

This all fits in 4k?!?!?
I just checked size of code for fun  Grin and it's 16k then simply RARed. And the code is heavy commented. But images  Grin Grin There is >1M  Grin
17  Games Center / WIP games, tools & toy projects / Re: Unnamed 4k game on: 2012-03-16 07:41:21
This all fits in 4k?!?!?
Thanks for noticing  Grin I  noticed it only now that I made my mistake it should be 4X not 4k  Grin
18  Game Development / Game Play & Game Design / Re: Need suggestions/feedback to a generalized game idea. on: 2012-03-14 14:31:32
I have similar idea and that idea is haunting me in may dreams sometimes. And in my mind. But I don't know how to implement it. If you know how to do that please inform me I would like to help to do that.
19  Games Center / WIP games, tools & toy projects / Re: Unnamed 4k game on: 2012-03-14 07:30:30
Yes it's tile based.
20  Games Center / WIP games, tools & toy projects / Unnamed 4X game on: 2012-03-13 12:29:33
Hi all  Cheesy, I want to share with you some screens of what I am building. Its simple complex empire building game.  Grin
You start with several "dumb" soldier (Mens and womens) and old spaceship which don't know how they got here. You  have to rediscover way to stars and kill everything you found there  Grin or what ever you want to do with them. To do that you need to turn on your brains and think how you cold do that. By the way do I say that they are "dumb"  so the progress will be slow  Grin.



Game is made using swing. And for the moment is unplayable. You can gather resources and build building on planet. But you can leave your starting planet ... yet. Also there is no opponent AI so you are safe for now  Grin.
First screen shows Star system view with all planet. Second screen shows one of planet sectors view. For now there is none expect Landing section of your ship transformed into HQ. Third screen show same planet sector but with progress.
You need to feed you pop and your pop do all work. But if you go to beat someone you need to fill ships with crew this means they dont work.
Current fully implemented ideas:
Research
Breading  Grin
Building buildings on planet.
Resources gathering
Ship battle engine
Incomplete:
Planet sector map showing resources position on map: need images
Buildings: need images. Some images is some, but most is missing.
Ship building system. Image again!
TODO
Ship building and orbit facilitys
Travel between planet and stars.
Opponent
and many more ...

So what do you think ?

UPDATE: Added third screenshot
21  Game Development / Shared Code / Re: Loading Images from a project's directory on: 2012-03-13 10:33:20
Maybe anyone know why eclipse spits java.lang.NullPointerException then using getResource(String) or getResourceAsStream(String). Then runing from jar everthing works perfectly.
1  
WorldIcon=new ImageIcon(getClass().getResource("img/world.gif"))
22  Discussions / General Discussions / Re: Go on, ask me anything. on: 2012-03-10 12:54:18
I have a question.

-How many sprites can I update per frame? (for a desktop, say)
-I' a novice in OO programming. Is it really normal to have a separate object for each cell and every entity in the world? Or maybe I should just make separate arrays (Every array repersents some property of the object)
-What to do if I'm supposed to have many thousands of dynamic objects all the time on the screen and many more in the unseen world?
I think i can answer these question Cheesy

1. You can update as many sprites as needed but hight amount may result in lag or other issue of performance.
2. OO- objects oriented. For example: Player (object) can be equipped with sword, shield,... (all objects). Object can have child objects and those object can too have children.
3. Look 1. And if you create many objects make sure you properly dispose of then or garbage collector may couldn't clear them. Which could result in memory leaks.
23  Game Development / Game Play & Game Design / Re: Battle engine, I can't decide. on: 2012-02-27 18:41:22
I think that way is reserved for Chuck Norris  Grin  Grin  Grin
Don't try to copy him or you will explode
24  Game Development / Newbie & Debugging Questions / Re: First tryes with JLabel, i need a bit of a help. on: 2012-02-24 17:53:12
I suggest to start reading this
http://docs.oracle.com/javase/tutorial/uiswing/

All swing component are double buffered so you don't need to worry about hardware accelerations
25  Game Development / Game Play & Game Design / Re: UI and Customizable Characters on: 2012-01-20 09:40:12
-First question, I recently stumbled on a way to create a custom JPanel(image) and custom JButtons(own images) and paint them to a JFrame which holds a  game board for painting 2dgraphics. Is this an ok way to have a UI the custom JPanel with my Custom Buttons on it?
Hello, your described way is called custom painting (overriding components pain or paintcomponent methods) and is common way to make GUI with image as background. You just need to make custom painting to component you want and then add that component to (in your way) JFrame and it will show it. Unless you set layout to null you shouldn't notice any weird behaviour.
26  Discussions / Miscellaneous Topics / Re: [Question]: What are the two addresses everyone knows? on: 2012-01-12 09:31:14
I take quick look at this topic and i could say that recognized only two addresses:

221B Baker Street SHERLOCK HOLMES and
#4 privet drive, Little Whinging  Harry Potter Grin Grin Grin

what are all those other places I didn't knew until Google  enlightened me  Grin Grin Grin
27  Game Development / Newbie & Debugging Questions / Re: Dividing my game into classes? on: 2012-01-11 08:15:52
I think you should read this http://docs.oracle.com/javase/tutorial/java/concepts/index.html
http://docs.oracle.com/javase/tutorial/java/javaOO/index.html
-The levelLoader methods create images which are declared in the main declaration section, and are used in the main loop run() for inGame purposes.  Can Images/any variable or object be passed as arguments as not read only, or can I access the parrent class's global variables some how?
YES! Cheesy
28  Games Center / WIP games, tools & toy projects / Re: Ant Colony Simulator (not really a game) on: 2011-12-15 10:04:16
Very nice idea
both of you  Grin
29  Java Game APIs & Engines / Engines, Libraries and Tools / Re: LWJGL and an IDE on: 2011-12-14 08:10:55
I had performance problems with Netbeans, including insane CPU usage and memory leaks. It worked flawlessly for several years though, so I might have just f*cked something up myself. I'm on Eclipse now though.
I too experienced some strange CPU and memory usage using NetBeans. I mostly use eclipse unless I need to make some fancy GUI using swing Cheesy then I use NetBeans
30  Games Center / LWJGL16k - 2011 / Re: Ideas dump thread on: 2011-11-28 18:32:51
I never have time to do this my self so I can dumb this.
Labyrinth game where player is evil map maker that try to prevent robot with AI for escaping from maze. So it's puzzle game. Map could be basic grid where you can put obstacles and robot have some time/battery limit.
I just want to play this game.
I think there is something like that made in flash
try to look in Kong or else
Pages: [1] 2
 

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

The first screenshot will be displayed as a thumbnail.

Pippogeek (40 views)
2014-09-24 16:13:29

Pippogeek (31 views)
2014-09-24 16:12:22

Pippogeek (21 views)
2014-09-24 16:12:06

Grunnt (47 views)
2014-09-23 14:38:19

radar3301 (29 views)
2014-09-21 23:33:17

BurntPizza (65 views)
2014-09-21 02:42:18

BurntPizza (37 views)
2014-09-21 01:30:30

moogie (44 views)
2014-09-21 00:26:15

UprightPath (53 views)
2014-09-20 20:14:06

BurntPizza (55 views)
2014-09-19 03:14:18
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
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!