I watched a game play video of frogger on youtube. It does look alike haha.

I've never thought of Web Start or GetDown.I didn't think of Web Start because I thought the warning to run would discourage some people. I had never heard of GetDown, so I just read a bit about it now.

This game is called MARUTA. It's a mini game from Bomberman land. I made a remake.

You collect the coins on the woods by jumping between them. You lose a life point if you jump into the river. The woods' velocity accelerates every 60 seconds up to 4 times. If the wolf touches you, you will be forced to jump(wolf is not part of remake). There is a high score system.

Looks like you are only sleeping for 10ms every frame. In a case for example, on a faster computer, one frame may take 1ms or less while on a slower computer, it may take 3ms. One solution is implementing a fixed rate game loop. Basically, you make it sleep for same amount of time every frame by using calculation of how long a frame took. If the frame finishes earlier than the time you specified, you put it to sleep for the difference. There are plenty of resources on this community.

This tv show talks about the creators who share their works over internet such as music, graphic, game, crafts, or any original works. They do the recording on a broadcasting website and airs on tv several days later. There was nothing superior in my game except that I believe I was the second person at the moment to submit a game. People usually submit drawings.

@ReBirthIt's really a simple game. It's in Japanese, so it might be hard to understand. Basically, you catch the acorns that fall from above within 30 sec. If you touch the fairy, you get stuck for a bit. You only use up, right, and left arrow keys to control. The character and the idea in the game come from this tv show, so it might not make sense to people who don't know this show. http://bit.ly/OGs5au It's the game at the top. You can click on the title to download.

The very first game I released was a tetris clone. I was reading this java game programming framework book and encountered a tetris-like game sample. It quite lacks some things from tetris, but the program implements the basic idea. This book demonstrates samples using the framework the author wrote. I loved his sprite class and I altered it to suit my needs. Since then, I have been using this sprite in my games. It helped me to build my basic game framework package. I decided to use this tetris-like sample as reference when I need and make a complete tetris with basic functionality.

Anyways, aside from tetris drops, I implemented hard drop, next block view, and some simple animation. I was satisfied at the moment, but I would never want to look at that code anymore lol Also, I did not write this game with 100% of my own strength. Like I said above, I used the sample from book as a reference.

Up to now, I have created 4 original games excluding this tetris clone. After my tetris clone, I participated in a game programming competition between my friends who do broadcasting. It was between about 4 or 5 of us. We took about a couple months to come up with our own games written in java. After 2 months, we held a week to take votes and comments from the visitors on the broadcasting. This was an amazing experience. Receiving votes and comments was incredibly awesome and fun. It made me happy and motivated to learn more.

I am confident I learned some valuable lessons and improved my skill. Visiting this forum and asking questions also helped me a lot as part of it. Throughout the process, I have built my own rule for coding a game. With lots of pain, I learned how planning is important. It's logical, but you do have to know and identify what you are making. It is sometimes hard to determine the separating line between what you think you can do and not. In those cases, I recommend trying to implement it on a sample if possible. Another lesson is, "don't plan a game you can't make". It will give you stomachache if you don't have the capacity Though I do believe you will learn something from it. Just slowly and surely make a progress.

There is a recent simple game I made within 5 days. I had intended to submit this to a tv show from Japan that introduces creators in this internet culture. They are very friendly and always introduce pictures and works from viewers. The problem was that I only had about 6 days til next episode when I had decided to make this game. So I took 3 days to plan the game and program structure with only the implementations I was confident with(no totally new things). I spent 2 days to write the game without sleeping on the second night. I barely made it on time. The progress went smoother than ever because I knew what I was making and how to make it.

So they did introduce my game on the show and so amazing that it surpassed my expectation far away. 2 people from the guest on the tv show played my game and these 2 people are pretty famous and well known. I received some compliments and comments through twitter. This experience was just awesome like one of my best experiences. Lacks of some user friendliness such as colors hard to differentiate and not explaining the rule enough were pointed out, but I definitely agreed on that. I spent another 3 weeks to update this game integrating high score system and fixing/changing things around to make it better.

Sorry for the long post. What I want to say is that, you should have fun with game programming!

Edited:I'm starting to have a concern that this is an issue from sqlite version and the way I open the file in php. I want to try something before I bother anyone else.

2nd Edit:

After sproingie pointed out my sqlite version is old, I created a sqlite3 file allocated with same data using SQLite Administrator. The results would return the way I wanted correctly (different from the old db). I replaced my old file with that and tested. The php code would not open it. I found out that the problem was the class I was using to manipulate the sqlite file. I used the PDO and it worked perfectly.

sproingie,

Thanks a lot for your help and time. I'm really sorry that after all the hassle, it turned out that the mistake was my php code.

Just a quick question. If I put a link to the db file itself, would that work? I downloaded the command line shell. I tried your advise and searched around, but sadly, I can't get to access to my db for lack of my understanding.

There is one thing I'm struggling with. If I insert a new high score with new name, it gets on the top.

My issue is that the player with same name scoring the same score as the highest after second time does not put his position up. For example...

I insert a highest score with name "A" which gets on top.Then I insert a higher score with name "B" which appear on top.If I insert a score same as "B" with name "A", it does not go on top.However, if I insert a same score with name "C", it gets on top.

I have got the basic operations working with SQLite. Though I'm not done, yet. I placed the db file outside web root.

