Java-Gaming.org Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (797)
Games in Android Showcase (234)
games submitted by our members
Games in WIP (864)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: 1 ... 146 147 [148] 149 150 ... 213
  ignore  |  Print  
  What I did today  (Read 3403046 times)
0 Members and 5 Guests are viewing this topic.
Offline DarkCart

JGO Kernel


Medals: 124
Projects: 9
Exp: 50 years


It's all in the mind, y'know.


« Reply #4410 - Posted 2016-06-28 01:28:36 »

I made a JavaScript version of my "game" Mazer. I couldn't get images to work properly and it isn't perfectly centered, but eh.

Link

The darkest of carts.
Offline SHC
« Reply #4411 - Posted 2016-06-28 04:40:04 »

I just found that WebGL 2.0 arrived on android in experiments.



To enable you must also enable the draft extensions list. Here's the link for quick access:

chrome://flags/#enable-unsafe-es3-apis

Offline TritonDreyja
« Reply #4412 - Posted 2016-06-29 00:57:56 »

Played around with finicky details in my game and added mini animations for when blocks or mobs interact. Character also breathes bubbles out when underwater as well.
Fixed doors and added more mobs as well. Couldn't help but take some screenshots as I marveled at the progress of this.



Notice that when there are no torches in a wood structure, light that is outside generally stays outside when doors are closed(and vise versa).


With all of this addition, I've been getting better at spriting too.


I'm currently sick so I guess this is all I'll be doing for a while.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline J0
« Reply #4413 - Posted 2016-06-29 09:46:21 »

@TritonDreyja This is looking good so far! There are a few graphical elements that disturb me though, mostly in the background. I reckon you could desaturate your mountains and trees a little bit, for they are more colourful than the foreground; the fact that your sun bears #FF0000 red is also quite disturbing so I'd also change that; last thing is your day sky, you could really use some gradient there:

Not my pic

J0 Smiley

Offline TritonDreyja
« Reply #4414 - Posted 2016-06-29 17:36:39 »

I actually do use a gradient, but I think I need to look at the parameters again. It really isn't noticeable until sunset at the moment.

Thanks for pointing out the mountains though! I never really took the time to look at their color compared to the foreground. I'll be adjusting them accordingly pretty soon. As for the sun... it's a sprite from when I was thirteen and I should probably change it now  Grin.
Offline SHC
« Reply #4415 - Posted 2016-06-29 17:37:37 »

I thought of combining large repeating meshes and push them to the GPU as a single mesh which improves performance, and I have created another constructor for my
MeshRenderer
which takes an instance of the
DynamicRenderer
instance so the same data can be reused again and again without uploading it every frame to the GPU.

1  
2  
3  
4  
5  
6  
7  
DynamicRenderer dynRenderer = ...;

dynRenderer.begin(Primitive.TRIANGLES);
{
    // Add vertex data, colors, normals and texcoords here.
}
dynRenderer.end();

This is how normally I render meshes. This renderer is a utility class which collects the data in a big VBO under the hood and streams it to the GPU, giving the ease of the immediate mode rendering with custom shaders. Now in case I want to store some meshes into a large meshes that I know they are static, I can combine them into a batch.

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
DynamicRenderer dynRenderer = ....;

// The RenderPolicy here prevents the renderer from calling glDrawArrays and
// clearing the data. The data will be cleared once the renderer begins again.
dynRenderer.begin(Primitive.TRIANGLES, RenderPolicy.NO_RENDER);
{
    // Add the vertex data here now.
}
dynRenderer.end();

// Finally create a mesh renderer using this dynamic renderer to get a large Mesh
MeshRenderer meshRenderer = new MeshRenderer(dynRenderer);

That's it, I can now freely render multiple static meshes in one go, and instead of streaming large meshes every frame, I can create them once into a batch, and call render as many times as I can do. It helps me as I can now reuse the dynamic renderer for rendering other entities or even dispose it altogether. It took me an hour, but is worth its time.

Offline FabulousFellini
« Reply #4416 - Posted 2016-06-29 18:08:22 »

I used this article: http://www.java-gaming.org/index.php?topic=26885.0 to implement some cool particle effects for explosions.  That's a pretty good tutorial. 

-FabulousFellini
www.fabulousfellini.com
Offline TritonDreyja
« Reply #4417 - Posted 2016-06-29 23:53:48 »

Used the text box engine found here: http://www.java-gaming.org/index.php?topic=25490.0
and also started up on the changes @J0 suggested before.

Offline ziozio
« Reply #4418 - Posted 2016-06-30 04:41:22 »

