Java-Gaming.org Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (741)
Games in Android Showcase (225)
games submitted by our members
Games in WIP (823)
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 4 ... 12
31  Discussions / Miscellaneous Topics / Re: What are your java conventions? on: 2015-11-04 04:30:59
I like to separate static members and put them on top.

1  
2  
3  
4  
private static final int NAME_SPACE = 0;
private static int name_space;

private int nameSpace;
32  Discussions / Miscellaneous Topics / Re: Battlestation Thread on: 2015-10-29 22:50:08
Need a bigger desk. But my apartment is tiny xP

33  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-10-26 21:47:14
Finally worked on my particle stuffs:
Click to Play
34  Game Development / Newbie & Debugging Questions / Re: LibGDX top grass tiles on: 2015-09-22 16:05:53
Sigh... try this:

This will solve the problems in the image you showed. But there is another that you probably haven't noticed yet.

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
        for (int y = 0; y < 8; y++) {
              for (int x = 0; x < 8; x++) {
                 
               
               if(chunk.chunkBlockList[x][y] != null){
                     if (y == 7 || chunk.chunkBlockList[x][y + 1] != null) {
                         //has block on top
                        chunk.chunkBlockList[x][y].setType(BlockType.DIRT);
                     } else {
                         //is top block    
                        chunk.chunkBlockList[x][y].setType(BlockType.GRASS_TOP);
                       
                     }
               }
                 
              }
          }
35  Game Development / Newbie & Debugging Questions / Re: LibGDX top grass tiles on: 2015-09-22 14:38:09
You're looking at it the wrong way.
36  Game Development / Newbie & Debugging Questions / Re: LibGDX top grass tiles on: 2015-09-22 13:24:09
I'll give you a hint. That's only part of the problem.