I thought about just storing the top 20 records to keep the operation time as fast as possible. Every time a record is added when there are 20 records, it would update the lowest score possessing the oldest date. The newer and higher score would be on top. Problem is eventually the score board gets full with same high scores. I never thought of daily/weekly/monthly thing. I think it would be a good idea to implement on mine, too.

I'm calling the php file from Java app on client side. The php script connects to SQLite. I was worried that if someone finds that path to the database file, they can write their own script to connect it. (though I don't know how they can find out the folder hierarchy)

So a replay on server side solution can be cheated if someone copy/paste the decompiled source code and make the game easier(obfuscated code gets tough though possible to cheat). It would also break through checksum. (if I'm not misunderstood)

Isn't SQLite too vulnerable because it doesn't have password? If someone finds out the url to the database file, he can access it from anywhere. I understand that the point we have been discussing is that hackers will find their way if they want to.

How can checksum be implemented in this case? Can you give a brief explanation or direct me to a link?

Scrambling would be for example, when sending the player name/score from java, the order of string is shifted by pattern and when receiving from script, shift them back?

That's right. I should know the score limit one can get, so I can set that if statement in my script.

I have some questions for the script.

I was going to do queries to check whether the score is to be saved or not. For example, I need to find and delete the lowest score to add a new higher score if the score board is full. (assuming I'm only keeping the top 15) I could do sort query to keep the scores sorted at the DB level every time I insert a new score. Else, I could do the sorting/determining score insertion after fetching into array. The latter would do more on php code to keep the SQL statements to minimum. Since reading/writing at the same will lock the table, I think doing less queries is important even though we might be talking about milliseconds.

Anyone determined to send fake score data can do so, and there's really nothing you can do about it other than move all your game logic server-side. Even then someone could automate the game with a bot, though that's a harder problem, most people won't bother with it, and you should take it as a good sign of popularity if they do.

That's true. Well, I will be monitoring the table anyways. I will manually delete fake record if I see any suspicious.

The only possible issue I found would be the concurrency. It says that the database locks reading/writing when one is in process. Though it says the lock would last for a few dozen milliseconds at most usually. I guess I shouldn't consider this as an issue for this case since there won't be that many people.

All I need is fetch, insert, and delete of a record. So I think I should consider SQLite as my solution, now.

But I do want to add some kind of protection in the code at least protecting from modifying the score board by just passing scores through url.

At first, I thought of .txt file as an option, but I will exclude that. First of all, it's not how score system is supposed to be done. It will also teach me some lessons.

I will go with php/MySQL solution.

I'm trying to come up with a way to prevent people just accessing the url and submitting fake scores. If someone decompiles my code, they will find out the url. Even if I set up a constant password in Java to send to php script, they can see that although it's better than nothing. The sum check would also be found in the decompiled code. ProGuard will help me make it slightly harder, but I think it's still not enough. It might be enough for this game, but I want to learn how to raise security level (again, I understand it's impossible to make it impossible).

I have searched around to get inputs, but not successful, yet. A replay of game events is not an option for me. Aside from complexity, I think it will consume execution time.

I've been trying to figure out a way to implement an online high score system for my game in Java. I have tried JDBC, but I found out that my shared hosting server does not allow MySQL connections from JDBC.

My high score system only needs to insert and show 10 scores and names.

First of all, I understand that I can only make hackers struggle, but not 100% protect it. (Though chances are not so high that someone would want to hack into a small game)So, now I'm here considering other options...

1. Executing php script from Java to connect MySQL. Aside from protecting against MySQL injection, I am going to use ProGuard to make effort protecting against decompiles and set temporary password for insertion.

2. Just writing on a .txt file. My concern is security. If this choice works, how would I increase the level of security?

I have been trying to understand how I can do a collision detection with circle and rectangles including rotated ones. After searching on the web, I came to an idea about using lines to represent a rectangle. If any of the lines intersect the circle, there is a collision.

The picture below is an example. Red points represent the closest point from the center of circle and the line. The blue line is the distance from closest point to center of circle. I need to compare the radius and this distance to determine the collision. I'm struggling to find out that closest point.

I was firing bullets at specific time for a danmaku. Using sum of delta time, I was only able to identify the hook at x.x seconds. (I'm sure there are ways to make it work, but I think it gets complicated.) With frame counts, I can specify for example, fire this one at 5th frame, every 2 frames, or etc.

Very interesting.

Now it makes more sense to omit delta time for my game.

I was wondering when would it be a case to use variable frame rate? I read that 3D games, networking games, and even busy 2D 60+ FPS games are examples of this case.

I'm trying to decide whether I should use delta time or not(ex: x += vx).

What I don't like about delta time is that it makes it difficult to control the enemy and bullets' movements by triggering. If I don't use delta time and go with x = vx, the screen will pause if it lags, but that should be about it, right? Wouldn't enemy objects pass through player if delta time takes long?

Right, going by counting frames throws me off on slower computers especially with lots of movements.

I'm trying to understand variable frame rate and fixed frame rate. My understanding so far is that fixed frame rate does not use delta time to calculate next position or anything else in the game. If you specify 60 fps, if needed, it sleeps to make it 60 fps. Variable frame rate uses delta time which updates whatever is missed at once. Is there more to it? Does it sleep?

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