Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (523)
Games in Android Showcase (127)
games submitted by our members
Games in WIP (592)
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 3 ... 5
1  Game Development / Newbie & Debugging Questions / Re: Space shooter scrolling on: 2007-12-27 01:09:25
Thanx ill give that a try. Actually I am just following the player ship, which is set correctly at the center of the screen.
My game right now gets the current desktop resolution and it centers the player ship correctly on the screen.

Ill give this a try when i get a chance thanx.

2  Game Development / Newbie & Debugging Questions / Space shooter scrolling on: 2007-12-26 13:54:53
Hello all,

I am currently working on a 2d space shooter. One of my early problems that I am having right now,
concerns with the chase camera for the space ship. I have successfully made a scrolling tile map,
but I am having difficulty making a scrolling space shooter. If I have my ship start at x:800 and y:500,
then when I move that ship, I want the screen to follow, as the other objects move out. Well how can
I move a "chase camera" without modifying the actual x,y positions of the other objects?

Thank you.
3  Game Development / Shared Code / Re: TileMap Generator + Scroller v2.0 on: 2007-08-13 23:56:59
sorry about that, but on the page there is a button that says "Download Now" click that, and hopefully the servers arent busy.
also fyi, i made this quite a long time ago, my hexagonal engine is better.
4  Game Development / Newbie & Debugging Questions / dumb problem with gameLoop on: 2007-06-20 21:20:19
Grrr, I have yet another question about my gameloop. I cant seem to make an fps counter that is "fluid." It worked perfectly in my other programs, but now it doesnt anymore,
When I try to use a sleep timer it doesnt work, can someone here take a look at my gameloop, and tell me what is wrong? Also, I would like to know if it will work well.

This is based off the LWJGL kev glass tut:

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  
public void frameRendering() {      
      SystemTimer.sleep(lastLoopTime+2-SystemTimer.getTime());
     
      // work out how long its been since the last update, this
      // will be used to calculate how far the entities should
      // move this loop
      long delta = SystemTimer.getTime() - lastLoopTime;
      lastLoopTime = SystemTimer.getTime();
      lastFpsTime += delta;
      //fps++;
     
      // update our FPS counter if a second has passed
      if (lastFpsTime >= 100) {
         renderer.setTitle(title+" (fps: "+fps+")");
         lastFpsTime = 0;
         fps = 0;
      }
     
      // START LOGIC \\
     
     
     
      // END   LOGIC \\
     
      //boolean leftPressed = window.isKeyPressed(KeyEvent.VK_LEFT);
     
      // if escape has been pressed, stop the game
      if (renderer.isKeyPressed(KeyEvent.VK_ESCAPE)) {
         System.exit(0);
      }
     
      currentFrameFps = (SystemTimer.getTime()-lastLoopTime);
     
      if (currentFrameFps > 0) {
         fpsLog[fpsFrameCount] = (1000000/currentFrameFps);
      }
      fpsFrameCount++;
      fps = 0;
      for (long fps1: fpsLog) {
         fps += fps1;
       }
      fps /= fpsLog.length;
      if (fpsFrameCount >= fpsLog.length) { fpsFrameCount=0; }
   }



Game constructor:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
public Cosmos() {
      // create a window based on a chosen rendering method
      renderer = ResourceFactory.get().createRenderer();
     
      renderer.setResolution(Display.getDisplayMode().getWidth(),
                        Display.getDisplayMode().getHeight());
      renderer.setRendererCallback(this);
      renderer.setTitle(title);
      fpsLog = new long[8]; // keep 8 integer digits of fps logging
      lastLoopTime = SystemTimer.getTime();
      renderer.beginRendering();
   }



declarations:

private long lastLoopTime = SystemTimer.getTime();
   
   /** The time since the last record of fps */
   private long lastFpsTime = 0;
   /** The recorded fps */
   private int fps;
   
   private long currentFrameFps;
   
   private long[] fpsLog;
   private int fpsFrameCount = 0;
