Java-Gaming.org Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (731)
Games in Android Showcase (217)
games submitted by our members
Games in WIP (799)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: 1 2 [3] 4 5 ... 10
 21 
 on: 2017-06-23 04:12:25 
Started by FabulousFellini - Last post by FabulousFellini
I ended up using TinySound and wow was that easy to implement.  I never really realized it would be so easy.  I learned how to use and ported all the java sound to tiny sound in about 2 hours.

@philfrei, I would still be interested in trying out AudioCue whenever you have it good and ready.  Thanks for helping me out with this!

 22 
 on: 2017-06-23 00:48:30 
Started by BurntPizza - Last post by NegativeZero
So a few of us from the IRC decided to enter [thecurrentyear] by making a Discord channel. We'll continue to use the IRC alongside it for the time being because programmers are stubborn some people like it, and if Discord goes tits-up we can just move back Smiley

https://discord.gg/VSyAXCB

 23 
 on: 2017-06-22 16:40:18 
Started by theagentd - Last post by Icecore
I'd just create buckets of items, and transfer items among buckets, which is cache friendly.

Its good concept – but its not so easy to implement as basic List
And about LRU cache
It sad, but it not help much – because Java hold pointer to object
And objects scattered all around random places on memory
So on iteration of array objects – it jumps around memory - its not cache friendly)

Remove remaining 98 000 objects using removeFirst():
    LinkedList: 0.298 ms
    FastLinkedList: 2.78 ms
and this result most likely because you use Call function - not direct element change like in LinkedList
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
public E removeFirst(){
     
      E h = head;
     
     
      E next = h.getNext();
      if(next != null){
         next.setPrevious(null);
      }else{
         //next and prev are null, list is now empty
         tail = null;
      }

      h.setNext(null);
     
      head = next;

      size--;
     
      return h;
}


LinkedList
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
private E unlinkFirst(Node<E> f) {
        // assert f == first && f != null;
        final E element = f.item;
        final Node<E> next = f.next;
        f.item = null;
        f.next = null; // help GC
        first = next;
        if (next == null)
            last = null;
        else
            next.prev = null;
        size--;
        modCount++;
        return element;
}

 24 
 on: 2017-06-22 15:56:24 
Started by BurntPizza - Last post by Apo
Next game is ready for my christimas/advent game calendar
It is like the good old 4k competition for me. Wink

 25 
 on: 2017-06-22 13:50:09 
Started by Greendude123 - Last post by Greendude123
Hello all,

My colleagues and I from the Illinois Institute of Technology are conducting a research study to develop a measure of prior videogame experience (PVGE), intended to help develop and use learning games. Currently, we are trying to link situational and dispositional factors with PVGE through an online survey to validate the new scale. Please help us with the research by participating in this brief and confidential survey, approved by the university's institutional review board. The link is provided: https://iitresearchrs.co1.qualtrics.com/jfe/form/SV_6qZvi2oTDyXwbYN

I would be glad to answer any questions or concerns.

Thank you!

 26 
 on: 2017-06-22 07:52:33 
Started by theagentd - Last post by Riven
Does your LRU cache need to be perfect? If not, I'd just create buckets of items, and transfer items among buckets, which is cache friendly.

List<List<Item>>
where the inner list is an ArrayList, and the outer list... probably too (as that is still bound to be faster than the LinkedList, even on random insert/remove) given that you probably won't have more than 100 buckets for 10.000 items.

 27 
 on: 2017-06-22 03:14:07 
Started by Jotunn-nooks - Last post by KevinWorkman
It seems to me, if you don't take the time to write what turns out to be "crap" code, how do you grow?

Coding is a lot like a muscle--you have to engage in the problem solving activities in order to improve your ability to problem solve.

I agree with all of that.

To be clear, I wasn't telling the OP to avoid writing bad code- I was telling them to avoid writing bad code that they're planning on reusing, because the truth is that they won't actually reuse it. Write bad code, definitely. But that bad code should be a small game or app or demo that they can treat as a completed whole and move on to the next thing, instead of perpetually needing to go back and rewrite everything.

