Java-Gaming.org Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (690)
Games in Android Showcase (201)
games submitted by our members
Games in WIP (764)
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 ... 55
1  Discussions / Miscellaneous Topics / Re: What I did today on: 2016-04-16 20:03:14
So the last couple of days were interesting. I implemented fluid/gas simulation using the Lattice Boltzmann Method.

Unfortunately I dont get the math behind all of this. (Never had a PDE course yet, second university semester starts next monday). That means that i derived the code from the most "concrete" equations in papers i could find. This is the result:

<a href="http://www.youtube.com/v/Tvoj15jq_f0?version=3&amp;hl=en_US&amp;start=" target="_blank">http://www.youtube.com/v/Tvoj15jq_f0?version=3&amp;hl=en_US&amp;start=</a>

Interestingly, the motivation for this was creating a game (as always). I wanted to make an Element-bending game in which you could control air, water, etc. like in the Avatar: The last airbender tv series. Lets see how far this will get. I don't even care whether I finish someting playable. This was plenty of fun already Smiley

<edit>
Technical details: 40 fps, that means ~180k site updates per second (which is not good at all...) with a 3.4 GHz 4-core hyperthreading Intel Xenon.
Color at each cell depicts the magnitude of the macroscopic velocity of the fluid at that cell.
</edit>
2  Discussions / Miscellaneous Topics / Re: What I did today on: 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.
3  Discussions / Miscellaneous Topics / Re: What I did today on: 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.
4  Games Center / WIP games, tools & toy projects / Re: Vangard on: 2016-04-10 20:24:53
Instead of a dummy post here just some of my sauce:

I really like how you focus your time on gameplay instead of fancy graphics, tbh the game looks really cool with this vector art anyway Smiley

I also like the idea of having a dynamic world with people simulated. I would really like them to also build stuff, build villages, change the world. There is this really cool feeling, when you've been to a place, and after some time visit it again and notice how it changed. Would love to see this in your game Smiley

TLDR; like your approach, like the game idea.
5  Discussions / Miscellaneous Topics / Re: What I did today on: 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>
6  Game Development / Newbie & Debugging Questions / Re: Trouble implementing multiple key inputs on: 2016-04-07 09:59:35
This could be a hardware issue with keyboards. Depending on the keyboard you use you can only press certain keys in parallel. I remember not being able to nitro + drive left in need for speed even though I could do the same going to the right Smiley
7  Discussions / Miscellaneous Topics / Re: What I did today on: 2016-04-07 09:06:40
@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
8  Discussions / Miscellaneous Topics / Re: What I did today on: 2016-04-06 19:58:39
Its been a while since I've been active the last time...  Roll Eyes

Currently got in the joy of programming graphical stuff (that is, games) and tried to raytrace some voxel grids:



Currently all rays are parallel and in that image the direction is (0, 0.1, 1). In case one component is negative, shit starts to happen Cheesy


In order, the y-value of the direction the rays go is -0.09, -0.1, -0.11.


Good news is, the .vox importer seems to be working fine. Here is the model in MagicaVoxel:



I'm not gonna mention this was not written in Java, but haskell...  persecutioncomplex
9  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-02-05 21:55:10
Kopied the kinda popular game "Dont touch the Spikes!".



