Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (480)
Games in Android Showcase (110)
games submitted by our members
Games in WIP (547)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: 1 [2] 3 4 5
  ignore  |  Print  
  Guardian [FINISHED]  (Read 27033 times)
0 Members and 1 Guest are viewing this topic.
Offline matheus23

JGO Kernel


Medals: 106
Projects: 3


You think about my Avatar right now!


« Reply #30 - Posted 2012-12-10 20:33:48 »

Legend of Dungeon's article isn't really that useful to us since he uses Unity to generate normals and calculate lighting. Wink

For such low resolution characters you can get away with very basic normal maps, and it should be easy enough to generate them on the fly:
1  
2  
3  
4  
//for each pixel in character sprite
//convert xy to range [-1.0 to 1.0], then half the result to reduce the effect a bit
normals.xy = ( (gl_FragCoord.xy / spriteSize.xy) * 2.0 - 1.0 ) * 0.5;
normals.z = 1.0;


For things like brick walls, a more accurate normal map would be necessary.

I agree that an editor would be awesome. I have been thinking of that for a bit now... Smiley

Why not do that? Smiley But I guess ideas would collide... :X But if you never try?

See my:
    My development Blog:     | Or look at my RPG | Or simply my coding
http://matheusdev.tumblr.comRuins of Revenge  |      On Github
Offline HeroesGraveDev

JGO Kernel


Medals: 244
Projects: 11
Exp: 2 years


┬─┬ノ(ಠ_ಠノ)(╯°□°)╯︵ ┻━┻


« Reply #31 - Posted 2012-12-10 20:35:08 »

Legend of Dungeon's article isn't really that useful to us since he uses Unity to generate normals and calculate lighting. Wink

For such low resolution characters you can get away with very basic normal maps, and it should be easy enough to generate them on the fly:
1  
2  
3  
4  
//for each pixel in character sprite
//convert xy to range [-1.0 to 1.0], then half the result to reduce the effect a bit
normals.xy = ( (gl_FragCoord.xy / spriteSize.xy) * 2.0 - 1.0 ) * 0.5;
normals.z = 1.0;


For things like brick walls, a more accurate normal map would be necessary.

In my 4K game the normals are hard-coded. The brick normals are easy enough since the entire background is procedural, and the character normals use the code above.

I agree that an editor would be awesome. I have been thinking of that for a bit now... Smiley

I have no idea how to use shaders...
                                                                                             

Offline davedes
« Reply #32 - Posted 2012-12-10 20:49:19 »

Quote
I have no idea how to use shaders...
Why not learn? Smiley
https://github.com/mattdesl/lwjgl-basics/wiki/Shaders

BTW: The GIF I showed earlier doesn't use shaders, i.e. the normal lighting is all done in software (Java2D).

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline HeroesGraveDev

JGO Kernel


Medals: 244
Projects: 11
Exp: 2 years


┬─┬ノ(ಠ_ಠノ)(╯°□°)╯︵ ┻━┻


« Reply #33 - Posted 2012-12-10 21:13:31 »

Quote
I have no idea how to use shaders...
Why not learn? Smiley
https://github.com/mattdesl/lwjgl-basics/wiki/Shaders

BTW: The GIF I showed earlier doesn't use shaders, i.e. the normal lighting is all done in software (Java2D).

