Java-Gaming.org Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (746)
Games in Android Showcase (226)
games submitted by our members
Games in WIP (828)
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 ... 11
1  Java Game APIs & Engines / Java 2D / Re: First time pixel artist on: 2018-01-18 22:55:31
I'll change the plants shadows. As for the house, the shadow on the left doesn't look normal because the wall isn't facing the camera (it's on an angle as you can see) so I wasn't sure where to place the shadow.

I'd like everything at a 90 degree angle. Going to have another shot at drawing them!

I'm not a pixel artist (or any kind of artist), but it seems that since it's angled inwards it should let *more* light through than the other wall. Though if you draw the shadows at 90 degrees with the sun at the left that side won't cast a shadow anyway.
2  Discussions / Miscellaneous Topics / Re: What I did today on: 2018-01-10 02:39:40
Yesterday I implemented a sprite batch in WebGL and today I published it as my first NPM library. There's now a spritebatch package on NPM containing a simple LibGDX-style sprite batch Grin
3  Discussions / Miscellaneous Topics / Re: What I did today on: 2018-01-07 13:42:41


Getting used to JavaScript. Deployment is as simple as pushing to GitHub. Dynamic typing is nice except when debugging. Testing with Jest is easy and fast. NPM and Webpack makes CSS and JS bearable. All in all, it's a very good fit for casual games.
4  Discussions / Miscellaneous Topics / Re: What I did today on: 2018-01-02 14:55:48


Been working on random terrain generation in HTML5 using JS. Writing UI in HTML is nice, Canvas performance is bad but that's to be expected, save games are limited to ~5MB, and using JS object literals instead of JSON is wonderful.
5  Discussions / Miscellaneous Topics / Re: What I did today on: 2017-12-20 21:19:51
Thanks guys, honestly using the canvas API never entered my mind. That's what you get for researching tools at 12 AM  Roll Eyes
6  Discussions / Miscellaneous Topics / Re: What I did today on: 2017-12-19 23:44:51
Been looking at JavaScript game libraries. Every one I've encountered thus far is the same: register the assets you want to use. Register the sprites you want to render. Everything is held together with string identifiers. persecutioncomplex

I just want to load and display images without having to wrestle with a scene graph. Is that to much to ask?
7  Discussions / General Discussions / Re: Move to Kotlin? on: 2017-11-24 21:22:37
Functional programming really shines when iterating over collections. Compare

1  
val list = readLines("myfile.csv").drop(1).map(MyObj::fromCSV);


to read a CSV file into a list of objects, instead of

1  
2  
3  
4  
5  
List<String> lines = readLines("myfile.csv");
List<MyObj> list = new ArrayList<>();
for(int i = 1; i < lines.size(); i++) {
    list.add(MyObj.fromCSV(line));
}


The imperative version requires a lot of low-level constructs to achieve the same thing, while the functional alternative just re-combines the same few, well-known operations over and over (drop, filter, map, reduce, etc), with lambdas for custom behavior.
8  Discussions / General Discussions / Re: Move to Kotlin? on: 2017-11-23 22:09:19
I prefer dumb code. Smart code requires brainpower to read and write. Dumb code is understandable at 12 AM, and that's what matters Wink
9  Discussions / General Discussions / Re: Move to Kotlin? on: 2017-11-16 11:20:00
It's a shame Ceylon is so underused, I really like union and intersection types. Ceylon's approach to null safety is years ahead of Kotlin's, but I suppose Kotlin has a gentler learning curve.

For what it's worth, here's an example of using LWJGL in Ceylon: https://github.com/gavinking/ceylon-examples-lwjgl/blob/master/source/eg/lwjgl/run.ceylon
10  Discussions / Miscellaneous Topics / Re: What I did today on: 2017-11-16 10:57:05
This morning I wrote a garbage collector. GC has always seemed to be some kind of impossible mystery that only extremely talents folks like JVM engineers could understand. Turns out a basic tracing garbage collector isn't very complicated.

