Java-Gaming.org Hi !
Featured games (91)
games approved by the League of Dukes
Games in Showcase (762)
Games in Android Showcase (229)
games submitted by our members
Games in WIP (847)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: 1 ... 56 57 [58] 59 60 ... 202
  ignore  |  Print  
  What I did today  (Read 2712851 times)
0 Members and 3 Guests are viewing this topic.
Offline SHC
« Reply #1710 - Posted 2015-02-15 03:02:30 »

My first usage of them is in the
Display
class, creating callbacks for GLFW.

1  
2  
3  
4  
5  
6  
7  
8  
9  
glfwSetWindowPosCallback(window, winPosCallback = GLFWWindowPosCallback((win, xPos, yPos) ->
{
    Display.posX = xPos;
    Display.posY = yPos;
}));

glfwSetCursorPosCallback(window, winCurPosCallback = GLFWCursorPosCallback(Mouse::glfwCursorCallback));
glfwSetScrollCallback(window, winScrollCallback = GLFWScrollCallback(Mouse::glfwScrollCallback));
glfwSetMouseButtonCallback(window, winMouseButtonCallback = GLFWMouseButtonCallback(Mouse::glfwMouseButtonCallback));

This makes code simpler, and also easy to read, because I hate writing anonymous classes and overriding the methods. When the methods we have to override is only one, it makes sense to reduce the amount of code we type and use this lambdas and method references.

The next major usage of method references are in the usage of
GameTimer
class, but still, in the form of callbacks.

1  
2  
3  
GameTimer timer = new GameTimer(10, TimeUtils.Unit.SECONDS);
timer.setCallback(this::timerOut);
timer.start();

There are also the
Animation
, and the entity classes which makes use of lambdas. Whatever you think of this, but I'm lovin' it!!

Offline BurntPizza

« JGO Bitwise Duke »


Medals: 485
Exp: 7 years



« Reply #1711 - Posted 2015-02-15 04:01:26 »

But then I see things like collect, mapToObject, and the methods being used in the second part of BurntPizza's code, that I have no clue what they do. Also I heard someone say currying and I have no clue what that means either.

Read the javadocs? http://docs.oracle.com/javase/8/docs/api/java/util/stream/package-summary.html

Also hit up wikipedia. http://en.wikipedia.org/wiki/Functional_programming
Offline Sabomoth

Junior Devvie


Medals: 4
Exp: 3 years



« Reply #1712 - Posted 2015-02-15 19:11:17 »

Made a bitwise autotiler. Woop.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline divxdede
« Reply #1713 - Posted 2015-02-15 20:23:54 »

Implemented the RadialGradiant paint with multiple stops (software rasterizer for now)


Offline EgonOlsen
« Reply #1714 - Posted 2015-02-15 21:09:21 »

Finally added a simple text box that tells you what you've just picked up (that brown, semi-transparent thing in the top center). It moves down, stays some seconds, and moves up again...really simple, but i hate to do GUI work, so i postponed this for just too long.


Offline Roquen

JGO Kernel


Medals: 517



« Reply #1715 - Posted 2015-02-16 09:25:23 »

Hold on kids!  Method references are way more than sugar.  You can define a method signature and have references to methods which match that signature.  The simplest usage is you no longer need a one to one mapping of an implementation to class file.  The implementation can be anywhere.
Offline basil_

« JGO Bitwise Duke »


Medals: 418
Exp: 13 years



« Reply #1716 - Posted 2015-02-16 09:34:02 »

really looking forward to debugging enterprise code based on that Wink
Offline LiquidNitrogen
« Reply #1717 - Posted 2015-02-16 12:10:48 »

In the big scheme of things, this is really not very impressive, but I'm really happy I finally got some dudes wandering around my spaceship Cheesy

Click to Play
Offline kevglass

« JGO Spiffy Duke »


Medals: 319
Projects: 25
Exp: 22 years


Coder, Trainee Pixel Artist, Game Reviewer


« Reply #1718 - Posted 2015-02-16 13:56:39 »

Things start to get real:



On to building the quest campaign selection screen!

Cheers,

Kev

Offline kevglass

« JGO Spiffy Duke »


Medals: 319
Projects: 25
Exp: 22 years