Thanks for the link, but I try to write my own code when possible, so I went to the LWJGL wiki and read through that instead. (It hurts my brain trying to turn code from a library into a function that I can use withuot all the annoying configuration. It's much easier just to skim through source taking little bits here and there and then work out the rest)

Offline matheus23

JGO Kernel


Medals: 106
Projects: 3


You think about my Avatar right now!


« Reply #34 - Posted 2012-12-10 21:18:17 »

Quote
I have no idea how to use shaders...
Why not learn? Smiley
https://github.com/mattdesl/lwjgl-basics/wiki/Shaders

BTW: The GIF I showed earlier doesn't use shaders, i.e. the normal lighting is all done in software (Java2D).

Wow... great tutorials... I need to follow Smiley
I'm intrested in lesson 3... I feel it Wink

See my:
    My development Blog:     | Or look at my RPG | Or simply my coding
http://matheusdev.tumblr.comRuins of Revenge  |      On Github
Offline HeroesGraveDev

JGO Kernel


Medals: 244
Projects: 11
Exp: 2 years


┬─┬ノ(ಠ_ಠノ)(╯°□°)╯︵ ┻━┻


« Reply #35 - Posted 2012-12-10 21:19:21 »

Quote
I have no idea how to use shaders...
Why not learn? Smiley
https://github.com/mattdesl/lwjgl-basics/wiki/Shaders

BTW: The GIF I showed earlier doesn't use shaders, i.e. the normal lighting is all done in software (Java2D).

Wow... great tutorials... I need to follow Smiley
I'm intrested in lesson 3... I feel it Wink

Yeah, once I get my own shader code working these tutorials will be Awesome!

Offline davedes
« Reply #36 - Posted 2012-12-10 21:29:46 »

Quote
I have no idea how to use shaders...
Why not learn? Smiley
https://github.com/mattdesl/lwjgl-basics/wiki/Shaders

BTW: The GIF I showed earlier doesn't use shaders, i.e. the normal lighting is all done in software (Java2D).

Thanks for the link, but I try to write my own code when possible, so I went to the LWJGL wiki and read through that instead. (It hurts my brain trying to turn code from a library into a function that I can use withuot all the annoying configuration. It's much easier just to skim through source taking little bits here and there and then work out the rest)
Also be sure to check out the rest of the series; it targets LWJGL devs who would rather "reinvent the wheel" and make their own sprite renderers.
https://github.com/mattdesl/lwjgl-basics/wiki

(Note: the series is still an early work in progress!)

Offline HeroesGraveDev

JGO Kernel


Medals: 244
Projects: 11
Exp: 2 years


┬─┬ノ(ಠ_ಠノ)(╯°□°)╯︵ ┻━┻


« Reply #37 - Posted 2012-12-10 21:39:55 »

THANK YOU SO MUCH!

(I can't hit the appreciate button for another hour or so)

EDIT:

I was looking at the spritebatcher and I found this:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
protected void checkFlush(Texture texture) {
      if (texture==null || texture==null)
         throw new NullPointerException("null texture");

      //we need to bind a different texture/type. this is
     //for convenience; ideally the user should order
     //their rendering wisely to minimize texture binds
     if (texture!=this.texture || idx >= maxIndex) {
         //apply the last texture
        flush();
         this.texture = texture;
      }
   }


This caught my attention:
1  
2  
if (texture==null || texture==null)
         throw new NullPointerException("null texture");

Is there a reason for that? (or is it a bug)

Offline davedes
« Reply #38 - Posted 2012-12-10 21:58:39 »

Sometimes I null check two or three times just to be sure. Cool

[size=4pt]nah.. typo which should be fixed now[/size]

Offline HeroesGraveDev

JGO Kernel


Medals: 244
Projects: 11
Exp: 2 years


┬─┬ノ(ಠ_ಠノ)(╯°□°)╯︵ ┻━┻


« Reply #39 - Posted 2012-12-10 21:59:29 »

New Monsters:

Troll Rock Smasher & Troll Rock Thrower:

Click to Play

Click to Play


Hehehehe...

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline HeroesGraveDev

JGO Kernel


Medals: 244
Projects: 11
Exp: 2 years


┬─┬ノ(ಠ_ಠノ)(╯°□°)╯︵ ┻━┻


« Reply #40 - Posted 2012-12-10 22:46:23 »

Troll Rock Thrower in action.



I fixed my projectile system, so now I can have projectiles go at different speeds, angles, weights etc.

Offline HeroesGraveDev

JGO Kernel


Medals: 244
Projects: 11
Exp: 2 years


┬─┬ノ(ಠ_ಠノ)(╯°□°)╯︵ ┻━┻


« Reply #41 - Posted 2012-12-11 05:58:30 »

Okay, time to unveil the name for the project.
Unfortunately I made a hash of typing it in.  persecutioncomplex

-1465377359

There you go!
Happy deciphering!

Offline __iCode__

Senior Newbie





« Reply #42 - Posted 2012-12-11 11:20:36 »

WOW! This looks so good! Keep up the good work, I can't wait for the next update...
Offline HeroesGraveDev

JGO Kernel


Medals: 244
Projects: 11
Exp: 2 years


┬─┬ノ(ಠ_ಠノ)(╯°□°)╯︵ ┻━┻


« Reply #43 - Posted 2012-12-11 23:44:26 »

And we have particles!

Yay!

(No screenshots. Just wait for a Prototype Release)

Offline HeroesGraveDev

JGO Kernel


Medals: 244
Projects: 11
Exp: 2 years


┬─┬ノ(ಠ_ಠノ)(╯°□°)╯︵ ┻━┻


« Reply #44 - Posted 2012-12-12 04:51:13 »

Okay!

I have a prototype build out!
This requires Java 7.
You need to unzip the file, then it should run fine.

Arrow keys to move. Space to attack. 0-9 keys to change character. + and - to zoom in/out.
1-4 are guardians. 5-9 & 0 are monsters. Monsters don't attack monsters  Wink.

Monsters are to the right, but they will find you if you can't find them. Sad
Yes, you will be overwhelmed eventually. Cry

Please give me some feedback if you think a particular character is overpowered/underpowered. I don't have the time to test everything.

Enjoy!  Grin

Offline masteryoom

JGO Coder


Medals: 5
Projects: 2


If you look closely, you might see it turning...


« Reply #45 - Posted 2012-12-12 07:27:24 »

I think you should allow your monsters to attack other monsters Grin
(P.S. how did you make the hash?)

Smiley
Offline HeroesGraveDev

JGO Kernel


Medals: 244
Projects: 11
Exp: 2 years


┬─┬ノ(ಠ_ಠノ)(╯°□°)╯︵ ┻━┻


« Reply #46 - Posted 2012-12-12 07:32:10 »

thenameofthegame.hashCode();

An if monsters attacked monsters it would be too easy.

Offline Vladiedoo
« Reply #47 - Posted 2012-12-12 07:33:52 »

I get a "fatal error" when trying to run the game on Windows 7, I will message you the error report as it is very lengthy.
Offline masteryoom

JGO Coder


Medals: 5
Projects: 2


If you look closely, you might see it turning...


« Reply #48 - Posted 2012-12-12 07:34:43 »

Doesn't to me, and I am on Win7.  Tongue

Smiley
Offline Phased
« Reply #49 - Posted 2012-12-12 07:35:27 »

Oo we both must of downloaded the game at the same time, it doesn't work for me either. printed a .txt file in the location of the jar
Offline masteryoom

JGO Coder


Medals: 5
Projects: 2


If you look closely, you might see it turning...


« Reply #50 - Posted 2012-12-12 07:36:43 »

Did you unzip the zipped file?  Pointing

Smiley
Offline Phased
« Reply #51 - Posted 2012-12-12 07:37:33 »

yes we are able to read, and understand that its using LWJGL.
Offline HeroesGraveDev

JGO Kernel


Medals: 244
Projects: 11
Exp: 2 years


┬─┬ノ(ಠ_ಠノ)(╯°□°)╯︵ ┻━┻


« Reply #52 - Posted 2012-12-12 08:02:49 »

Okay, thanks for the report.
I can't do anything about it until tomorrow.

The error happened in the
glDrawArrays()
in the render method for the sky.
I am unsure what is causing the problem, but I have a suspicion it is the graphics card because all your other hardware shown in the error report is the same as mine. Can you post your graphics card/driver in case anyone here knows what is wrong?

Sorry about that. I'll fix it as soon as possible (if it is something I can fix)

Offline davedes
« Reply #53 - Posted 2012-12-12 08:40:08 »

Seems like it only works on Java 7? Sad

Offline HeroesGraveDev

JGO Kernel


Medals: 244
Projects: 11
Exp: 2 years


┬─┬ノ(ಠ_ಠノ)(╯°□°)╯︵ ┻━┻


« Reply #54 - Posted 2012-12-12 08:45:06 »

Yes. I'm a Java 7 Developer.

Switch-case with strings is useful, along with NIO (although that affects networked games more)
And at least SOME of the many security flaws are fixed.

Offline Gjallar

JGO Coder


Medals: 13
Projects: 1


Follower of Nurgle


« Reply #55 - Posted 2012-12-12 12:36:29 »

I get the same thing as with your Far From Home game.

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x5bc3b133, pid=2560, tid=3276
#
# JRE version: 7.0_09-b05
# Java VM: Java HotSpot(TM) Client VM (23.5-b02 mixed mode, sharing windows-x86 )
# Problematic frame:
# C  [nvoglv32.DLL+0x77b133]
#
# Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.sun.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
Offline HeroesGraveDev

JGO Kernel


Medals: 244
Projects: 11
Exp: 2 years


┬─┬ノ(ಠ_ಠノ)(╯°□°)╯︵ ┻━┻


« Reply #56 - Posted 2012-12-12 20:57:46 »

The download is fine.

It seems that for some reason, something on your computers makes Vertex Arrays fail.
Please post graphics card details in case someone knows what is wrong.

The other possibility is a bug in LWJGL. I could try downgrading to 2.8.4 if we find that graphics cards/drivers are not the problem.
Does anyone developing LWJGL know if it's a LWJGL bug?

Offline HeroesGraveDev

JGO Kernel


Medals: 244
Projects: 11
Exp: 2 years


┬─┬ノ(ಠ_ಠノ)(╯°□°)╯︵ ┻━┻


« Reply #57 - Posted 2012-12-12 21:28:08 »

Okay, I just uploaded a new prototype.
Same link as before.

Added:

Character Special Attacks. Press X to use. Has a long cooldown (except Assassin).
Currently only the Assassins, Warrior, Archer, Goblin and the Trolls have specials, but that will change soon enough.

Launch from the command line like
java -jar Guardian.jar debug
and it will print out your OpenGL version in case something goes wrong. More debug features will be added if neccessary.
Please report if it works or not. I need to get an idea of how many people it fails for.

Online Jimmt
« League of Dukes »

JGO Kernel


Medals: 128
Projects: 4
Exp: 3 years



« Reply #58 - Posted 2012-12-12 23:42:26 »

Did you unzip the zipped file?  Pointing
*facepalm Cranky
Offline davedes
« Reply #59 - Posted 2012-12-13 00:43:53 »

Yes. I'm a Java 7 Developer.

Switch-case with strings is useful, along with NIO (although that affects networked games more)
And at least SOME of the many security flaws are fixed.
The downside is that Mac users will not be able to run your game.

Mac and Java 7 doesn't work with LWJGL stable (although the devs are working on fixing this).

Further, Lion (10.7+) is required to install JRE 7, so even once LWJGL devs fix the problem, ~40% of Macs will still be unable to run your game (see here for version breakdown).

I don't see why Java 7 is necessary for game dev at the expense of losing so many customers. I don't think I've ever needed a String switch statement, except when I first started programming and was using String constants instead of enums.

The new file stuff is nice, but more important if you are developing tools like Spine than if you are developing a game.

Pages: 1 [2] 3 4 5
  ignore  |  Print  
 
 

 
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!