Take a look: https://github.com/snordgren/goose
11  Discussions / General Discussions / Re: Game Design in Kotlin for Java Programmers on: 2017-11-16 10:54:55
Looking good! Nitpicks: @JVMStatic is @JvmStatic because JetBrains uses that kind of case convention. Also at THREAD it's all uppercase which is Java praxis for constants but isn't really used in Kotlin aside from const vals.

All in all, good job, looking forward to reading further parts
12  Discussions / General Discussions / Re: Move to Kotlin? on: 2017-11-12 19:54:48
Switching on type is an old Java tradition, it's called the visitor pattern.
13  Discussions / General Discussions / Re: Move to Kotlin? on: 2017-11-12 12:52:44
I personally found that Kotlin lets me write projects faster, and with better style (pure functions, immutable state). For small, throwaway games and utilities its definitely faster to write them in Kotlin. Type inference is nice but it makes the code less readable. You could write types in Kotlin but then you're writing var or val unnecessarily anyway, so it's a net loss from Java. Ideally you could have IDE support for writing var and it autoconverts to the return type of the expression you assign a variable to.

Kotlin makes it easier to write final variables, I like that, and the if/try/when as expressions as well. I do agree that Kotlin doesn't seem as cohesive and well thought out as Java. I think the Scala style guide got it right in requiring explicit types for everything that isn't assigned to a constructor or a string/int/float literal.

Kotlin eliminates a lot of boilerplate code and I will probably keep using it because of that. Games are write and throw away code most of the time so the loss in readability isn't that bad while the increased development velocity is a big plus.
14  Game Development / Newbie & Debugging Questions / Re: JavaFX updating a Label on: 2017-08-26 19:17:28
Create a new Thread with a Runnable that contains your infinite loop, and in the loop put a Thread.sleep(500) to sleep 500 milliseconds between each execution.
15  Games Center / Showcase / Re: Spark Rush on: 2017-08-12 22:14:25
@sarcastibots Those are some great suggestions, I'll add them to my to-do list. Those 3-4 unavoidable hits doesn't sound very fun, I'll figure out a way to prevent it, at least in the early game anyway.

@herhor 283 points for your first time is a great score. I generally get around 300-350 when I play it, despite playing it a lot to test it. I guess I just have bad reflexes. Roll Eyes

The blocks are randomly generated, and there's no checking to ensure that there is a way to get through without taking damage. Which in my opinion isn't necessary since the game allows you to take multiple hits without dying, as well as gaining more life. But if unavoidable hits aren't a fun gameplay feature I can always change it.

Thank you for playing Smiley
16  Games Center / Showcase / Spark Rush on: 2017-08-05 19:39:36

Spark Rush




A small, but fun game about guiding a little yellow ball to avoid the red blocks and collect the yellow ones, in keeping with my goal of just making and releasing something. When you hit the red blocks, you lose energy, causing you to go slower, lose too much and you die. When you hit the yellow blocks, you gain energy (and live longer), but the game goes faster, which makes it harder to avoid the red blocks. The game also goes faster the further you get.

Your score is based off how far you get and how many yellow blocks you collect. Press where you want to go on Android and use A and D to control the spark on desktop.

The game was made using LibGDX and Box2DLights, with the code written in Kotlin.

Screenshots



Download
The game is available on desktop and on Android, both for free.

Android download
Desktop download

Let me know what you think.
17  Java Game APIs & Engines / OpenGL Development / Re: Opengl 4.6 is released on: 2017-08-01 23:42:55
Yet another update that I won't be able to leverage on my Mac. Come on, Apple! Why do you have to be so monopolistic?
18  Discussions / General Discussions / Re: Posting to not-so-old topics on: 2017-08-01 23:41:38
Considering how long many topics can stay relevant, I agree.
19  Discussions / Miscellaneous Topics / Re: What I did today on: 2017-07-30 13:30:27
snip

That's a beautiful website.
20  Discussions / Miscellaneous Topics / Re: Cheerpj: convert any Java application and library to a browser-based Web app on: 2017-07-27 12:02:47
All these efforts baffle me. Why Javascript? Seriously just why? It doesn't have to be the defacto clientside language. Someone integrate the JVM directly into Firefox please, and get rid of all the contentious APIs and sandbox it properly this time. It really can't be that hard.

