Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (539)
Games in Android Showcase (132)
games submitted by our members
Games in WIP (603)
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  
  Starting a new project..  (Read 662 times)
0 Members and 1 Guest are viewing this topic.
Offline syszee
« Posted 2014-06-15 03:14:47 »

Hi there,

So I'm looking to start something official, a project for the summer. I want to actually finish a game, rather than start and push aside. However, before I can do this, I absolutely NEED to know a few things. Please answer any question you see upon reviewing this thread, it'll help me out quite a bit!

1.) How exactly should I go about sizing objects, the main window, etc. I want to work off of a system where you can change the resolution, which is how most games do it, based on a specific set of rations. I also want to know the perfect size for sprites. I've been using 16x16, 32x32, and 64x64. However, 16 is to small, 32 is.. mehh.. and 64 is just kinda to big for small windows. (PS. Whenever resolution is changed, sprites are scaled larger, as well as text, any pretty much anything that is on screen. Basically magnifying the screen).

2.) What exactly is 'clean code'?

3.) What steps should I take within the game? What order? (Planning, Sprite/Character Design, Programming, Mechanics, Story, etc).

4.) How exactly do particles and little text effects work? (For example, taking damage and a little "-1" pops up then fades away. Or picking up ammo and seeing "+20" pop up then fade away.)

& finally, 5.) How should I tackle handling entities? I've been using a handler that cycles through a LinkedList of entities and ticks/renders the selected (or initialized) entity, however this causes many problems for me..

Thank you for reading!
I am hoping to start something soon. Perhaps for my college entry or something.

Also, how easily could I achieve basic lighting?

Offline Longarmx
« Reply #1 - Posted 2014-06-15 03:39:50 »

I will answer these to the best of my ability so forgive me if I mess something up.

1) There are a couple of ways that you could go about doing this. First way: Everything is based off of a default resolution. You scale things (position and size) based on the current resolution / default resolution. Second way: You multiply everything by an orthographic matrix. Everything automatically scales and moves. For sprite size, you aren't constrained by powers of two! Make them whatever size is good. With that being said, always scale by powers of two so that you don't get distorted sprites.

2) This would be code that is modular, easy to read, and not duplicated. It usually takes a long time and a lot of refactoring to achieve something like this. You often go into a project trying to have clean code from the start. You hit a point though, where you just want to get something working, so you create bad code.

3) Planning -> Story -> Programming / Mechanics / Gameplay -> Sprite / Character Design -> Refinement -> $$$
Feel free to take some of these out of order.

4) I'm not an expert at this, but you would basically just have a bunch of little sprites that have a life, color, texture, etc. Then, you just increase the age until it is old enough to 'die'. Then you would remove it from the list. You could also set the transparency to the age to get some sort of fading out / in effect.

5) What problems are you experiencing? Also, if you have an entity, shouldn't it be initialized to be a part of the list? Why would you have uninitialized entities?

6) Are you looking for per-pixel, or for more of a retro style of lighting?

Offline ctomni231

JGO Wizard


Medals: 99
Projects: 1
Exp: 7 years


Not a glitch. Just have a lil' pixelexia...


« Reply #2 - Posted 2014-06-15 05:00:47 »

1.) How exactly should I go about sizing objects, the main window, etc. I want to work off of a system where you can change the resolution, which is how most games do it, based on a specific set of rations. I also want to know the perfect size for sprites. I've been using 16x16, 32x32, and 64x64. However, 16 is to small, 32 is.. mehh.. and 64 is just kinda to big for small windows. (PS. Whenever resolution is changed, sprites are scaled larger, as well as text, any pretty much anything that is on screen. Basically magnifying the screen).

Honestly, there is really no set value for these things. I mean, I've come to prefer windowed applications rather than full-screen, but it totally depends on the game you are making. My resolution of choice of late has been 800 x 600. I have no real reason for it, but I also leave the ability to re-size. I mean, a good resolution is something the player can see after all. Seriously, there is a difference programming for a mobile phone and a high end-PC. Resolution isn't a set value.

The same goes for sprites, the bigger they are, the more detail. So I scale small ( 8 x 8 ) if I want the game to look retro, and large (128+ x 128+) if I want some good detail. Again it depends on the game and the style of how you want it to look. Basic rule, bigger sprites... more detail. If you are just starting and you don't have an artist... try to go smaller.