Completed my new GIF and JPEG texture loaders, decoding image formats may sound boring but its quite interesting how the different formats (I have quite a few other image decoders) differ from each other in terms of the technology they use Its also interesting to see how other types of formats (sound and video) share similar technologies with the image formats.

The biggest surprise was learning about colors, JPEG doesn't decode to RGB but instead it decodes to the YCbCr format. Once in this format there are then various formulae to convert to RGB (For video there are different formulas for PAL vs NTSC and SDTV vs HDTV for example)
Offline Slyth2727
« Reply #4419 - Posted 2016-06-30 04:47:25 »

Finished the final two levels of microcorruption.com. I'm not happy with life right now.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Archive
« Reply #4420 - Posted 2016-06-30 05:11:38 »

vsim 2.0 lmao


Offline EgonOlsen
« Reply #4421 - Posted 2016-06-30 06:52:54 »

I finally finished (at least I hope so...) a Commodore BASIC V2 (https://www.c64-wiki.com/index.php/BASIC) compiler thingy. It takes any C64 BASIC program, compiles it into a kind of object tree (not directly into machine- or p-code) and executes the results. It's not an emulator, i.e it doesn't try to mimic the original hardware. It just runs the programs. If they are using actual hardware features, the results look strange sometimes but they run nonetheless.
The purpose of all this has still to be discovered. I guess one could use it as a scripting language for Java if one really wants to...
Execution time is around 10% of compiled Java code, but 10 times faster than similar (albeit more limited) BASIC interpreters that I tried.

Example program:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
10 FOR B=99 TO 1 STEP -1
20 GOSUB 100
30 T$=T$+" OF BEER ON THE WALL"
40 PRINT T$;", ";T$
50 PRINT "TAKE ONE DOWN AND PASS IT AROUND, "
60 IF B-1<=0 THEN PRINT "NO MORE BOTTLES OF BEER ON THE WALL":GOTO 80
70 GOSUB 200:PRINT " OF BEER ON THE WALL"
80 PRINT:NEXT
91 PRINT "GO TO THE STORE AND BUY SOME MORE, 99 BOTTLES OF BEER ON THE WALL"
92 END
100 T$=STR$(B)+" BOTTLE":IF B>1 THEN T$=T$+"S"
110 RETURN
200 A=B-1:PRINT STR$(A)+" BOTTLE";
210 IF A>1 THEN PRINT "S";
220 RETURN


..or a more condensed version:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
10 FORB=99TO1STEP-1:GOSUB100
20 T$=T$+" OF BEER ON THE WALL":PRINTT$;", ";T$:PRINT"TAKE ONE DOWN AND PASS IT AROUND, "
30 IFB-1<=0THENPRINT"NO MORE BOTTLES OF BEER ON THE WALL":GOTO50
40 GOSUB200:PRINT" OF BEER ON THE WALL"
50 PRINT:NEXT
60 PRINT"GO TO THE STORE AND BUY SOME MORE, 99 BOTTLES OF BEER ON THE WALL":END
100 T$=STR$(B)+" BOTTLE":IFB>1THENT$=T$+"S"
110 RETURN
200 A=B-1:PRINTSTR$(A)+" BOTTLE";:IFA>1THENPRINT"S";
210 RETURN


Edit: Some other valid program for your enjoyment (three FORs, but only one NEXT...)

1  
2  
3  
4  
10 FORI=0TO10:FORX=0TO20:FORY=5TO30
20 PRINTI,X,Y
100 NEXT
110 IFI<>10ORX<>20GOTO100

Offline princec

« JGO Spiffy Duke »


Medals: 1101
Projects: 3
Exp: 20 years


Eh? Who? What? ... Me?


« Reply #4422 - Posted 2016-06-30 08:34:03 »

Always amuses me how CBM BASIC can we written without any whitespace.

Cas Smiley

Offline EgonOlsen
« Reply #4423 - Posted 2016-06-30 08:44:02 »

Always amuses me how CBM BASIC can we written without any whitespace.
Yes. That makes parsing it quite different from modern languages. Simply because variable names combined with commands can lead to things that actually look like keywords. Like

1  
2  
3  
10 LE=1
15 R=20
20 FORI=LETOR

...merges LE and TO into the LET keyword (edit: and TO and R into OR)...or...

1  
2  
10 T=4
20 IFTAND5THEN

...merges T and AND into the function call TAN.

Some BASIC compilers had issues with this in the past and treated these cases as syntax errors, which they aren't.

Offline SkyAphid
« Reply #4424 - Posted 2016-06-30 17:01:24 »

I made this cool hotbar just now after testers requested it.



It turned out pretty cool, I think.

it just werks
Offline philfrei
« Reply #4425 - Posted 2016-06-30 18:16:12 »

Sunday/Tuesday worked out the kinks of converting a Yamaha DX7 patch called "CHROMA  5B" to Java. I want to use it in a game design I am currently working on. The interesting feature of this synth patch is that the shorter the amount of time before the release is triggered, the brighter the decay. In other words, when you play it on a keyboard by holding the key down, the tone color quickly becomes damped, but if you play super staccato (releasing very quickly) the tone color is quite bright, with qualities of a hammered metal string.

The last kink to work out was implementing "frequency scaling," so that the harmonic content of the higher frequency notes would balance with that of the lower notes. I hadn't yet added this to my synth as a general feature, and was worried it would be tricky. But it turned out to be easier than expected. A nice sounding roll off to the "modulation index" (a factor that determines the amplitude of the modulation) was achieved with a simple Math.log10(frequency) function.

Late Tuesday and most of Wednesday was spent working on getting a queue of sequences to run. I had previously gotten multiple instances of what I call PulseMotif to play in the "CircleSounds" demo, where multiple sequences loop concurrently and have their pan and volume altered by the position of circles on the screen. But I hadn't done the thing of having a new sequence start when another ends. The bigger goal is to have not only sequences possible, but real-time branching in the selection of which sequence to play next.

Anyway, I got a simple chain of three sequences to run smoothly yesterday. It is a bit clunky, but I think the key idea is a good one. Instead of focusing on various Sequence queueing/handling objects, I wrote a PulseMotifListener interface, and the player-code for the PulseMotif objects now sends out messages marking the beginning, looping and ending of a sequence to registered Listeners of that PulseMotif. (A similar thing happens with individual Notes played by my FM Synth implementation.) The testing code had an inner class that implemented PulseMotifListener, and it handled the removal of the finished sequence and the start of the next within the implementation of its pulseMotifDone() method. And it ran successfully, as far as I can tell.

Today, I plan to work out the logic where instead of a simple chain, I have a pool of options and state variables are used to select a sequence from the pool to chain when a given sequence ends. I'll try and get a demo of this up soon if it works.

music and music apps: http://adonax.com
Offline TritonDreyja
« Reply #4426 - Posted 2016-06-30 19:06:55 »

Added rain effects to TF, and continued playing with the Sky settings.
It almost feels like my graphics are a lot better than the actual game they present.
It doesn't say much, but I mean this game looks like much more than it actually is IMO.
Offline J0
« Reply #4427 - Posted 2016-06-30 20:33:23 »

In that case you just have to improve the actual game Wink

Offline Roquen

JGO Kernel


Medals: 518



« Reply #4428 - Posted 2016-06-30 21:13:03 »

Ran across a pixel art program: https://dunin.itch.io/ptop
Offline basil_

« JGO Bitwise Duke »


Medals: 418
Exp: 13 years



« Reply #4429 - Posted 2016-06-30 22:08:39 »

[...]
a pool of options and state variables are used to select a sequence from the pool to chain when a given sequence ends
good old dx7, owned one back when Grin

sounds like a straight forward state machine creating responsive sounds, looking forward to it Smiley
Offline Slyth2727
« Reply #4430 - Posted 2016-06-30 23:43:54 »

Got my first paycheck for my summer internship Smiley 3rd year coding with this company.
Also randomly working on a genetic algorithm thing for cars. Randomly generates a chassis and wheels + terrain, then pits the cars against one another. I have all the simulation stuff done, now I just need to concatenate all the varying info into a "gene" to use for breeding.

Check out the code here if you want: https://github.com/CMatri/CarGenetics
Offline Mac70
« Reply #4431 - Posted 2016-07-01 10:20:46 »

Written last exam in this semester... And got accepted on summer internship I wanted literally hour later (first in my life as well)! Smiley
Offline Opiop
« Reply #4432 - Posted 2016-07-01 13:30:47 »

Bought my dream car, the Subaru WRX! She's a 2017 WRX in the base trim with a manual transmission in Lapis Pearl Blue. I really have to thank some of the members here for putting up with me in the beginning, if I had been turned off of programming I would have never been hired as a software developer and I wouldn't be the proud owner of my favorite car. I truly have to accredit the beginning of my career to this site. So thank you everyone!

Have a picture taken with a potato!

Offline J0
« Reply #4433 - Posted 2016-07-01 19:08:33 »

I've been working on my 2D OGL rendering wrapper, I think I can now see what I'd like to make. My ideas are still a bit foggy, so I'll talk about them a little later on.
Anyway, I now have a solid way to display strings in any font: about 250ms for the first font's initialization, about 30-50ms for the next fonts, followed by 0-1ms to reinit them each time the OpenGL context is destroyed and reopened. Unfortunately I have to instantiate a same font twice if I want to change its size.
Text can then be rendered in any colour, skipping lines after words that would make the line width go off-limits, etc.

J0 Smiley

Offline TritonDreyja
« Reply #4434 - Posted 2016-07-02 05:34:59 »

I decided to redo TritonForge's terrain generation system and so far, the results are amazing. Worlds can be much bigger and they generate like 3x as fast as before! Mountains are higher, valleys are lower. There are also plains generated every once in a while, so worlds are very different now from seed to seed. The caves also use a vein-esque system to generate now and I like it more than when it was just straight perlin noise.



(A 3500x2000 world or 2.275km x 1.3km when you take into account the character's size. The character is ~0.6m x ~1.3m)
It is not done yet, but it shouldnt take long to add ores and stuff back in.

The generation uses a Java port of the C++ Accidental Noise Library, and it can be found here: http://www.java-gaming.org/index.php?topic=29439.0
Offline J0
« Reply #4435 - Posted 2016-07-02 14:09:08 »

Spent a couple hours changing most of my rendering code to fit zooming; however, whilst zooming onto the origin (the center of the display in my case) works fine, trying to zoom onto something else is kinda tricky... I'd really appreciate it if someone could provide me with a good paper about that Smiley

J0

Offline KaiHH

JGO Kernel


Medals: 703



« Reply #4436 - Posted 2016-07-02 16:19:24 »

Zooming out/into a specific position (such as under the mouse cursor) is really simple and just like rotating around a given position.
When you use OpenGL, for example, then you first apply a translation to translate to the scaling origin, then apply the scaling, and then you translate back (by negating the first translation). You then pre-multiply this transformation to your modelview matrix. Done. Smiley
Working example with LWJGL 3 and JOML here

EDIT:
the latest development version 1.8.2-SNAPSHOT of JOML contains new convenience methods to scale and rotate the view/camera around a given position:
Matrix4f.rotateAroundLocal/scaleAroundLocal(..., position)
, which is shorthand for:
modelview.translateLocal(-position).scaleLocal/rotateLocal(...).translateLocal(position)
, which performs pre-multiplication and is itself a more efficient way of doing:
tmpMatrix.translation(position).scale/rotate(...).translate(-position).mul(modelview, modelview)

When wanting to scale/rotate an object and not the camera around a given point, omit the "Local" at the end of the method names.
Offline J0
« Reply #4437 - Posted 2016-07-02 17:15:06 »

@KaiHH Thanks a lot I didn't know about that at all! I was trying to manually adapt the positions at which I was drawing every single element... persecutioncomplex

Offline Archive
« Reply #4438 - Posted 2016-07-03 05:59:31 »

Added video scaling and real time dithering just for some retro fun Smiley


Offline Longor1996

JGO Wizard


Medals: 116
Projects: 2
Exp: 8 years


The cake is probably a lie.


« Reply #4439 - Posted 2016-07-03 16:44:09 »

Technically I did this 27 days ago, but who cares!

I was bored and ported the 'par easings' one-header library from here to Java. The code can be found here (Warning: No documentation): https://gist.github.com/Longor1996/e6f0c0c7f6208859917b7fe992e0045c

The cake is probably a lie... but it's a delicious lie!
Pages: 1 ... 146 147 [148] 149 150 ... 213
  ignore  |  Print  
 
 

 
hadezbladez (3676 views)
2018-11-16 13:46:03

hadezbladez (1318 views)
2018-11-16 13:41:33

hadezbladez (3681 views)
2018-11-16 13:35:35

hadezbladez (712 views)
2018-11-16 13:32:03

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

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

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

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

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

nelsongames (4755 views)
2018-04-24 18:14:32
Java Gaming Resources
by philfrei
2019-05-14 16:15:13

Deployment and Packaging
by philfrei
2019-05-08 15:15:36

Deployment and Packaging
by philfrei
2019-05-08 15:13:34

Deployment and Packaging
by philfrei
2019-02-17 20:25:53

Deployment and Packaging
by mudlee
2018-08-22 18:09:50

Java Gaming Resources
by gouessej
2018-08-22 08:19:41

Deployment and Packaging
by gouessej
2018-08-22 08:04:08

Deployment and Packaging
by gouessej
2018-08-22 08:03:45
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!