Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (511)
Games in Android Showcase (119)
games submitted by our members
Games in WIP (577)
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 ... 39
1  Discussions / General Discussions / Re: RSA direct bypass on: 2014-10-16 08:43:31
So give me a form of RSA encryption that is stronger.
The standard approach is to encrypt a key for a symmetric algorithm such as AES. So that's one RSA message, containing a 256-bit key padded with OAEP.
2  Discussions / General Discussions / Re: RSA direct bypass on: 2014-10-15 18:55:26
Ok, I see what the problem is. You're not even attacking naive RSA: you're attacking RSA used in ECB mode on a block size of 8 bits. This attack has real world value only against a teenager who has heard of RSA but doesn't understand it.
3  Discussions / General Discussions / Re: RSA direct bypass on: 2014-10-15 15:38:56
Is there a TL;DR version which just includes the maths and none of the UI or debug output?

That said, there are known weaknesses in the simple version of RSA which is presented in introductory number theory lessons.
4  Discussions / Miscellaneous Topics / Re: Name that Poker hand - Tiny Code Challenge on: 2014-10-08 08:39:16
I don't think it would take many changes to get something which can be posted to http://codegolf.stackexchange.com/questions/6494/name-the-poker-hand
5  Discussions / General Discussions / Re: Are Java applets really "dead" for indie developers? on: 2014-09-22 13:24:23
Funorb (http://www.funorb.com/) is pretty successful and it's games are applets.
I don't believe FunOrb was ever a tenth as successful as RuneScape, and it's currently on ice. I think only one of the original FunOrb programmers is still at Jagex. There's been talk about some kind of revival, but it might be a port of suitable games to Android and/or iOS to join Bouncedown, Star Cannon, and Miner Disturbance.
6  Game Development / Newbie & Debugging Questions / Re: Strange grid appearing in tile based game (probably rounding error) on: 2014-09-14 16:57:19
Hmm, interesting idea though to draw everything at normal size then upscale the whole screen in one go.  Wouldn't have a clue how to go about that, but I'm sure it's possible!
If you're sticking to Java2D then you'd create a BufferedImage, call its getGraphics, paint onto that, and then do a single drawImage call on the Graphics2D you're currently drawing to.
7  Game Development / Newbie & Debugging Questions / Re: Strange grid appearing in tile based game (probably rounding error) on: 2014-09-14 13:11:54
What do you guys use to make this go smoothly?
Drawing the tiles at the right size so that no scaling is necessary.

If for some reason that's completely impossible, your options are probably either to draw everything to an unscaled back-buffer and then do one scaled draw to the main buffer or to look at setting anti-aliasing etc. rendering hints on the Graphics2D object.
8  Discussions / Miscellaneous Topics / Re: So many indie games in development, how many really are completed? on: 2014-09-02 15:48:21
As I see it, there's a fine line between "indie developer" and "not-quite-yet indie developer" (or, perhaps more accurately, "hobbyists who want to sell a game"). The former group includes individuals and teams who have actually released a game. If you just focus on them,  I suspect the numbers will look different.

I doubt it. Second project syndrome. For the first project, you keep it simple. But for the second project you think you can be more ambitious, because you have experience now. My first job was for an indie company like that. The first project was in beta when I joined, and the second project had a 250-page rulebook to be converted into a proper spec and implemented. I'm not sure exactly what the current status is, but I think that 30 to 60 man-years went into it and nothing was ever published.
9  Game Development / Game Play & Game Design / Re: Tiles - Joining them on: 2014-08-30 18:21:15
This means each tile would have 9 different sprites. x1 without a border, x4 with a border going along each edge and x4 with a corner that matches.
That is a standard way of doing it. See e.g. http://opengameart.org/content/land-tiles-v2 or http://opengameart.org/content/grass-and-water-tiles
10  Game Development / Newbie & Debugging Questions / Re: What kind of game should a noob make for his first one? on: 2014-08-30 18:00:06
Right now I'm just making tile sets for my first game. I've only been working in Java for almost a month now, and I wanted to try to make a game. So I joined this forum, and I wanted to see what you guys thought I should do.
Um. If you've invested time in the tile sets, presumably you won't want suggestions that don't use them. But you haven't told us what they are, so we can't give you suggestions which do use them. Either way, my recommendation is not to spend much time at all on the graphics until you've got the mechanics working.
11  Game Development / Newbie & Debugging Questions / Re: Trouble rendering using BufferedImage, pixels and for loops. on: 2014-08-29 12:06:14
There's a lot of scope for micro-optimisation in your code. Back in 2007 I could get 60fps, admittedly at 640x480 resolution, but using software rendering of a 3D scene with z-buffering by updating an int[]. For a start, ditch the calls to List.get every pixel and replace the multiplications with additions. Then ditch the multi-step process where you paint from the button template buffer onto a button buffer and then paint the button buffer onto the screen buffer: you want to do all your painting directly to the output buffer.
12  Game Development / Newbie & Debugging Questions / Re: calculating an inverse multiplicative modulus in java... on: 2014-08-22 11:07:46
Bad me. There's a modulo inverse for all odd integers.
No, there's a modulo inverse for all numbers which are coprime with the modulus. Hence the link with Euclid's algorithm for finding gcd. (I'm not sure whether you realised this and that's why the bit about needing a drink, but even if you have it might be helpful for other people reading the thread).

I think your linked code is calculating inverses modulo 2^32 for odd integers, but the Javadoc isn't clear enough for me.

Thanks for that info , yes I have made a prime number generator.
I should add that in general you can use Euler's theorem, and for primes that's Fermat's little theorem: a^(p-1) == 1 (mod p) provided that a is not a multiple of p. So if you already have a modular exponentiation function and you don't have an extended Euclid function, that's an alternative approach. I think they should have the same asymptotic complexity.
13  Game Development / Newbie & Debugging Questions / Re: calculating an inverse multiplicative modulus in java... on: 2014-08-22 09:25:24
@Roquen, this isn't about matrices.

@lcass, are you guaranteed that d is a prime? If not, the inverse may not exist. If it does exist, it can be found efficiently with the extended Euclidean algorithm. That page has a section on multiplicative inverses.
14  Game Development / Newbie & Debugging Questions / Re: Inverting Matrices on: 2014-08-22 09:22:46
JAMA. But you should first ask whether you can avoid matrix inversion, because it can be ill-conditioned.
15  Game Development / Game Mechanics / Re: Plane physics on: 2014-08-14 09:07:53
Does anybody know good equations for the following things?

- Lift amount for an angle of attack specified
- Drag amount for an angle of attack specified
Those will vary by aircraft. You need to decide whether you're trying to simulate a Cessna, a 747, an F-14, a Lancaster, ... and then try to find data specific to that plane. Bear in mind that airspeed also makes a big difference: especially the switch from laminar to turbulent flow which guarantees a stall.
16  Discussions / Community & Volunteer Projects / Re: Building RPG-like Tile-based Game on: 2014-07-22 10:57:52
It always has been. Read this thread in its entirety. There are some generally applicable comments in there which could probably be reworked into an FAQ at some point.
17  Discussions / General Discussions / Re: New feature: Embedded PDFs on: 2014-07-18 08:36:13
Due to a certain observed need
If you want people to be able to use nicely formatted formulae, you could install MathJax. Or point people at http://mathurl.com/

In the case that there is no default PDF reader associated with the browser, which is often the case on phones and tablets, a download of the file is initiated. I'll work no this later, to prevent such 'unexpected' downloads on potentially bandwidth limited devices.
It would also be useful to not display it other than in the main thread view page. I had to cancel a second download when I opened up this reply page.
18  Game Development / Game Mechanics / Re: Vectors and Reflection - Ball bouncing messed up by simultaneous collisions? on: 2014-07-16 14:35:04
It's not a trivial solution, but the one which I used for Torquing! is from Complementarity based multiple point collision resolution, Giang, Bradshaw, and O'Sullivan, Eurographics Ireland Workshop, pp1 - 7, 2003, available online at http://www.tara.tcd.ie/bitstream/2262/18699/1/GiangEgirl03.pdf
19  Game Development / Newbie & Debugging Questions / Re: Do I need permissions for SharedPrefrences? on: 2014-07-16 08:38:56
If you could say what the basic error was, the random person who finds this thread via Google in two years when they're trying to debug the same problem will be grateful.
20  Game Development / Newbie & Debugging Questions / Re: Collision detection with tiling, fall problems? on: 2014-07-10 12:54:38
I recall other games with similar problems but can't recall if they work around it or leave it. Does anyone have any suggestions?  Huh
Easy option: make the base of the robot be its widest part.

Nice option: have a width (e.g. 24px) and an effective footprint (corresponding to the graphic; e.g. 18px). If the effective footprint is above empty space, the robot falls, but you nudge it sideways if necessary to prevent its width from passing through solid space.
21  Game Development / Shared Code / Re: Trie-based dictionary on: 2014-07-07 09:19:54
Would a String be simpler than ArrayList<Character> for unscrambled? It has to be turned into a string for output anyway.
Not really, in the sense that because strings are immutable it would increase the amount of object creation. The way to reduce that is to use a single char[] (tracking the length of the subarray which is relevant) and then use the corresponding String constructor when a word is found.
22  Discussions / General Discussions / Re: The Wrath of Ackermann on: 2014-07-07 09:14:28
No matter how much I optimized, we just couldn't think of a good way to calculate past A(4,2)...

Any thoughts or takers?
Depends what you mean by calculate. For m > 2, A(m, n) + 3 = 2 → (n+3) → (m − 2) = 2 → (2 → (n+2) → (m − 2)) → (m − 3) = 2 → (A(m, n − 1) + 3) → (m − 3), so in particular A(4, n) + 3 = 2A(4, n − 1) + 3. If you want to calculate that naïvely as a list of bits, you'll run into trouble. But selecting the correct representation of your data is the first thing to learn in computing.
23  Game Development / Shared Code / Re: Trie-based dictionary on: 2014-07-03 09:30:37
3. Trie search (prefix tree search). This is supposed to be the fastest.
It probably would be if you implemented it properly. Linear search through a list at each level is not the classic trie implementation. It should be a single array lookup. The problem then is memory usage; I've found that if you have an expensive offline building process which generates the trie and then combines isomorphic nodes, it takes about as much space as the original word list but performs like a trie.
24  Discussions / General Discussions / Re: Programmer jokes on: 2014-06-24 16:59:13
His code gives you a IndexOutOfBounds Exception.
Not necessarily. You don't see where numBrainCells is set.
25  Game Development / Artificial Intelligence / Re: A* Multiple paths to goal on: 2014-06-24 14:45:36
I like Orangy Tang's idea a lot, but I'm going to throw a second idea into the ring, in case you're keen enough to try testing various ideas and see how effective they are. In short: meet in the middle.

This idea takes a parameter E (for excess) which indicates how much worse than optimal you're willing to accept. First find the optimal path length, L. Then, reusing the data structures you've already built up, extend into a breadth-first search of all nodes reachable from your start point in no more than EL/2 and with heuristic estimate no worse than EL/2. Now do a similar BFS from the end point. The intersection of the reachable points gives you paths of length no more than EL, and for each node in the intersection the path you get is the optimal path through that node.

The main downsides are that the two BFS will expand quite a lot more nodes than the original A*, and that you need to deduplicate. However, you'll probably need to do that with Orangy Tang's answer too unless you have a good heuristic for how much penalty to apply to each existing path, so without careful analysis or profiling it's hard to say which is faster.
26  Game Development / Newbie & Debugging Questions / Re: Shooting at the mouse on: 2014-06-23 09:04:13
You have x and y. You convert them to an angle. Then you convert back to x and y. It's a lot simpler to just normalise the vector and not do any trigonometry at all. In fact, most 2D games have little or no need for trig.
27  Game Development / Newbie & Debugging Questions / Re: Shooting at the mouse on: 2014-06-23 08:49:24
Why do you have a shootAtRad method? Isn't it just going to do a sin and cos to get back to an (x, y) vector?
28  Game Development / Newbie & Debugging Questions / Re: learning modern opengl on: 2014-05-21 12:58:15
Haven't read it myself, but I saw http://www.opengl-tutorial.org/ recommended recently.
29  Discussions / Community & Volunteer Projects / Re: game idea: "space wars" on Klein bottle surface? on: 2014-05-18 07:51:37
I once wrote up a design proposal for a puzzle game on a surface of genus 2, but I never made the game. I can't remember now what the reaction from the rest of the team was. IIRC I had some scheme involving 7 screens which gave the right topology, but it was a pretzel rather than a Klein bottle.

And I think I've seen occasional mention of other games which do puzzles on surfaces other than the simple plane, sphere, or torus, but no names come to mind now.

(No shooting self in the butt except in the narrow neck areas.)
Wouldn't the question become just finding a good projection operation for all points...one that has no local intersections in 3D?

I would think that you want to project symmetrically, such that (modulo textures) the view is unchanging. Then if the projection has a local intersection and a narrow neck area, pick a part of the projection which puts them way beyond the horizon so that the player is unaware of them.

Aren't old-school game maps (Of the wrapping over head sort) basically these?

No, they're tori. A bit simpler.
30  Discussions / General Discussions / Re: Is it just me, or does everyone's GUI code look like spaghetti? on: 2014-05-14 08:41:42
It seems like a large majority of GUI code ends up like this, because you end up with a lot of similarly functioning buttons all under the same controls that are all just-different-enough you really can't combine much of anything together.. so for code as simple as detecting what button you're hovering over and what method to run when you click on it can easily skyrocket to a hundred+ lines of code just for a dozen buttons.
It shouldn't. The code in the methods might run to that, but the code to dispatch them should be much simpler. Unless you have so many buttons that you need a BSP or quad-tree, you just need to register tuples of (x, y, width, height, strategy) and loop through them.
Pages: [1] 2 3 ... 39
 

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

The first screenshot will be displayed as a thumbnail.

Longarmx (52 views)
2014-10-17 03:59:02

Norakomi (42 views)
2014-10-16 15:22:06

Norakomi (32 views)
2014-10-16 15:20:20

lcass (37 views)
2014-10-15 16:18:58

TehJavaDev (68 views)
2014-10-14 00:39:48

TehJavaDev (66 views)
2014-10-14 00:35:47

TehJavaDev (59 views)
2014-10-14 00:32:37

BurntPizza (73 views)
2014-10-11 23:24:42

BurntPizza (45 views)
2014-10-11 23:10:45

BurntPizza (85 views)
2014-10-11 22:30:10
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

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
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!