Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (489)
Games in Android Showcase (112)
games submitted by our members
Games in WIP (554)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: 1 ... 12 13 [14] 15 16 ... 18
  ignore  |  Print  
  Go on, ask me anything.  (Read 66868 times)
0 Members and 1 Guest are viewing this topic.
Offline Roquen
« Reply #390 - Posted 2012-02-20 18:28:41 »

Interesting.  I do see performance gains on 64-bit, but I tend to be computation intensive.  I thought that they added pointer compression to the 64-bit JVM...I've never bothered to look and verify.  (Of course pointer-compression isn't free).
Offline delt0r

JGO Knight


Medals: 27
Exp: 18 years


Computers can do that?


« Reply #391 - Posted 2012-02-20 18:47:27 »

I notice quite a bit of performance increase in my code. Anything CPU bound should see some gains with 64 bit in java generally simply because there are more registers and thus its easier for the JIT to do its thing. As for the longer pointers. The 64 bit jvm does some tricks. So if you don't need 64 bit pointers, it wont use them. For example the mem footprint of my code is the same in both 32 and 64 bit within the normal variations.

I have no special talents. I am only passionately curious.--Albert Einstein
Offline Cero
« Reply #392 - Posted 2012-02-20 19:09:23 »

there are games (riddick for example) with 32bit exe and a 64bit exe
you could do it like this, including 2 jre's

but there is no performance gain, its all about memory
java memory management could lead to a difference in speed, but it should really be minuscule

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Cero
« Reply #393 - Posted 2012-02-22 00:48:28 »

You said in the past that, I guess it was bmt micro, ate a lot of the profits, but now you still use it

how much do they get exactly / is it bad ?  are there alternatives, beside of course steam and stuff ?

Offline princec

JGO Kernel


Medals: 367
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #394 - Posted 2012-02-22 09:57:11 »

You said in the past that, I guess it was bmt micro, ate a lot of the profits, but now you still use it

how much do they get exactly / is it bad ?  are there alternatives, beside of course steam and stuff ?
BMTMicro take 11%. This is obviously quite a bit more than the 2-3% I think I'd be losing if I had a merchant account and processed credit/debit cards and Paypal etc. myself but the fact of the matter is they provide an awesome service and I wholeheartedly recommend them.

What's costing all the profits nowadays is the Puppygames infrastructure - we spend about $1000 a month on servers, accountancy and bank charges, which is about what we make direct through BMT. So our direct sales are basically just keeping the company ticking over and the Steam money is where our bread and butter comes from.

Cas Smiley

Offline jezek2
« Reply #395 - Posted 2012-02-22 14:02:50 »

So if you want to run it in 64-bit mode you need to distribute a separate package? That's kind of a bummer.

You could include both binaries in the package, or install the one required if it's in an installer.

32bit stuff works on 64bit pc / OS' just not the other way around

Yes, but I have case where using 32bit opengl library (ATI binary drivers) on 64bit ubuntu sort of works, but then it crashes... Using 64bit for the app fixes that problem.
Offline neuronich

Junior Member


Medals: 5



« Reply #396 - Posted 2012-03-10 10:55:04 »

I have a question.

-How many sprites can I update per frame? (for a desktop, say)
-I' a novice in OO programming. Is it really normal to have a separate object for each cell and every entity in the world? Or maybe I should just make separate arrays (Every array repersents some property of the object)
-What to do if I'm supposed to have many thousands of dynamic objects all the time on the screen and many more in the unseen world?
Offline Fokusas

Senior Member


Medals: 3
Projects: 1



« Reply #397 - Posted 2012-03-10 12:54:18 »

I have a question.

-How many sprites can I update per frame? (for a desktop, say)
-I' a novice in OO programming. Is it really normal to have a separate object for each cell and every entity in the world? Or maybe I should just make separate arrays (Every array repersents some property of the object)
-What to do if I'm supposed to have many thousands of dynamic objects all the time on the screen and many more in the unseen world?
I think i can answer these question Cheesy

