Java-Gaming.org Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (769)
Games in Android Showcase (230)
games submitted by our members
Games in WIP (855)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: 1 ... 135 136 [137] 138 139 ... 206
  ignore  |  Print  
  What I did today  (Read 2902542 times)
0 Members and 4 Guests are viewing this topic.
Offline Opiop
« Reply #4080 - Posted 2016-04-07 13:32:38 »


When the masterpiece is done! In good time Smiley
Offline theagentd
« Reply #4081 - Posted 2016-04-07 14:13:01 »

@theagentd

Maybe try Enums? You can encode the specific command as the enums .ordinal() and retrieve the command by EnumClass.values()[ordinal]. No switch needed. Maybe it's faster? It kind of mixes the approaches of #1 and #2 Smiley
I think Enums are literally singleton objects so we'd have the same virtual method call overhead. I already tried using the command ID to index into a static list of commands, but it was a tiny bit slower than just storing a command singleton, which makes sense (read object --> call virtual function VS read command ID ---> index into array to find object ---> call virtual function).

I tried out encoding data to a piece of native memory using MemoryUtil of LWJGL (which uses Unsafe), and got a solid 15% performance boost over using an int[] for the data. That should solve the encoding issue. The only problem now is writing 50+ command encoders and decoders. I'm gonna look into generating those.

Myomyomyo.
Offline princec

« JGO Spiffy Duke »


Medals: 1058
Projects: 3
Exp: 20 years


Eh? Who? What? ... Me?


« Reply #4082 - Posted 2016-04-07 14:31:56 »

Don't underestimate the power of the JVM when it comes to virtual method dispatch. Or indeed the actual speed of such dispatch. I think you're worrying about nothing. Design it right for ease of use first and foremost, and worry about whether it's actually fast enough later. Let's face it, if you were really, really worried about absolute speed you'd be doing everything in C++ anyway. We use Java coz it's easy.

Cas Smiley

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

JGO Kernel


Medals: 622



« Reply #4083 - Posted 2016-04-07 15:01:38 »

I think Enums are literally singleton objects so we'd have the same virtual method call overhead.
Enum.ordinal() has got to have absolutely no call overhead at runtime. It is very likely not a virtual/multimorphic call, because you cannot extend enum classes and you statically need to know the enum class you call .ordinal() at at runtime (unless you do it reflectively, of course).
So the JVM knows everything statically at compile time to convert it to a static call or likely just to a single load of a constant when JIT'ting.
Offline matheus23

JGO Kernel


Medals: 138
Projects: 3


You think about my Avatar right now!


« Reply #4084 - Posted 2016-04-07 16:16:26 »