5  Java Game APIs & Engines / Java 2D / Re: getting very high FPS with standard Java 2D on: 2007-05-30 03:42:27
So should I just use sleep(1) or what? Because i hate loosing frames, even if it doesnt matter, but i have not made a cpu intensive game yet.
I seem to multi task with uncapped frames with no problem, but its early on in development.
6  Java Game APIs & Engines / Java 2D / Re: getting very high FPS with standard Java 2D on: 2007-05-29 04:21:40
I actually dont use a sleep at all, i think sleeps are evil. Am I wrong? If the animations are synced with any framerate, there should be no sleeping Smiley
7  Java Game APIs & Engines / Java 2D / Re: getting very high FPS with standard Java 2D on: 2007-05-29 01:22:53
When I use java2D my fps is also that high, but it will go down down quickly as you draw more stuff. When i enable openGL pipelines they can be as high as 600-1600 , just depends.
8  Java Game APIs & Engines / Java 2D / Re: Drawing 2D graphics on: 2007-05-16 22:17:51
No, but you can use the 3d environment in 3ds max and easily make rendered 2d pictures, that are for backgrounds etc.
9  Java Game APIs & Engines / Java 2D / Re: Drawing 2D graphics on: 2007-05-15 04:53:10
Use photoshop, or use 3ds studio max, you can render the 3d models and make it look nice.
10  Game Development / Networking & Multiplayer / Re: Is it ok? on: 2007-04-26 22:06:55
i actually decided not to do Swing, and just wanted to do straight LWJGL.
11  Java Game APIs & Engines / Java 2D / Re: 2D lighting effect? on: 2007-04-19 22:57:05
thanx. these look like good articles.
12  Java Game APIs & Engines / Java 2D / 2D lighting effect? on: 2007-04-19 04:50:16
Any ideas/ways to code 2D lighting effects? Like lets say, its a 2d-top-down game, and if I add lights like torches, lamps etc, i would
like it to illuminate part of the map, in a circular fashion. I am also interested in shadows for objects to cast, well sure i could just use the transparency,
but what if I want any object to cast shadows... in real time, based on the sun's position, or light casting. Is it possible in 2d? Also when the character
moves i would like a more "circular" fog-of-war" and not just the square tiles (jaggidly) showing more of the map Smiley.
13  Game Development / Networking & Multiplayer / I need help being pointed in the right direction... on: 2007-04-09 03:18:01
Ok.

I am going to of course make my game work for single player, as my personal sand-box testing.
Yet, I disprove of writing code twice, to make it work for multi-player.

The game its self- graphically will be pretty simple, it will utilize Java swing components, along with a canvas that will show some of the
menus, and part of it will show the visible tiles of the map.
- The player(s) can move 1 square at a time, and each tile contains monsters, buildings, objects, npcs, players, you name it.
- Each player has a set of skills, traits, etc.

Well for single player, it is somewhat self-explanatory on how to store it:
It could be: "written into a .txt file", or "hard-coded, but .txt file for (saving)"

Well, we all know that any (MMO), (dont yell at me yet) always is "constantly saving" somehow.
Well I know nothing about online/server databases at all. I need to code my game to work for an online database somehow.
I need to store pass-words and everything somehow.

- I will also need to somehow update people's clients, and update my server with those scripts of mine.
- Because the game, things constantly die, respawn etc, this must be know to the clients and the server somehow.

Help point me in the direction. I would like to code it - "server ready," and it sounds like "writing scripts to .txt files" will not cut it for multi-play.I can make a web-site, but I dont know how to utilize "servers" or those login-thingys Smiley.

I plan to take years on this before it goes online, but i need help with the database lingo, like I need help.
14  Game Development / Networking & Multiplayer / Is it ok? on: 2007-04-07 11:28:30
Is it ok to make a 2d-tile rpg game kinda like...  http://www.forlornonline.com/

but in java swing, and each user has an independent client with my game installed.
I want to use java swing and display a Java2D canvas for the small tile map in the corner of the swing.
I always dreamed of starting a small online community like this.

I am not skilled enough to do this stuff online, but I was going to work a single player version of my game first.
..then ill have to learn networking somehow. I will need a server someday when I have actual money.