1. You can update as many sprites as needed but hight amount may result in lag or other issue of performance.
2. OO- objects oriented. For example: Player (object) can be equipped with sword, shield,... (all objects). Object can have child objects and those object can too have children.
3. Look 1. And if you create many objects make sure you properly dispose of then or garbage collector may couldn't clear them. Which could result in memory leaks.
Offline neuronich

Junior Member


Medals: 5



« Reply #398 - Posted 2012-03-10 17:11:54 »

I would like to learn numbers)
Can I draw, say, 100000 sprites per frame?
Can I have, say, 10 000 000 million objects? What is the number, when you should forget about making it objects and try another approach.
As I understand OO is more for convinience and reusabilty.

Just to give the scent of my question. Let's have a tiled map. Every cell can have an object in it. If I follow strcitly OO, I make Cell.class, Entity.class. They communicate, Every cell knows what Entity it contains. But another thing I can think of is an array of cells and every cell object has a parameter, which tells us, which type of entity this cell contains. The second variant is more difficult to maintain, because I'll have to put all communication between entities into Cell.class which will become big.

In other words I would like to know the expenses and benefits on having an object instead of a field. How much additional memory (for an ampty object) it uses. How times of read/write accesses of an object and of a field vary.
Offline sproingie

JGO Kernel


Medals: 202



« Reply #399 - Posted 2012-03-10 17:39:29 »

An array of Cells is still perfectly OO, and still using separate objects, just organized in one collection.  If you have millions of them, chances are you might want to represent them with a compact representation like an int, and only create a Cell object from that int when it's actually needed.  This is also known as the Flyweight Pattern.

Consider that if you have a 100x100 map of walls and floors, that's really just two things with their references repeated 10,000 times.  References are cheap -- just the size of a pointer.  For entities that are really unique, like monsters or treasures, you might have a separate map layer that does contain unique entities on top of it, and that likely only gets into the hundreds of distinct objects, not millions.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline princec

JGO Kernel


Medals: 367
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #400 - Posted 2012-03-10 23:31:23 »

1. How many sprites can I update per frame? (for a desktop, say)
2. I' a novice in OO programming. Is it really normal to have a separate object for each cell and every entity in the world? Or maybe I should just make separate arrays (Every array repersents some property of the object)
3. What to do if I'm supposed to have many thousands of dynamic objects all the time on the screen and many more in the unseen world?
1. I can do about 20k sprites per frame at 60Hz using JDK7 Server, a GTX280, and 2.6GHz i7. In the benchmark I measured this with sprites are all transparent, rotated and animating, and of varying sizes, but not really too fill rate limited. In practice, I find that 2-3k sprites is a reasonable figure to aim at to get 60Hz on a wide range of hardware up to about 5 years old, with some actual game going on as well.
2. Learn more about OOP Smiley
3. Thousands of objects on screen is doable; what you need to do is "hibernate" offscreen objects when they are too far away to have any effect. Or put them somewhere else where they are updated much less frequently.

Cas Smiley

Offline Pidly

Junior Newbie





« Reply #401 - Posted 2012-03-16 19:03:08 »

Hello.  I have a few questions for you princec. 
1. I believe you mentioned that you went to school for programming.  How much did your school help you with designing and programming for games specifically and do you think it is/would be much harder to get into game programming without going to a school for a degree in CSE etc? (like for someone who is "self taught")

2.  When you started programming games did you try and focus on specific areas until you could find other people to help with your projects or did you try and do everything at first (like the art for example)?

3. Are there certain types of games beginners should master before going off on other projects?  For example I'm trying to make an old school 2d rpg with no game programming experience.

4. You seem to have had a lot of success with game programming and you seem very busy.  What makes you take time out of your day to answer questions from all sorts of people?  Is going to the forums and answering questions more like a break from writing and more of a fun thing or does it feel like work sometimes answering people questions or helping them out?

5. Why are you so awesome?

Thanks for your time!

   
Offline Cero
« Reply #402 - Posted 2012-03-16 19:40:34 »