Coder, Trainee Pixel Artist, Game Reviewer


« Reply #1719 - Posted 2015-02-16 20:41:02 »

And then I get to work on less fun but equally important bits, UI/menus and quest selection:



Excuse typos in text!

Cheers,

Kev

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

« JGO Bitwise Duke »


Medals: 418
Exp: 13 years



« Reply #1720 - Posted 2015-02-16 20:47:14 »

is the inconsistent blur on the font intentional ? made me rub my eyes.
Offline kevglass

« JGO Spiffy Duke »


Medals: 319
Projects: 25
Exp: 22 years


Coder, Trainee Pixel Artist, Game Reviewer


« Reply #1721 - Posted 2015-02-16 20:49:09 »

Just poor anti-aliasing when I scaled the image down I think.

Kev

Offline BurntPizza

« JGO Bitwise Duke »


Medals: 485
Exp: 7 years



« Reply #1722 - Posted 2015-02-16 20:54:31 »

Made some more ramen. Cheesy

Other than that I did absolutely nothing.

So you just left it on the table? Monster.
Offline princec

« JGO Spiffy Duke »


Medals: 1038
Projects: 3
Exp: 20 years


Eh? Who? What? ... Me?


« Reply #1723 - Posted 2015-02-16 21:01:14 »

Today I cleaned sick up from all over the interior of my car.

Cas Smiley

Offline actual

JGO Coder


Medals: 25



« Reply #1724 - Posted 2015-02-16 21:27:36 »

I finally have a solid initial implementation of a Goal planning system. It allows for entities to have goals and subgoals and to replan as circumstances change. A lot of GOAP material available is fiarly complicated from an implementation side, and it took a while for me to get to a simpler system that meets my needs.

On an unrelated note, I now have 1753 mentions on JGO. You all need to stop talking about me and get back to developing games.
Offline Riven
Administrator

« JGO Overlord »


Medals: 1341
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #1725 - Posted 2015-02-16 21:48:57 »

I have 1871 actual mentions. I can make this all go away with the push of a button. You just have to give up your identity and everything you hold dear. Emo

PM me a slight alteration of your nick and I'll make it happen. Soon. This is a one time offer, because it would make barely any sense to offer it twice.

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings!
Offline Sickan
« Reply #1726 - Posted 2015-02-16 21:51:41 »

I have 1871 actual mentions. I can make this all go away with the push of a button. You just have to give up your identity and everything you hold dear. Emo

PM me a slight alteration of your nick and I'll make it happen. Soon.
Actual as in 1871 mentions of him or 1871 mentions of you?
Offline Riven
Administrator

« JGO Overlord »


Medals: 1341
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #1727 - Posted 2015-02-16 21:52:13 »

Partypooper.

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings!
Offline ags1

JGO Kernel


Medals: 367
Projects: 7


Make code not war!


« Reply #1728 - Posted 2015-02-16 21:53:55 »

Thinking of changing my nick to "entity". Or "sprite".

Offline CopyableCougar4
« Reply #1729 - Posted 2015-02-16 21:57:14 »

* wants to feel popular, creates an account with a username like 'help' or 'think' Tongue

Either wandering the forum or programming. Most likely the latter Smiley

Github: http://github.com/CopyableCougar4
Offline actual

JGO Coder


Medals: 25



« Reply #1730 - Posted 2015-02-16 22:13:07 »

PM me a slight alteration of your nick and I'll make it happen. Soon. This is a one time offer, because it would make barely any sense to offer it twice.

Heck no, this is the most pseudo-popular I have ever been!





* edit: unclosed quote tag
Offline BurntPizza

« JGO Bitwise Duke »


Medals: 485
Exp: 7 years



« Reply #1731 - Posted 2015-02-16 22:13:50 »

* wants to feel popular, creates an account with a username like 'help' or 'think' Tongue

'a', 'it', 'the' etc.
Offline Jono
« Reply #1732 - Posted 2015-02-16 22:26:51 »

I finally have a solid initial implementation of a Goal planning system. It allows for entities to have goals and subgoals and to replan as circumstances change. A lot of GOAP material available is fiarly complicated from an implementation side, and it took a while for me to get to a simpler system that meets my needs.