2.) What exactly is 'clean code'?

"Clean Code is about recognizing that your audience isn’t just a computer, it’s real-live humans! Clean code is a reader-focused development style that produces software that’s easy to write, read and maintain. "

3.) What steps should I take within the game? What order? (Planning, Sprite/Character Design, Programming, Mechanics, Story, etc).

Planning - Mechanics & Sprite/Character Design & Story
Programming (Alpha - Beta) - Mechanics & Sprite/Character Design
Polish - Sprite/Character Design & Story & Programming

4.) How exactly do particles and little text effects work? (For example, taking damage and a little "-1" pops up then fades away. Or picking up ammo and seeing "+20" pop up then fade away.)

Literally, fading effects are done with a combination of the timer and setting transparency. Usually, you just set the transparency to a value and alter it based on the timer.

5.) How should I tackle handling entities? I've been using a handler that cycles through a LinkedList of entities and ticks/renders the selected (or initialized) entity, however this causes many problems for me..

Well, you have to use some sort of array based format, like a factory, and Arraylist, or a basic array. The fact is you have a lot of items and they all have to be organized in some way. There is a lot of ways to accomplish this, but the best is just to look at the various tutorials that exist and emulate their systems for handling entities. It truly is game specific. I've gotten away with a simple int[] sometimes, and other times I needed a tree of classes. It totally depends.

Also, how easily could I achieve basic lighting?

Basic lighting can sort of be achieved by drawing a lightened texture over the area using polygons, but I'd just suggest picking up LibGDX and learning about LWJGL if you want some really good lighting effects.

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline syszee
« Reply #3 - Posted 2014-06-15 16:55:40 »

Wow thank you for providing such detail!! It all really helped a lot! Especially the age/die thing. What is the easiest second loop?

if(System.currentTimeMillis() - timer > 1000){
timer+=1000;
age++;
}

if(age >= 3) die();

??

& For the lighting, yes.. more retro! Smiley

Offline syszee
« Reply #4 - Posted 2014-06-15 16:59:47 »

Thank you for the detail! ^^ The way of particles I'm being opened up to makes so much more sense than me trying to figure it out in my head..

You could have the particle method.. and its render.. and of course tick..
setting it so that it dies whenever the set age is met.. now I just need a really clean and easy second timer..

& Yea, I'm thinking of giving libgdx a try soon. Smiley

Offline syszee
« Reply #5 - Posted 2014-06-15 17:20:37 »

Actually, regarding you say you use 8x8 for small sprites... wouldn't that make the object in game harder to see?

Offline ctomni231

JGO Wizard


Medals: 99
Projects: 1
Exp: 7 years


Not a glitch. Just have a lil' pixelexia...


« Reply #6 - Posted 2014-06-15 17:44:24 »

Actually, regarding you say you use 8x8 for small sprites... wouldn't that make the object in game harder to see?

Yes.

That is the smallest I ever went with a sprite. That sprite was for a checkerboard piece and it was visible enough to see. I mean obviously, it will be harder to see if it is smaller... but you have to do a lot less detail (faster art). Game making is up to judgement, so don't take everything stated as 100% solutions to your problems. Making judgement calls is one of the most important parts of game making. As I said before, it depends on the game you want to make...

Online DarkCart

JGO Knight


Medals: 24
Projects: 7
Exp: 2 years


Power of the mind over flesh


« Reply #7 - Posted 2014-06-19 00:11:09 »

On the size, I like to use 40x40 or 45x45 pixels, but that's just my preference.

Play Mazer | Or visit Sticks | Or try out SJGL
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.

rwatson462 (35 views)
2014-12-15 09:26:44

Mr.CodeIt (26 views)
2014-12-14 19:50:38

BurntPizza (53 views)
2014-12-09 22:41:13

BurntPizza (86 views)
2014-12-08 04:46:31

JscottyBieshaar (48 views)
2014-12-05 12:39:02

SHC (63 views)
2014-12-03 16:27:13

CopyableCougar4 (66 views)
2014-11-29 21:32:03

toopeicgaming1999 (126 views)
2014-11-26 15:22:04

toopeicgaming1999 (117 views)
2014-11-26 15:20:36

toopeicgaming1999 (34 views)
2014-11-26 15:20:08
Resources for WIP games
by kpars
2014-12-18 10:26: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
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!