Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (491)
Games in Android Showcase (112)
games submitted by our members
Games in WIP (556)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Hi-just some questions..  (Read 734 times)
0 Members and 1 Guest are viewing this topic.
Offline HELL

Junior Newbie





« Posted 2009-07-25 14:39:53 »

Hi im new to the forums but I've actually been programming in java for like 2 years now. Im pretty good at it, I know the basics, control statements, oop, data structures (how to use the predefine ones and also build my own ones) and recursion. Basically I just passed all my programming courses with more than a decent grades and I like programming a lot (overall) But I just recently started on game development like a couple of months ago.

So I read a good tutorial (coke and code) made by kevin, and actually learned a lot about game programming in general (like how the main game loop works and double buffering) kevin's tutorial help me a lot to make my own game (an rpg one). I'm implementing the worlds map and it looks pretty well, I've already implemented collision detection and map limits but still I got a few questions, here:

is it ok to implement collition detection seperately and only when the player (or entity)moves¿? let's say.. when the player moves right
it will only check for collision in that direction.. same will apply for lets say.. and AI that moves on any direction it will check for collition in that direction if it does a battle will start (because it's an rpg, battles are usually encountered by touching an enemy or walking on certain areas)


the way im implementing levels on the world is like this: Im making a class Level that contains the background of the level and an arraylist that keeps all the entities that exist in that level (for collision detection) so I made an array of this level class and put on the player class to variables posWX and posWY that represents the coordinates of the player in the world so when the player reaches a limit of the level in lets say ... Right the posWY (since its level[WX][WY]) gets updated (posWY++)  hence the game loop starts drawing that level and everything that's on that level (also adding the player there so it doesnt dissappear) Im I doing it ok or theres a much better way of doing this¿?


And also, what's up with FPS on my game, it seems that on diffrenet comps is not the same at all, is there a way to ensure that things like that don't happen.

Also I've got some questions not related to games but maybe someone could point me out good on this.

what's a good tool to make my app stand alone (.exe) I've tryed a lot of free software but none of them could actually made the application stand alonable.

what's a good tool to make a setup or w.e to deploy my app (preferably that's not webstart, I can learn how to do it on my own with webstart)

and that's pretty much all for now, thanks in advance (if you ever reply that is!)

=P
Offline kevglass

JGO Kernel


Medals: 159
Projects: 23
Exp: 18 years


Coder, Trainee Pixel Artist, Game Reviewer


« Reply #1 - Posted 2009-07-25 17:29:26 »

Quote
is it ok to implement collition detection seperately and only when the player (or entity)moves¿? let's say.. when the player moves right
it will only check for collision in that direction.. same will apply for lets say.. and AI that moves on any direction it will check for collition in that direction if it does a battle will start (because it's an rpg, battles are usually encountered by touching an enemy or walking on certain areas)

Sounds fine to me - the tutorial approach of checking everything against everything is just naive to keep things simple.

Quote
the way im implementing levels on the world is like this: Im making a class Level that contains the background of the level and an arraylist that keeps all the entities that exist in that level (for collision detection) so I made an array of this level class and put on the player class to variables posWX and posWY that represents the coordinates of the player in the world so when the player reaches a limit of the level in lets say ... Right the posWY (since its level[WX][WY]) gets updated (posWY++)  hence the game loop starts drawing that level and everything that's on that level (also adding the player there so it doesnt dissappear) Im I doing it ok or theres a much better way of doing this¿?

Again sounds pretty reasonable for a first ditch. You're probably best to follow:

a) Make it work - get it working and act as you expect
b) Make it perform - optimize anything that doesn't perform well enough for your needs
c) Make it pretty - make the code look nice, make it extendable, make it safe.

Quote
And also, what's up with FPS on my game, it seems that on diffrenet comps is not the same at all, is there a way to ensure that things like that don't happen.

In short, not really no. If you're using some native binding you can stick vsync on. That'll cap the FPS to your monitor refresh rate. If not, you could use a timer to ensure the frame takes a fixed timed by sleeping for anything remaining (thats what space invaders 102 is about). However, crap machines will always run slower than good machines. You can either cap reasonably low, only support certain hardware or cope with the frame timing differece.

Quote
what's a good tool to make my app stand alone (.exe) I've tryed a lot of free software but none of them could actually made the application stand alonable.

I like JSmooth - http://jsmooth.sourceforge.net/

Quote
what's a good tool to make a setup or w.e to deploy my app (preferably that's not webstart, I can learn how to do it on my own with webstart)

Webstart isn't so bad. Round here, if you want any one to bother looking at your stuff it needs to be webstarted or an Applet. There's a lot of nonsense thrown around about the differences and which is better. It doesn't really matter a great deal.

HTH

Kev

Offline HELL

Junior Newbie





« Reply #2 - Posted 2009-07-26 18:27:27 »

Thanks for the reply, and JSmooth it's pretty good thanks =) Finally a tool that doesn't have a bothersome message whenever you run the app like : "This was made using the valuation version of  'insert tool name here'."

Quote
a) Make it work - get it working and act as you expect
b) Make it perform - optimize anything that doesn't perform well enough for your needs
c) Make it pretty - make the code look nice, make it extendable, make it safe.
Yeah, I do that.. always.. thanks for reminding me.
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

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

The first screenshot will be displayed as a thumbnail.

Nickropheliac (15 views)
2014-08-31 22:59:12

TehJavaDev (23 views)
2014-08-28 18:26:30

CopyableCougar4 (29 views)
2014-08-22 19:31:30

atombrot (41 views)
2014-08-19 09:29:53

Tekkerue (39 views)
2014-08-16 06:45:27

Tekkerue (35 views)
2014-08-16 06:22:17

Tekkerue (25 views)
2014-08-16 06:20:21

Tekkerue (36 views)
2014-08-16 06:12:11

Rayexar (72 views)
2014-08-11 02:49:23

BurntPizza (49 views)
2014-08-09 21:09:32
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!