How much did your school help you with designing and programming for games specifically and do you think it is/would be much harder to get into game programming without going to a school for a degree in CSE etc? (like for someone who is "self taught")

I think the situation today is very different from how it was when Cas went to school, which was like 1950 =D
So you should ask that a lot of people;
If I may comment on how it was for me, or still is: I'm doing a Bsc in "media-informatics" right now. And well... you only learn basic java programming on console level... all theoretically, nothing about how the industry actually does things.
Whenever I brought up practicality or performance, I got shut up.
Only one opinion, but I guess in every field: If you wanna get real good, you need like 1on1 training or a lot of self-learning and experience
bottom line, if you are good at self-learning, its very effective, because you can learn what you need and how you want...

Offline ra4king

JGO Kernel


Medals: 345
Projects: 3
Exp: 5 years


I'm the King!


« Reply #403 - Posted 2012-03-16 19:48:41 »

How much did your school help you with designing and programming for games specifically and do you think it is/would be much harder to get into game programming without going to a school for a degree in CSE etc? (like for someone who is "self taught")

I think the situation today is very different from how it was when Cas went to school, which was like 1950 =D
Ehhhh I don't think Cas is > 70 years old Tongue

Offline sproingie

JGO Kernel


Medals: 202



« Reply #404 - Posted 2012-03-16 19:54:16 »

I'm self-taught on every programming language I've ever learned, but the formal education, deficient as it was, taught me things like graph theory, complexity and computability theory, stuff I'd probably never have picked up on my own.  Even now, I struggle to read papers that use the simply typed lambda calculus, which is something I have books on (namely TAPL) but never had the discipline to read all the way through and do exercises and so on.

Programming languages are a dime a dozen.  Once you understand the theory, most of them are just different dialects of the same thing.



Offline Cero
« Reply #405 - Posted 2012-03-16 20:29:46 »

Ehhhh I don't think Cas is > 70 years old Tongue

making fun of old people =D

Offline princec

JGO Kernel


Medals: 367
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #406 - Posted 2012-03-16 20:53:16 »

OMG! 38 is now old and busted in the eyes of the callow youth!

1. I believe you mentioned that you went to school for programming.  How much did your school help you with designing and programming for games specifically and do you think it is/would be much harder to get into game programming without going to a school for a degree in CSE etc? (like for someone who is "self taught")

2.  When you started programming games did you try and focus on specific areas until you could find other people to help with your projects or did you try and do everything at first (like the art for example)?

3. Are there certain types of games beginners should master before going off on other projects?  For example I'm trying to make an old school 2d rpg with no game programming experience.

4. You seem to have had a lot of success with game programming and you seem very busy.  What makes you take time out of your day to answer questions from all sorts of people?  Is going to the forums and answering questions more like a break from writing and more of a fun thing or does it feel like work sometimes answering people questions or helping them out?

5. Why are you so awesome?
1. I went to university to do a "degree" in Computer Science (back in 1991, Cero Smiley). Unfortunately there was surprisingly little of what I would consider relevant vocational software engineering in it and absolutely nothing related to games programming. Ironically I got bored and skived the relational databases module (ironic because I made an extremely healthy living out of SQL in the ten years after university). Actually as I spent the whole 3 years at university pissed and stoned I find it fairly hard to draw any realistic conclusions for how that particular degree course worked out for me or anyone else. My only advice is don't do what I did, not because it might mean you will/won't get some cool job somewhere, but because you'll end up looking back on it in later life with some amount of regret for having wasted the time.

2. I started programming games when I was 7, and anyone could do everything Smiley (That was back in 1980 or so). I stayed with doing all my own stuff up until 1994 ish, of course just as a hobby, then I got a "real" job and didn't think much more about games programming for another 7 years, by which time graphical expectations were so high there was no hope I'd ever be able to draw anything that looked good enough to sell. I realised that to do do art for my games I'd have to have spent the same amount of time learning to do it as I'd spent learning to code. Fortunately Chaz turned up again and the rest is history.