If you are just going to "template code" (and avoid any heavy lifting), might as well just use a builder tool and forego coding. Rewrites are both an inevitable and necessary part of learning. Hard to truly understand how important something is until you try and discover why the 'obvious' solution doesn't always work.

I think it's more important to learn "the process" behind programming: taking a big problem and breaking it down into smaller pieces. The only way to learn that is to do it, over and over again. With that experience comes all of the stuff you need to be a "real" programmer. Break a problem down, finish it, and move on to the next thing. Repeat that until it comes more naturally, then move on to more advanced stuff. I don't think it's super useful to constantly rewrite what you've already written. But maybe this comes down to personal learning style, so to each their own. Writing and rewriting engine code sounds horrible to me though!

If game-engines are a passion, why not? There is a lot to be learned there. I'm not saying it is any better or worse a career path than making games, though.

OP never said game engines are a passion. My guess was that they knew that games were made in engines, so assumed they needed to use one to make a game (you don't, by the way). Then they saw that a lot of people make their own engine, so the question becomes: do I make my own engine? Is that the "correct" way to make a game? And I think the answer to that, like most things in programming, is that there isn't a single correct answer. But I cant definitely understand how confusing it can be: do I learn an engine? Which one? Do I create my own? How do I get started?

And my personal answer to that is, don't do it that way. Work in smaller chunks until you have more experience with the process of programming. Get something that works, throw that up on your portfolio, and get the next thing working. Even if your end goal is to make games, you need to learn the basics first anyway.

Just my two cents though. Every person learns differently.

 28 
 on: 2017-06-21 22:31:02 
Started by Jotunn-nooks - Last post by philfrei

You've said that you're still a novice programmer, and that's completely okay! But that also means that most of the code you write right now is going to look like crap to you in 6 months- that's a sign of you growing, and it happens to all of us. But the point is that there really isn't a point in starting out creating an engine, since you'd probably end up rewriting anything you did right now anyway.


I don't know about this advice. It seems to me, if you don't take the time to write what turns out to be "crap" code, how do you grow?

Coding is a lot like a muscle--you have to engage in the problem solving activities in order to improve your ability to problem solve.

If you are just going to "template code" (and avoid any heavy lifting), might as well just use a builder tool and forego coding. Rewrites are both an inevitable and necessary part of learning. Hard to truly understand how important something is until you try and discover why the 'obvious' solution doesn't always work.

If game-engines are a passion, why not? There is a lot to be learned there. I'm not saying it is any better or worse a career path than making games, though.

 29 
 on: 2017-06-21 19:35:42 
Started by orange451 - Last post by orange451
I will look into it, Thanks Spasi Smiley

 30 
 on: 2017-06-21 19:34:47 
Started by orange451 - Last post by Spasi
But since it isn't a letter-based system there are THOUSANDS of characters to choose from; i.e. how can I fit them all onto a texture?

Storing every chinese character is generally a waste of memory. The usual approach is to have a caching scheme, i.e. a texture + associated stb packing that gets updated on the fly as new glyphs are required.

The chinese characters stored in unicode are ALL OVER THE PLACE. Which is annoying because with STB you just declare a start and an end, and it fills the middle in with letters. But I need to define a lot of ranges spanning thousands of numbers to store them. I am not quite sure what to do.

Have you tried stbtt_PackFontRanges?

Pages: 1 2 [3] 4 5 ... 10
 
Archive (337 views)
2017-04-27 17:45:51

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

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

theagentd (1016 views)
2017-03-24 15:32:08

Rule (993 views)
2017-03-19 12:43:22

Rule (975 views)
2017-03-19 12:42:17

Rule (973 views)
2017-03-19 12:36:21

theagentd (1072 views)
2017-03-16 05:07:07

theagentd (990 views)
2017-03-15 22:37:06

theagentd (762 views)
2017-03-15 22:32:18
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!