Implemented in haskell using my libs and a tiny little bit of FRP.
(Code: https://github.com/matheus23/DontTouchTheSpikesHaskell)
10  Discussions / General Discussions / Re: Schemes to teach the masses to code on: 2015-02-02 15:51:54
Just because "that's how it's always been" doesn't mean that's how it should continue to be.
(just a sidenote)
http://en.wikipedia.org/wiki/Naturalistic_fallacy

Stuff I learned in school ôo Roll Eyes
11  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-02-01 19:29:45
I remember the one time I got on that chart... good times... good times..

I think I was once Top 3 or something. Felt good, gamification ftw Cheesy
12  Discussions / General Discussions / Re: Schemes to teach the masses to code on: 2015-01-31 18:02:17
Our discussion has centred on numerous points, one of which is that is is a fallacy to believe that "gender Z should peform well in career Q because of specific gender attribute P", which is what it appears you just stated. (I don't actually agree - I think that there are careers inherently more interesting, and/or more suited, to specific genders, for reasons that people don't like to mention, which are conflated with sexism).

Yeah, wait a second. I agree that there are careers suited for a gender, for example midwifery or coal mining. My argument is that programming is not one of those careers.
Ah good we're on the same page then Smiley I don't think programming is any more or less suited to any specific gender (in fact there are almost no careers where this is really the case). However I do think certain careers are far more interesting to one gender or another and that these levels of interest are deeply built in to brain physiology and instinct.

Not quite. I don't think it's inherently in the psychology or instinct. It's because of our bodies. A man is naturally stronger than a woman and a woman knows better about the female body, obviously.

You might think I'm talking absolute crap here btw  Shocked but just one example I can think off off the top of my head is that there is actually a "maternal gene". This gene is only expressed in females. It has no effect in males whatsoever. It fundamentally affects the behaviour of a mother towards her offspring; when missing, the mother will largely ignore and neglect her offspring. This is just the (enormous) effects of a single gene which fundamentally separates behaviour. Not physiology.

* For your elucidation: http://www.telegraph.co.uk/news/science/science-news/9548698/Maternal-gene-identified-in-mice.html

Ok well, interesting. That reply came while writing the above. Do you think there is a gene controlling the abilities needed to code? Wink

EDIT: AARGH You are writing replies faster than I produce replies. Sorry, I'm busy. I didn't read the last 3 replies. I'll read tomorrow Smiley
13  Discussions / General Discussions / Re: Schemes to teach the masses to code on: 2015-01-31 16:49:07
Our discussion has centred on numerous points, one of which is that is is a fallacy to believe that "gender Z should peform well in career Q because of specific gender attribute P", which is what it appears you just stated. (I don't actually agree - I think that there are careers inherently more interesting, and/or more suited, to specific genders, for reasons that people don't like to mention, which are conflated with sexism).

Yeah, wait a second. I agree that there are careers suited for a gender, for example midwifery or coal mining. My argument is that programming is not one of those careers.
14  Discussions / General Discussions / Re: Schemes to teach the masses to code on: 2015-01-31 16:26:00
It makes sense that Women do midwifery, because ...<snip>
Sound of needle skipping off record...

W... wait a second. I'm not native english speaker, care to elaborate?
15  Discussions / General Discussions / Re: Schemes to teach the masses to code on: 2015-01-31 11:26:33
The elephant in the room is that nobody wants to admit that girls and boys are very much different. It really is that simple but in a world of political correctness one is liable to be shot down in flames for pointing it out.

I'm just going to go ahead and shoot you down for that persecutioncomplex Roll Eyes

Just as most boys aren't interested in midwifery and babies, most girls aren't interested in STEM. It's nothing to do with parental encouragement. They just find different things interesting. How about you try and encourage more boys into midwifery? No? Not so appealing? Midwives perhaps not seen as useful or worthy, hmm?

It makes sense that Women do midwifery, because they know the act of getting a baby much better than males and that's gene dependent.

So how does this compare to STEM? How are genes supposed to influence a human's interests? The interests are only dependent on the human's experience and education, not their genes. And genes are the only things that differentiate between males and females Smiley
16  Discussions / General Discussions / Re: Schemes to teach the masses to code on: 2015-01-30 13:09:36
...and I hate to trot out this old joke but, "Fire service crews, road diggers and coal miners all seem to have the right number of women working in those professions" (dons flameproof pants)

The Jobs in that joke are all dependent on the physical strength of the empolyed.

Programming does not need muscle strength. It's about the brain, and the intelligence difference between men and women is much smaller (=0?) and not so much gene-dependent as muscle strength.
17  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-01-29 20:48:14
Today, ... well, yesterday I created something that creates a graph of a Gauss Curve (or binomial distribution? I have no idea).



Basically it's a bar Diagram of the following:

I have 50 bars in the bar diagram. I simulate 50 coin flips and if for example 27 of those are heads, I count +1 for bar number 27. That I repeat 1 million times (that takes about 2 secs, inefficient code, sorry).

It's obvious, that most of the 50-coin-toss-rounds have 25 heads and it's much less common for anything else. That's why the maximum is at 25 Smiley


I also wrote a Binary Tree renderer / Layouter:


(sorry for JPG quality...)

Both little test projects are written in haskell. The first one because I was curious, the second one because I wanted to test out a library that mainly I with the help of my brother wrote (https://github.com/DeclarativeGraphics). The code for rendering the Tree is the following:
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
30  
31  
32  
33  
34  
data Tree a = Node a (Tree a) (Tree a) | Leaf a

exampleTree :: Tree String
exampleTree =
  Node "Test"
    (Node "oh"
      (Leaf "my")
      (Node "god"
        (Leaf "tis")
        (Leaf "awesum")))
    (Node "right"
      (Leaf "right1")
      (Leaf "right2"))

data TreeStructure = SuperNode | SubLeft | SubRight deriving (Eq, Ord)

main :: IO ()
main = showFormWindow (0.5, 0.5) $ centeredHV $ renderTree exampleTree

renderTree :: Tree String -> Form
renderTree (Leaf str) = drawTreeNode str
renderTree (Node str left right) = removeTracking trackedTree `atop` conLines
  where
    subtrees = centeredHV $ append Vec2.right [addOriginTracking SubLeft $ renderTree left, addOriginTracking SubRight $ renderTree right]
    trackedTree = append Vec2.down [addOriginTracking SuperNode $ drawTreeNode str, subtrees]
    superPos = fromJust $ getTrackedPos SuperNode trackedTree
    rightPos = fromJust $ getTrackedPos SubRight trackedTree
    leftPos = fromJust $ getTrackedPos SubLeft trackedTree
    blackLine start end = outlined (solid black) $ noBorder $ openPath $ pathPoint start `lineConnect` pathPoint end
    conLines = blackLine superPos leftPos `atop` blackLine superPos rightPos

drawTreeNode :: String -> Form
drawTreeNode str = (collapseBorder $ centeredHV $ text tstyle str) `atop` (padded 10 $ filled grey $ circle 25)
  where tstyle = defaultTextStyle { fontFamily = "monospace", fontSize = 8 }
18  Discussions / General Discussions / Re: Schemes to teach the masses to code on: 2015-01-29 20:22:47
I'm currently in "High School" here in Germany (or better: "Gymnasium", as we call it here) and I'll write my final written examination in 7 weeks.
In Germany (or at least in Baden-Wüttemberg, the Southwest part of Germany ^^) we all have the opportunity to choose courses for our 11th and 12th year. One of them is "Informatik", basically computer science, but a little more practically oriented. So I've had almost 2 years of 4 times 45 minute lessons a week now. First we learned HTML + PHP, including arrays, iteration, control flow and all that stuff + a little recursion. Then moved on to Java, learning Classes, little bit of OOP, recursion, Linked Lists, Sorting algorithms and currently stuff like sorted, balanced binary trees.

As of now I'm not allowed to do parts of my Abitur in Informatik. That'll change from next year on, though (I'll be gone then :/).

I agree to KevinWorkman. Programming should be taught to everyone. Or better: Some kind of logic thinking. Currently learning to program means learning how to use computers comprehensively, that is, learning how to use the command line (we had a little bit of this when learning Java), learning about how the internet works (HTML + PHP). Basically our computer course included a lot of specification learning, less of the "essence programming - the thinking about processes" stuff. It is also bound to current technology, or better - the technology that was "current" when they wrote the curriculum. Programming technology changes fast. It's not like in maths, where everyone seems to have agreed to some basic concepts and syntax (Sets, Basic number operations, functions, etc.). I, for example, would have liked to learn a lot more functional language stuff in school, instead of Java, since I know functional languages will take over the world, it's just a matter of time *evil-laughter*. Honestly, though, it's not really practical to stick with one technology.

Also, I believe in the future (if programming is going to be taught to a lot of people), programming will appear much more in our daily lifes: It already started with people using Excel in their dayjobs (See Reply #38). They program macros for making their life easier. I think that is going to appear in much more applications in the future. Or at least it should. Because it could make so many things easier! Smiley

About the "the great programmers and the rest" debate: Something like that seems to exist in everything that can be done as a hobby at home. For example Art: I know of some students in an art course at our school, who are significantly more skilled than the rest of the students. It's not as extreme as in our computer science course, to be honest, but it's noticable.
19  Java Game APIs & Engines / OpenGL Development / Re: Fill Ellipse from a fragment shader on: 2015-01-18 12:48:48
I'm writing a fillOval implementation using a fragment shader instead of pushing a lot of vertices for drawing my ellipse.

I'm sorry I don't have the time to look deep into this, but what I have been told, when trying to "optimize" the circle drawing  by drawing a rectangle and determining which pixels to fill in the fragment shader I have been told that simply pushing lots of verticies is faster. You might need to benchmark this. I didn't test it, but that's what I have been told Smiley
20  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-01-17 14:41:06
At least make the borders a lot smaller Smiley
21  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-01-11 10:27:45
Went for a ride in the back garden:
[...]
It was frikkin' freezing lol.

Holy moly. I would have liked to go with you on that tour!
22  Games Center / WIP games, tools & toy projects / Re: Bit Siege - 2D Competitive Multiplayer PvP Game. (Alpha v1 out now!) on: 2015-01-08 16:57:16
@opiop65 You make it seem like his progress is not worth sharing. It's one of the best games on JGO at the moment.
I... I never said that.
Honestly, I don't understand why you would release this (even as an "alpha") before you had some sort of singleplayer mode.
                                                                             
23  Games Center / Featured Games / Re: State of Fortune on: 2015-01-03 16:32:36
That render distance... How did you do that?
24  Discussions / General Discussions / Re: Programmer jokes on: 2014-12-28 15:26:15
1  
2  
// Some code
:wq

A file my brother wrote
25  Games Center / WIP games, tools & toy projects / Re: WorldOfBlocks Puzzel Game Update [42] - Indie Christmas Edition!!! on: 2014-12-26 12:03:59
That title and its syntax reminds me of my WorldOfCube Smiley  Pointing (no problem, though)
26  Discussions / Miscellaneous Topics / Re: What I did today on: 2014-12-15 17:51:00

Yo forgot mey m8
27  Discussions / Miscellaneous Topics / Re: What I did today on: 2014-12-14 20:34:13
Also following the trend. Smiley
Love that Brocolli! Cheesy
28  Game Development / Newbie & Debugging Questions / Re: JBullet Shaking & Weird collisions on: 2014-12-14 18:05:09
It looks like these things masses are too big. How do you calculate / set the mass of the objects?
29  Discussions / Miscellaneous Topics / Re: What I did today on: 2014-12-14 09:02:49
I follow the trend!
30  Discussions / Miscellaneous Topics / Re: What I did today on: 2014-12-01 16:45:15
I'd play that.
Same
Pages: [1] 2 3 ... 55
 
xTheGamerPlayz (148 views)
2016-09-26 21:26:27

Wave Propagation (342 views)
2016-09-20 13:29:55

steveyg90 (455 views)
2016-09-15 20:41:23

steveyg90 (452 views)
2016-09-15 20:13:52

steveyg90 (494 views)
2016-09-14 14:44:42

steveyg90 (518 views)
2016-09-14 14:42:13

theagentd (503 views)
2016-09-12 16:57:14

theagentd (433 views)
2016-09-12 14:18:31

theagentd (308 views)
2016-09-12 14:14:46

Nihilhis (742 views)
2016-09-01 13:36:54
List of Learning Resources
by elect
2016-09-09 09:47:55

List of Learning Resources
by elect
2016-09-08 09:47:20

List of Learning Resources
by elect
2016-09-08 09:46:51

List of Learning Resources
by elect
2016-09-08 09:46:27

List of Learning Resources
by elect
2016-09-08 09:45:41

List of Learning Resources
by elect
2016-09-08 08:39:20

List of Learning Resources
by elect
2016-09-08 08:38:19

Rendering resources
by Roquen
2016-08-08 05:55:21
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!