I would like users with their java swing clients to be able to log in, chat and do anything in the game.
I do not like scripting or browser's, I like clients.

I do think i would like to build my game so it will be easier to port to online-play, like getting the server ready, and managing the data, saving etc.
15  Java Game APIs & Engines / jMonkeyEngine / Re: Proper Terrain heightmap scale etc on: 2007-03-30 20:02:24
its alright, i pretty much figured it all out, pretty much rendering less triangles is better, so expanding the terrain is faster, so the farplane will render less triangles. large 513x513 maps are for giantormus environemnts.
16  Java Game APIs & Engines / jMonkeyEngine / Re: Proper Terrain heightmap scale etc on: 2007-03-27 20:56:29
oh, ok, i already did basically post the same question there before i posted this one, just everthing feel so "slow" at replies.
17  Java Game APIs & Engines / jMonkeyEngine / Proper Terrain heightmap scale etc on: 2007-03-27 06:44:37
I need consistent 512x512 textures to match and look like 512x512 textures to play models.
i have been experimenting with grayscale images as heightmaps. Yet, im trying to get the right size to go along with the water.
and is scalling too much bad? i need a huge islands with water. ive tried 256x256, and then i scale it a lot, but then the water looks too small, and the textures are too large for up-close games.

18  Java Game APIs & Engines / OpenGL Development / Re: Is this API for me? on: 2007-03-23 02:15:10
ok, i guess it has transparency so its better?

http://www.ilixis.com/developer/tga.html

19  Java Game APIs & Engines / OpenGL Development / Re: Is this API for me? on: 2007-03-23 02:08:12
But TGA does not carry transparency data?
20  Java Game APIs & Engines / OpenGL Development / Re: Is this API for me? on: 2007-03-22 22:39:57
You say I should not use .png's for tiles on a 2d map? Why not? PNG has transparency information, which I need for tile blending etc.
While, .BMP is huge in file size and I say its good for backgrounds or 3d games. Yeah .png has only 16-bit color but I guess its enough for 80x80 px tiles.

One of my major internal debates going on, is what tile size should I use. I want to support both window and full screen modes for any supported resolution.
I persoanilly would play on 1280*1024 fullscreen. The minmum my game will allow is 1024*768 window or full screen (nothing lowers), because the player is going to need space to see ahead in the rpg.

Ok, I do have a tile map renderer that I made for Java2D, I will port it to LWJGL, and I have ran my program through various tile sizes. I am deciding between:

100x100 px
80x80 px

or something like that.

There are advantages to both larger and smaller tiles.

First of all, I notice my speed increases (fps) is I use larger tiles, because there is less to loop through on-screen.
However, large tiles provide more limited terrain showing. Like you wont see as much of a lake or something.
But smaller tiles, show more terrain, and its details, yet the stuff closer will be less detailed.

Larger Tiles (100x100+)
Provide better texture quality.
More up-close detail, more detailed grass/detail objects.
Actual map will have more running distance.
Improves fps a little bit.

Smaller Tiles (Less than 80x800)
More visible land on screen, better gameplay.
Terrain is more visible, more pleasing.
Things like lakes, trees, and environment are more obvious, may be more immersive.
Less 'wasted' off-screen parts of tiles rendered.


The size of the tiles will not affect the way I place housing, or objects etc. My houses, and characters will be similar size.
The size of the land matters, because it will show terrain. Like I could use 256x256 tiles, but that is stupid, because then my lake would have transitions that are retarded, and very boxy.

Each square of land will contain a certain amount of resources, etc, so keep that in mind also.

My collision detection has nothing to do with the tiles at all, my objects and house images etc will be the ones you collide with, not tiles.
The tiles you collide with will be the water blending/walls.

My map editor will let you place terrain, in a tile-based fashion. Yet, when you place housing, details like grass/shrub/trees, or weapon pickups, those items will be placed exactly where you click on the map (objects DO NOT bind themselves to tiles).
21  Java Game APIs & Engines / OpenGL Development / Is this API for me? on: 2007-03-22 06:06:51
I've been wondering which is the 'best' API for me. I am choosing between this (LWJGL) and JOGL.