I worked on a planning system too, but mine's overly complicated.

Today I fixed some bugs exposed by the fall-in-love and decide-sexuality actions.
Offline Mike

« JGO Spiffy Duke »


Medals: 149
Projects: 1
Exp: 6 years


Java guru wannabe


« Reply #1733 - Posted 2015-02-16 22:48:25 »

Made a new website for State of Fortune (same url as before: http://stateoffortune.com/). Was mainly to try out parallax scrolling and having much larger pictures without having to click on small thumbnails. The picture quality isn't great in jpeg, but the size difference is huge, which is nice for mobile devices so I'll stick with jpeg over png for now Smiley

Mike

My current game, Minecraft meets Farmville and goes online Smiley
State of Fortune | Discussion thread @ JGO
Online ClaasJG

JGO Coder


Medals: 42



« Reply #1734 - Posted 2015-02-16 22:55:42 »

To be honest, I am not sure about the new website.
"I want all the options without scrolling"
And at least for me the images are jiggling around while I scroll.

-ClaasJG

My english has to be tweaked. Please show me my mistakes.
Offline Mike

« JGO Spiffy Duke »


Medals: 149
Projects: 1
Exp: 6 years


Java guru wannabe


« Reply #1735 - Posted 2015-02-16 23:04:10 »

To be honest, I am not sure about the new website.
"I want all the options without scrolling"
And at least for me the images are jiggling around while I scroll.

Apparently the pictures don't even show up in IE9. I'll have a look for another library I guess. Sad

I could add some buttons on top to jump to the forum/download/credits section. Seeing as I don't have much text on the page I mainly wanted a website that points out the graphical quality, and the previous site didn't do that Smiley

Mike

My current game, Minecraft meets Farmville and goes online Smiley
State of Fortune | Discussion thread @ JGO
Offline kingroka123
« Reply #1736 - Posted 2015-02-16 23:05:51 »

@Mike you should add a automatic waypointed scroll system like on the Moto G webpage
Online ClaasJG

JGO Coder


Medals: 42



« Reply #1737 - Posted 2015-02-16 23:07:47 »

Maybe a "floating control panel" on the right side and the images in the background (~as slideshow?)

My english has to be tweaked. Please show me my mistakes.
Offline cylab

JGO Kernel


Medals: 182



« Reply #1738 - Posted 2015-02-16 23:20:28 »

Added triplanar texture coordinates generation to my texture "synthesis" shader:



Mathias - I Know What [you] Did Last Summer!
Offline Mike

« JGO Spiffy Duke »


Medals: 149
Projects: 1
Exp: 6 years


Java guru wannabe


« Reply #1739 - Posted 2015-02-16 23:30:29 »

Maybe a "floating control panel" on the right side and the images in the background (~as slideshow?)
@Mike you should add a automatic waypointed scroll system like on the Moto G webpage

Thanks for the ideas! I'll look into changing it again somewhere down the road, most likely based on your ideas. For now I got it working in IE9 and will go back to programming on the game itself Smiley

Mike

My current game, Minecraft meets Farmville and goes online Smiley
State of Fortune | Discussion thread @ JGO
Pages: 1 ... 56 57 [58] 59 60 ... 202
  ignore  |  Print  
 
 

 
EgonOlsen (364 views)
2018-06-10 19:43:48

EgonOlsen (364 views)
2018-06-10 19:43:44

EgonOlsen (304 views)
2018-06-10 19:43:20

DesertCoockie (540 views)
2018-05-13 18:23:11

nelsongames (870 views)
2018-04-24 18:15:36

nelsongames (853 views)
2018-04-24 18:14:32

ivj94 (1304 views)
2018-03-24 14:47:39

ivj94 (425 views)
2018-03-24 14:46:31

ivj94 (1088 views)
2018-03-24 14:43:53

Solater (443 views)
2018-03-17 05:04:08
Java Gaming Resources
by philfrei
2017-12-05 19:38:37

Java Gaming Resources
by philfrei
2017-12-05 19:37:39

Java Gaming Resources
by philfrei
2017-12-05 19:36:10

Java Gaming Resources
by philfrei
2017-12-05 19:33:10

List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05
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!