3. In terms of complexity, 2D games are generally loads easier to do than 3D games; mostly because with a 3D game you spend the majority of your programming time and effort just figuring out how to draw something on the screen and then interact with the 3D world. With 2D you'll spend the majority of time just making game logic because a sprite engine is a very easy thing to make. Multiplayer games add a whole new level of complexity.

4. Sheer procrastination, and a genuine desire to see people happy. It is work, yes, but it's part of the job that I quite enjoy.

5.  Cool

Cas Smiley

Offline Damocles
« Reply #407 - Posted 2012-03-16 21:19:25 »

Ive perticipated in like 10 commercial games, made several indy games (wich only one sold to some extend).
i still dont think to have archived anything in gaming.... Sad

having too many gameideas in the drawer. but maby Im too lazy to realize any of them in full effort.

Offline Pidly

Junior Newbie





« Reply #408 - Posted 2012-03-16 22:18:44 »

Thanks for answering my questions everyone.  I'll probably think of more later when I get better at programming!

Pidly~
Offline Cero
« Reply #409 - Posted 2012-03-23 15:57:03 »

OMG! 38 is now old and busted in the eyes of the callow youth!

Teasing =D
Also you started saying that you are old. Not in this thread, but in general Wink

just a little thing: you mentioned "bundle your game with a jre 7"
did you experience a significant performance boost from 6 to 7 ?
we still compile everything with 6, so that it works quickly on linux and mac to test with.
obviously I can run stuff compiled which was compiled with 6, with a 7 jre, but I'm just curious about real advantages.

Offline Cero
« Reply #410 - Posted 2012-04-17 17:15:16 »

I saw you tweeting about Raspberry Pi, with Kevin's game on it and all...

Do you really think there is a market ?
I mean I guess Java wouldn't even work, and would people who buy a cheap device like this spend money on games for it ?

Offline princec

JGO Kernel


Medals: 367
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #411 - Posted 2012-04-17 18:08:02 »

Whoops, didn't see your last post.

Java 7 = 20% boost in performance or so in Revenge of the Titans, last time I tried some inaccurate measurements.
I still compile for Java 6 too of course. Actually might even be Java 5. I forget.

I don't care if there's a market for the RaspPi, I want one Smiley

Cas Smiley

Offline DruLeeParsec

Junior Member


Medals: 2
Projects: 1



« Reply #412 - Posted 2012-04-21 16:57:04 »

PrinceC:  First of all, thank you for this thread.  I've been coding as a job for over 15 years and as a hobby since the Apple ][ days (which probably makes me one of the oldest guys on this board) and I'm still learning a lot from this thread.

You talked a bit about the public/private key encryption which you used.  Could you discuss the actual data flow of how you use that encryption.  For example:

1) Somebody buys your game via PayPal.  What exactly happens to make their game work only for them?  How is this key generated and given to them?  How are you protected from somebody copying their key and handing it to somebody else?

2) Is there a login check when they start the game?  If so do you have a server which checks their key and authenticates it?

Thank you

Greg
Offline badlogicgames
« Reply #413 - Posted 2012-04-22 09:42:14 »

How is baby formed?

http://www.badlogicgames.com - musings on Android and Java game development
Offline ra4king

JGO Kernel


Medals: 345
Projects: 3
Exp: 5 years


I'm the King!


« Reply #414 - Posted 2012-04-22 15:06:59 »

How is baby formed?
When a mommy and a daddy love each other very much, they get together and call a special method: createBaby().

Offline princec

JGO Kernel


Medals: 367
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #415 - Posted 2012-04-22 21:12:58 »

You talked a bit about the public/private key encryption which you used.  Could you discuss the actual data flow of how you use that encryption.  For example:

1) Somebody buys your game via PayPal.  What exactly happens to make their game work only for them?  How is this key generated and given to them?  How are you protected from somebody copying their key and handing it to somebody else?