Cas Smiley

It gets better. Their FAQ has this text.

"Can JavaScript code produced by Cheerp be plugged into Node.js?"
"Yes, it should. However, this has not been one of our areas of focus so far. "

People are asking if they can take their Java code and compile it to JavaScript in order to run it on the server. When Java is already on the server with better stability and performance than JS.
21  Game Development / Newbie & Debugging Questions / Re: how to create GUI game editor on: 2017-07-25 22:38:22
GUI is one of the great unsolved mysteries of programming. There are a million ways to do them and none of them are that great. WYSIWIG editors are cool for show off but most of them I've found hard code margins into your code meaning that you end up with a layout that looks good on your computer but breaks on any other. Generally developing anything is more frustrating, time-consuming and problematic than it seems when you think about it. I say just hardcode the UI into your game.
22  Discussions / General Discussions / Re: Hoping to make a return to JGO... on: 2017-07-25 22:31:58
Welcome back! If you make something using a non-Java language you can always post it in the "What I did today" thread as inspiration for the rest of us, no Java required!
23  Discussions / Miscellaneous Topics / Re: What I did today on: 2017-07-13 19:40:21
Updated my Pico Editor to include syntax highlighting for Ruby as well as line numbers.

24  Game Development / Game Play & Game Design / Re: Using default methods in interfaces effectively on: 2017-07-12 20:23:15
Interfaces are a useful concept, not least because it is simple. Simple is good. Which is no longer true for interface default methods.

Sometimes, simplicity can be an issue as well, making it hard to express your intent in code - which causes you to end up with a simple language, but complex code. See this example:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
public interface Positioned {
    Vector2 getPosition();

    default float getX() {
        return getPosition().x;
    }
   
    default float getY() {
        return getPosition().y;
    }
}


Without default methods, you'd have a lot of calls like getPosition().x littering the codebase. In my opinion, this is a better solution.
25  Game Development / Shared Code / Re: Faster Than Light JSON Parser on: 2017-07-06 10:27:59
As it operates on bytes, it doesn't support non-ASCII characters, no?
26  Game Development / Shared Code / Re: LibGDX snippets collection on: 2017-07-04 18:55:49
Why not make a GitHub repo, or several?
27  Game Development / Shared Code / Re: jbump - 2D AABB collision library on: 2017-07-04 11:31:28
This is just what I needed, thanks!
28  Game Development / Shared Code / Re: Faster Than Light JSON Parser on: 2017-07-03 21:02:48
That is some well thought out code, really shows what can be done when performance is the priority. Besides, JSON validation should be done on the dev machine, not on the user's machine.
29  Discussions / Miscellaneous Topics / Re: Gotta make a new Shading Language for College Project - Opinions? on: 2017-06-29 19:05:00
Any somewhat modern build system is going to automate away the compilation step, no pain there. Besides abstractions are the root of productivity.

But, having some experience with parsers, surely when it reads 'frag' or 'vert' it automatically expects 'shader' and the shader body? That shouldn't be too hard on the code, in my opinion.
30  Discussions / Miscellaneous Topics / Re: What I did today on: 2017-06-29 16:51:14
My pull request was merged into the LibGDX base, meaning that I have joined the 400 people who have contributed to the repo. Due to the code I wrote it is now possible to generate Kotlin projects using the GDX Setup tool, with the ability to add more languages further down the line. Feels good!
Pages: [1] 2 3 ... 11
 
xxMrPHDxx (80 views)
2017-12-31 17:17:51

xxMrPHDxx (40 views)
2017-12-31 17:15:51

xxMrPHDxx (46 views)
2017-12-28 18:11:33

Ecumene (215 views)
2017-09-30 02:57:34

theagentd (321 views)
2017-09-26 18:23:31

cybrmynd (370 views)
2017-08-02 12:28:51

cybrmynd (401 views)
2017-08-02 12:19:43

cybrmynd (371 views)
2017-08-02 12:18:09

Sralse (336 views)
2017-07-25 17:13:48

Archive (1098 views)
2017-04-27 17:45:51
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!