I want to write a 2d using this, and I will not need swing, or do I? I do not need to make swing interfaces at least.
The real question is, which is faster, and I am going to use the API for a pretty complex/large 2d rpg with tile maps,
a lot if tile rendering with .png's. LWJGL has a sound api built-in and it doesn't use swing which is a plus. And which is more 2D friendly?

Thank you.
22  Java Game APIs & Engines / Java 3D / Re: Wanting to Dive into Java3D on: 2007-03-18 06:37:42
darn, the college im going to has more bias towards c++, all the intro courses and forward are c++.
there is one java programming course, but I would rather be super at one language than dabble around.
sigh i guess id better get better for that, and this is annoying because my high school teachers java in the AP class,
and if i get 3,4,5 on the test, then i get credit for the intro to c++ course, then they would stick me right into a c++ course about data structures, classes, and link lists etc when i never done that before in c++!!
23  Java Game APIs & Engines / Java 2D / Re: A couple of questions about Java on: 2007-03-10 17:48:12
I did incorporate a numerical zoom in / zoom out function on both my tile and hex map programs. They work well, and they only draw the tiles they need. So yes, i did an afflineline transform in the tile draw methods. I also draw coordinates and grids both both programs. If you need, i could upload my tilemap and hexmap program for you to download, yet i dont have many comments so it may look strange, and i never said they way i handled multiple maps was good coding style either lol. i could most easily upload them both in .jars and you can extract their resources from a zipping program.
24  Java Game APIs & Engines / Java 2D / Re: A couple of questions about Java on: 2007-03-10 05:12:00
If you run opengl pipelines transluecent images will not slow the game much. I use transparent .png images, and i have a tilemap (and haxagon) program that supports any resolutions you want, so if you wanna talk...
25  Java Game APIs & Engines / Java 3D / Re: Wanting to Dive into Java3D on: 2007-03-07 23:49:00
the best on this batch of shots...

http://www.ogre3d.org/index.php?set_albumName=album07&option=com_gallery&Itemid=55&include=view_album.php
26  Java Game APIs & Engines / Java 3D / Re: Wanting to Dive into Java3D on: 2007-03-06 23:39:17
well... its somewhat true in the ultra professional world...
27  Java Game APIs & Engines / Java 3D / Re: Wanting to Dive into Java3D on: 2007-03-05 23:22:43
...but I still say its 'better.'
28  Java Game APIs & Engines / Java 3D / Re: Wanting to Dive into Java3D on: 2007-03-03 02:52:08
ok, i am cured.

i switched back to java again. mainly because i still need to be dedicated towards it for school, and ya...
29  Java Game APIs & Engines / Java 2D / Re: Isometric Tile Engine on: 2007-02-28 05:19:05
yes, just be sure you sync the animations/scrolling with high fps, and remove the sleep delay.
30  Java Game APIs & Engines / Java 2D / Re: Isometric Tile Engine on: 2007-02-27 23:55:23
I have a 2d tile map(not isometric) and a hexagonal map engine that work and only show visible tiles on the screen. Check out GameDev.net about this topic, they discuss it. I used java2D and openGL pipelines, and boast 800+fps on 800*600 window on both engines.
Pages: [1] 2 3 ... 5
 

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

The first screenshot will be displayed as a thumbnail.

SHC (24 views)
2014-11-25 12:00:59

SHC (23 views)
2014-11-25 11:53:45

Norakomi (21 views)
2014-11-25 11:26:43

Gibbo3771 (22 views)
2014-11-24 19:59:16

trollwarrior1 (36 views)
2014-11-22 12:13:56

xFryIx (74 views)
2014-11-13 12:34:49

digdugdiggy (52 views)
2014-11-12 21:11:50

digdugdiggy (46 views)
2014-11-12 21:10:15

digdugdiggy (41 views)
2014-11-12 21:09:33

kovacsa (68 views)
2014-11-07 19:57:14
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

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
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!