I FIXED MY ERRORS!
(floading point math with infinity and such is hard, if you're doing it for the first time)

Here is the looking down version how it should look like:



And i tried to shoot some rays in such ways that the scene looks perspective, here it is:


I'm happy with these outcomes. The day is still young. I'll try myself at some shadows next Smiley

(maybe i need some subpixel sampling too?)

<edit>
I'm really starting to not like floating point errors...

</edit>

See my:
    My development Blog:     | Or look at my RPG | Or simply my coding
http://matheusdev.tumblr.comRuins of Revenge  |      On Github
Offline FabulousFellini
« Reply #4085 - Posted 2016-04-07 18:24:43 »

<Completely unrelated to programming>
My band just finished recording our first professionally recorded song (mix & mastered!) and now we are working on our first music video.
</Completely unrelated to programming>

What's your band called?  Do you have a website?

-FabulousFellini
www.fabulousfellini.com
Offline Opiop
« Reply #4086 - Posted 2016-04-07 18:33:02 »

<Completely unrelated to programming>
My band just finished recording our first professionally recorded song (mix & mastered!) and now we are working on our first music video.
</Completely unrelated to programming>

What's your band called?  Do you have a website?
Getting our social media in order, then I'll share out a link and the name of the band! Want everything to be perfect before I advertise anything. Thanks for the interest Smiley
Offline FabulousFellini
« Reply #4087 - Posted 2016-04-07 19:17:59 »

<Completely unrelated to programming>
My band just finished recording our first professionally recorded song (mix & mastered!) and now we are working on our first music video.
</Completely unrelated to programming>

What's your band called?  Do you have a website?
Getting our social media in order, then I'll share out a link and the name of the band! Want everything to be perfect before I advertise anything. Thanks for the interest Smiley

Nice!  Excited to hear it!  Here's my band if you wanna take a listen:  www.hardkissband.com   

-FabulousFellini
www.fabulousfellini.com
Offline Archive
« Reply #4088 - Posted 2016-04-08 03:30:44 »

Implemented some cool looking lighting and shadows. They are mapped onto what I call "Polygon Specific Textures" (PST) which are essentially textures that are large enough to be perfectly mapped onto a polygon. (The cool thing is, you can write out all these PSTs into image files and edit them and load them back into the engine to make your own custom per-polygon texture). The lighting is all precalculated so moving shadows are not possible (also not practical because this is a software engine).

The red cubes are the light sources.

The scene, demonstrating the lighting and shadows without textures.



The same scene with textures (the textures are not mine)



i apologize if these images are too large haha

Offline elect

JGO Knight


Medals: 59



« Reply #4089 - Posted 2016-04-08 06:53:14 »

Cool screenshots, but 41fps seems kind of low, considering the amount of geometry and aa missing

which gpu do you have?
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline SirSoltex

JGO Coder


Medals: 33
Exp: 1 year


Pixel-man, Programmer. Lover of the pancreas


« Reply #4090 - Posted 2016-04-08 07:02:58 »

Looks nice @Archive ! sources?

Are you humans? I don't know.
Offline Archive
« Reply #4091 - Posted 2016-04-08 14:12:03 »

Cool screenshots, but 41fps seems kind of low, considering the amount of geometry and aa missing

which gpu do you have?
41fps is what my engine caps the fps to because that is the best framerate I can get while keeping the CPU load at the minimum.

this isn't a hardware renderer Wink

Offline elect

JGO Knight


Medals: 59



« Reply #4092 - Posted 2016-04-08 15:21:53 »

41fps is what my engine caps the fps to because that is the best framerate I can get while keeping the CPU load at the minimum.

this isn't a hardware renderer Wink

Then it's great Smiley

Why did you go software?
Offline ags1

JGO Kernel


Medals: 367
Projects: 7


Make code not war!


« Reply #4093 - Posted 2016-04-08 15:28:21 »

Added mouse over events to the Vangard GUI, and simplified my code to identify clicked elements from 150 lines of fragile code to 10 lines of robust code. The UI feels much more polished with some element highlighting and mouseOver texts.

Also, I (re)invented triple buffering Smiley

Offline Archive
« Reply #4094 - Posted 2016-04-08 22:27:16 »

41fps is what my engine caps the fps to because that is the best framerate I can get while keeping the CPU load at the minimum.

this isn't a hardware renderer Wink

Then it's great Smiley

Why did you go software?
I like working on the math behind rasterization, lighting, etc haha

Offline ags1

JGO Kernel


Medals: 367
Projects: 7


Make code not war!


« Reply #4095 - Posted 2016-04-08 22:56:50 »

Nothing so fancy as software renderers, but I made teeny tiny steps and connected mouse clicks to entities in Vangard. Interactivity has arrived!


### clicked a Hovel
### clicked a Human
### clicked a Human
### clicked a Human
### clicked a Apple
### clicked a Hovel
### clicked a Hovel
### clicked a Hovel
### clicked a Hovel


Also, as the first bit of prime time genuine player mechanic, players can now go to a market and buy items!

Offline Drenius
« Reply #4096 - Posted 2016-04-09 00:06:53 »

Decided to run my game for a while. Hadn't made any changes at all.

Pictured: Nothing intended to happen whatsoever.
Click to Play
Offline ags1

JGO Kernel


Medals: 367
Projects: 7


Make code not war!


« Reply #4097 - Posted 2016-04-09 23:20:17 »

Found out my Vangard thread is blocked because I have several consecutive posts from me. Can someone post a comment on that thread so I can post a link to a new demo JAR tomorrow?

http://www.java-gaming.org/topics/vangard/36394/msg/355977/view.html#msg355977

I have got buying, selling, storage working for the player character! And the user interface is overhauled with minimaps, smart lists, sliders, carousels and much much more. New social rankings have been added (Most Wise and Most Despicable).

Offline SirSoltex

JGO Coder


Medals: 33
Exp: 1 year


Pixel-man, Programmer. Lover of the pancreas


« Reply #4098 - Posted 2016-04-10 01:32:54 »

Made another game mockup this weekend, sorta based off hyper light drifters style (great game). I also gave in and made a  twitter account, where ill probably post various other pixel art and game dev stuff.



This was sorta a warm up for Ludum dare next week too.
edit: image seems to have darkened ?
edit edit: fixed Smiley

Are you humans? I don't know.
Offline chrislo27
« Reply #4099 - Posted 2016-04-10 03:40:44 »

Tried updating my libgdx projects to lwjgl3, found out they hid all my fun hacky methods such as overriding how runnables are executed to alter music pitch so I reverted.

I didn't need multi-window support thaaaat badly... Although stock music pitch support would be excellent.
Offline delt0r

JGO Wizard


Medals: 145
Exp: 18 years


Computers can do that?


« Reply #4100 - Posted 2016-04-10 05:11:57 »

I finally made some progress in debugging problematic models from blender into jME. got animations and bones at the same time now.


Just have to fix the models now.

I have no special talents. I am only passionately curious.--Albert Einstein
Offline SHC
« Reply #4101 - Posted 2016-04-10 10:35:37 »

Started learning JavaFX today, and starting writing a project generator (for desktop and html5) projects with SilenceEngine.



It's just been two hours, and I have got the UI working. Time to work on the actual generator now.

Offline ags1

JGO Kernel


Medals: 367
Projects: 7


Make code not war!


« Reply #4102 - Posted 2016-04-10 13:29:37 »

Found out my Vangard thread is blocked because I have several consecutive posts from me. Can someone post a comment on that thread so I can post a link to a new demo JAR tomorrow?

http://www.java-gaming.org/topics/vangard/36394/msg/355977/view.html#msg355977

I have got buying, selling, storage working for the player character! And the user interface is overhauled with minimaps, smart lists, sliders, carousels and much much more. New social rankings have been added (Most Wise and Most Despicable).

Thanks to Drenius for unlocking my thread! I have posted a first demo on the thread now... 9 months after starting the thread Smiley

It's been fun working on the UI for a bit. Its so much easier improving the UI in comparison to getting the AIs to work right (given that they have to balance multiple competing and shifting priorities and requirements). Vangard is almost game-like now, assuming you like games where you collect and sell apples, combined with a little demonic possession of random passers-by Smiley

Offline matheus23

JGO Kernel


Medals: 138
Projects: 3


You think about my Avatar right now!


« Reply #4103 - Posted 2016-04-11 11:30:50 »

So after a lot of fiddleing around I got my software raytracer "ported" over to OpenGL.

Here is how it looks now (I added some shading depending on the distance the ray traveled, no shadows in the hardware version yet):



While the exact same scene would take around 500 ms to render in my software renderer, it only takes ~2.71 ms on my GPU. (NVidia GeForce GTX 550 Ti).

My shader is not optimized yet obviously. Still got like a LOT of branching going on (6 if's per ray), but i dont feel like optimizing today, so yeah.

Hardest thing in hindsight was getting all the voxel information accessible in my shader. A simple uniform array of int's didnt work, since the maximum length of a uniform array is at about 400, but i have 8400 voxels (including "empty/invisible" voxels). The solution was using a texture + texelFetch in the shader. On the internets i read that a Texture Buffer Object is just the right thing to use so I tried that and after lots of fiddleing i got it to work. fyi: the internal format GL_RGBA8 didn't work for me, I used GL_R8UI and rewrote the index access in my shader. That seemed to work...

Whats next? Probably realize i'm just playing around with stuff instead of writing a game. But I'm sure thats not too bad.

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

JGO Knight


Medals: 59



« Reply #4104 - Posted 2016-04-11 11:39:23 »

use ssbo
Offline matheus23

JGO Kernel


Medals: 138
Projects: 3


You think about my Avatar right now!


« Reply #4105 - Posted 2016-04-11 12:05:56 »

use ssbo

I read about them but quickly decided against them since, they require OpenGL version 4.3, compared to TBO's only needing 3.0.

See my:
    My development Blog:     | Or look at my RPG | Or simply my coding
http://matheusdev.tumblr.comRuins of Revenge  |      On Github
Offline theagentd
« Reply #4106 - Posted 2016-04-11 12:12:34 »

I read about them but quickly decided against them since, they require OpenGL version 4.3, compared to TBO's only needing 3.0.
Why not just use a 3D texture? It's a volume after all.

Myomyomyo.
Offline matt_p
« Reply #4107 - Posted 2016-04-12 06:35:22 »

Bought a new smaller laptop to code while driving (train) to and from work - last week was already really productive that way and it works quite well - no internet == no distractions -> just me and my code.

Already implemented the animation editor that I thought would take quite long and tweaked the GUI a lot. Also found some nasty bugs and fixed them - can't imagine how I could be so stupid to introduce them in the first place  Roll Eyes
Offline J0
« Reply #4108 - Posted 2016-04-12 07:28:59 »

(Not really today, but yesterday evening)

I finally finished this player character animation preview for my game Smiley
I personally find the result more than satisfying (never hoped to get it that smooth on my first try), but I'd like to hear what you guys think... Would this kind of animation work in a game?
Also do keep in mind that the images I used are just placeholders I quickly made — using my MOUSE —, I'll make better ones with a pencil, watercolour paint and a scanner Wink
All in all, I used 16 png pictures for the bodyparts.

warning: gif might be a little heavy for phone users out there, idk
Click to Play


If you take a look to the right of the gif, you can observe I kinda funbled around to get the result persecutioncomplex

J0 Smiley

Offline ClaasJG

JGO Coder


Medals: 43



« Reply #4109 - Posted 2016-04-12 08:32:34 »

I would actually recommend you an existing animation program. I made good experience with Spine; But it costs some bucks. It would allow you to easily import what you've now hard coded. Before I used Spine I've used Unitys animation capability and exported the animations with a custom script so I could load them with Java Tongue

You made those with a mouse you say? Shocked

-ClaasJG

My english has to be tweaked. Please show me my mistakes.
Pages: 1 ... 135 136 [137] 138 139 ... 206
  ignore  |  Print  
 
 

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

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

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

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

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

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

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

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

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

Solater (919 views)
2018-03-17 05:04:08
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

Deployment and Packaging
by philfrei
2018-08-20 02:33:38

Deployment and Packaging
by philfrei
2018-08-20 02:29:55

Deployment and Packaging
by philfrei
2018-08-19 23:56:20

Deployment and Packaging
by philfrei
2018-08-19 23:54:46
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!