1  
2  
        for (int y = 0; y < 7; y++) {
              for (int x = 0; x < 8; x++) {
37  Games Center / Showcase / Re: VSim - A 3D Vehicle Simulator on: 2015-09-22 04:13:37
This is really fun xD I suck though I only managed to get up to 75mph
38  Game Development / Newbie & Debugging Questions / Re: OpenAL - AL_MAX_DISTANCE on: 2015-09-22 01:35:10
I figured it out and had forgotten about this post.

@SkyAphid I think that was the issue. I don't remember

Thanks guys.
39  Game Development / Newbie & Debugging Questions / Re: LibGDX top grass tiles on: 2015-09-21 23:57:36
There's an obvious pattern there. You can do it.
40  Game Development / Newbie & Debugging Questions / Re: LibGDX top grass tiles on: 2015-09-21 19:20:52
Well is that the top of that chunk?

Draw the bounds of the chunks. So that you can visualize better.
41  Game Development / Newbie & Debugging Questions / Re: LibGDX top grass tiles on: 2015-09-21 19:02:53
You're using

1  
chunkBlockList.length


Edit: Oh you fixed it.
42  Game Development / Newbie & Debugging Questions / Re: LibGDX top grass tiles on: 2015-09-21 17:33:48
Honestly I don't get your code.

if you use am array for the chunks you can do something like this:
Keeping it as similar as your original method.

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
for (Chunk chunk : chunks) {
    for (int y = 0; y < rows; y++) {
        for (int x = 0; x < columns; x++) {
            if (chunk.blocks[x][y + 1] != null) {
                //has block on top
            } else {
                //is top block    
            }
        }
    }
}
43  Game Development / Newbie & Debugging Questions / Re: LibGDX top grass tiles on: 2015-09-21 17:20:33
I have no idea what you mean anymore.
44  Game Development / Newbie & Debugging Questions / Re: LibGDX top grass tiles on: 2015-09-21 17:14:32
Is that image what it should look like? it's confusing. I can't tell whats grass.

No y coord?

1  
2  
3  
boxRectangle = new Rectangle(block_pos.x - Assets.blockSize / 2, block_pos.x - Assets.blockSize / 2, 0.3f, 0.3f);
   
blockFace_UP = new Rectangle(block_pos.x, block_pos.x , 0.3f, 0.3f);


to:

1  
2  
3  
boxRectangle = new Rectangle(block_pos.x - Assets.blockSize / 2, block_pos.y - Assets.blockSize / 2, 0.3f, 0.3f);
   
blockFace_UP = new Rectangle(block_pos.x, block_pos.y , 0.3f, 0.3f);
45  Game Development / Newbie & Debugging Questions / Re: LibGDX top grass tiles on: 2015-09-21 16:54:29
So the little rectangles are grass? Are your blocks in an array or list?

is blockFace_UP an adjacent block?
46  Game Development / Newbie & Debugging Questions / Re: LibGDX top grass tiles on: 2015-09-21 16:45:38
Is it a side scroller? What kind of game is it. it's impossible to help without knowing.

so checkBlock.blockFace_UP.overlaps(boxRectangle) is always returning false?
47  Game Development / Newbie & Debugging Questions / Re: LibGDX top grass tiles on: 2015-09-21 16:38:20
remove:
1  
2  
3  
else{
    setType(BlockType.GRASS_TOP); else we set it to grass top
}
48  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-09-21 03:12:10
Started working on physics for my game dev suite. Working on spatial partitioning.

Here's my take on a quadtree:
Click to Play
49  Game Development / Networking & Multiplayer / Re: NitroNet - New, High-Level Networking Library on: 2015-09-11 03:16:16
Ideally when the writebuffer is full it flushes and continues. And eventually the entire message should send.

It's the receiving ends job to determine whether the entire packet has arrived. Then to start decoding.

Packet size doesn't matter. Unless of course its excessively absurd.
50  Game Development / Newbie & Debugging Questions / OpenAL - AL_MAX_DISTANCE on: 2015-09-06 18:08:14
I can't find an example online and it just won't work for me. It doesn't seem have any effect.

Anyone have a clue?


1  
alSourcef(sourceId, AL_MAX_DISTANCE, range);
51  Game Development / Newbie & Debugging Questions / Re: OpenAL - 2 channel OGG sound on: 2015-09-06 17:30:32
Confirmed. It was a conversion issue. From MP3 to OGG. Decided to start using FLAC instead. Then converting to OGG.
52  Game Development / Newbie & Debugging Questions / Re: OpenAL - 2 channel OGG sound on: 2015-09-06 14:27:35
@Spasi That's what I figured. I was just fishing when I found that snippet. But no there is no sound when an ogg has 2 channels. There is sound when I convert that same file to mono. Going to check out the new example now.

@SHC Thanks. That helps


Edit: It has something to do with the file itself. I downloaded the original sound from youtube. Sounds from other sources work fine in stereo.

Thanks again guys.
53  Game Development / Newbie & Debugging Questions / Re: OpenAL - 2 channel OGG sound on: 2015-09-05 17:59:51
It's interleaved into 1 bytebuffer using

stb_vorbis_get_samples_short_interleaved

54  Game Development / Newbie & Debugging Questions / OpenAL - 2 channel OGG sound on: 2015-09-04 18:21:30
From my understanding when there is 1 channel we use the format AL_FORMAT_MONO16
when there are 2 we use AL_FORMAT_STEREO16.

Currently sounds with one channel work perfectly. However sounds with 2 channels throw no errors when uploaded and don't play.

They do play in the AL_FORMAT_MONO16 format, but it's all messed up.


Has anyone ran into this issue? There is not much info online about this.

I think it might be this bit of code: (changed it a bit)
It throws an error if I use rewind instead of flip. It had rewind in the original source. OpenAL errors aren't very descriptive.
honestly it looks silly to me, or missing something. However this is what I found as an official LWJGL example
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
private static ByteBuffer convertAudioBytes(ByteBuffer samples, boolean stereo) {
        if (!stereo) {
            return samples;
        }
        ByteBuffer dest = BufferUtils.createByteBuffer(samples.capacity());
        ShortBuffer dest_short = dest.asShortBuffer();
        ShortBuffer src_short = samples.asShortBuffer();

        while (src_short.hasRemaining()) {
            dest_short.put(src_short.get());
        }
        dest.flip();

        return dest;
    }

55  Games Center / WIP games, tools & toy projects / Re: One-D World on: 2015-09-01 13:05:59
I love it. Soooo addicting. However Q for jump is ac awkward for me. Maybe make it spacebar?
56  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-08-31 12:40:11
Our second Dev Log has been published by my good friend Ahnaf.

New logs will now be published every Saturday morning!

I hope you all stop by to check them out~

Dev Log #2: http://kudodev.com/forum/index.php?/blogs/entry/4-gerudoking-has-entered-the-chatroom/
57  Game Development / Newbie & Debugging Questions / OpenGL glTexParameteri Performance on: 2015-08-28 19:13:04
Hello guys. So I have a question that I'm curious about but too lazy to test.

Maybe someone here might have a quick answer.

Issue:
Say I have a texture but I want to use it with 2 different wrap/filter mode.

Would it be best to create 2 textures OR would it be best to have one texture swap modes when necessary using glTexParameteri?
58  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-08-18 17:46:23
Started dev logs for my game in progress. Check it out here: KudoDev

Keep in mind that I'm new at this public relations stuff.

This is a project that is finally ready for some sharing. However, the first post is more of an introduction.
59  Discussions / General Discussions / Re: Easy and Fast UDP Gaming Library - is there a need for it? on: 2015-07-16 15:01:12
Alright you guys win.

I just don't need that kind of speed. Tcp tends to do it for me.

But I guess in AstroidFight and SoulFoam's game the shaved milliseconds makes a huge difference.
60  Discussions / General Discussions / Re: Easy and Fast UDP Gaming Library - is there a need for it? on: 2015-07-16 14:55:19
I know it's possible. But is the overhead of transporting extra data and processing worth it?

Ultimately, I feel that the speed increase would be negligible.

Also, how can you tell if you missed a packet, without some crazy work around?
Pages: 1 [2] 3 4 ... 12
 
Ecumene (110 views)
2017-09-30 02:57:34

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

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

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

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

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

Archive (864 views)
2017-04-27 17:45:51

buddyBro (1008 views)
2017-04-05 03:38:00

CopyableCougar4 (1568 views)
2017-03-24 15:39:42

theagentd (1373 views)
2017-03-24 15:32:08
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

SF/X Libraries
by SkyAphid
2017-03-02 06:38:56

SF/X Libraries
by SkyAphid
2017-03-02 06:38:32

SF/X Libraries
by SkyAphid
2017-03-02 06:38:05

SF/X Libraries
by SkyAphid
2017-03-02 06:37:51
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!