2) Is there a login check when they start the game?  If so do you have a server which checks their key and authenticates it?
The general gist of it is described here on the Puppyblog. The technical part is a simple use of some straightforward Java APIS:
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  
   private boolean validate(PublicKey publicKey, String encoding) throws Exception {
      Signature dsa = Signature.getInstance(SIGNATURE_ALGORITHM);
      dsa.initVerify(publicKey);
      if (encoding != null) {
         dsa.update(name.getBytes(encoding));
         dsa.update(address.getBytes(encoding));
         dsa.update(email.getBytes(encoding));
      } else {
         dsa.update(name.getBytes());
         dsa.update(address.getBytes());
         dsa.update(email.getBytes());
      }
      return dsa.verify(regCode);
   }

   /**
    * Create the regcode for these user details using a private key.
    * @param privateKey The private key to use
    * @throws Exception if something goes wrong
    */

   public void register(PrivateKey privateKey) throws Exception {
      Signature dsa = Signature.getInstance(SIGNATURE_ALGORITHM);
      dsa.initSign(privateKey);
      dsa.update(name.getBytes(ENCODING));
      dsa.update(address.getBytes(ENCODING));
      dsa.update(email.getBytes(ENCODING));
      regCode = dsa.sign();
   }

BMTMicro calls a servlet with the name, address and email data (we actually ignore the address and don't use it any more); this generates the regcode using that register() method there.

Cas Smiley

Offline EveningNewbs

Senior Newbie





« Reply #416 - Posted 2012-04-22 22:50:25 »

You talked a bit about the public/private key encryption which you used.  Could you discuss the actual data flow of how you use that encryption.  For example:

1) Somebody buys your game via PayPal.  What exactly happens to make their game work only for them?  How is this key generated and given to them?  How are you protected from somebody copying their key and handing it to somebody else?

2) Is there a login check when they start the game?  If so do you have a server which checks their key and authenticates it?
The general gist of it is described here on the Puppyblog. The technical part is a simple use of some straightforward Java APIS:
(snip)
BMTMicro calls a servlet with the name, address and email data (we actually ignore the address and don't use it any more); this generates the regcode using that register() method there.

Cas Smiley
Does that apply for games sold on Steam and Desura? Do they have their own platform-specific registration checks, or do you just skip it?
Offline princec

JGO Kernel


Medals: 367
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #417 - Posted 2012-04-22 22:58:40 »

Steam has its own checks using the (private) Steamworks APIs. We don't deal with Desura any more because they weren't making us any money.

Cas Smiley

Offline Cero
« Reply #418 - Posted 2012-04-23 00:36:40 »

can I still use BMTMicro without having experience with servlets ? I guess they're not that complicated though...

Offline princec

JGO Kernel


Medals: 367
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #419 - Posted 2012-04-23 09:03:16 »

BMTMicro simply call a webpage with a GET; how it works on your own server is however you want. I used a servlet because I wanted to use this Java key tech.

You could just as easily use polynomials etc. (eg. like Steam keys), and back them up with serverside verification; in which case a bit of PHP will do the job. The main advantage in the public/private key system is that it is effectively impossible to "crack", that is, generate keys. That said, if you have any serverside validation, it is similarly impossible to crack because even if you can generate keys on a whim they won't be in the server database.

Cas Smiley

Pages: 1 ... 12 13 [14] 15 16 ... 18
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

TehJavaDev (18 views)
2014-08-28 18:26:30

CopyableCougar4 (26 views)
2014-08-22 19:31:30

atombrot (39 views)
2014-08-19 09:29:53

Tekkerue (36 views)
2014-08-16 06:45:27

Tekkerue (33 views)
2014-08-16 06:22:17

Tekkerue (22 views)
2014-08-16 06:20:21

Tekkerue (33 views)
2014-08-16 06:12:11

Rayexar (70 views)
2014-08-11 02:49:23

BurntPizza (47 views)
2014-08-09 21:09:32

BurntPizza (38 views)
2014-08-08 02:01:56
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
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!