Java-Gaming.org Java4K winners: [ by our judges | by the community ]         
Featured games (67)
games approved by the League of Dukes
Games in Showcase (∞)
games submitted by our members



News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  Print  
  Fall And Blocks  (Read 1974 times)
0 Members and 1 Guest are viewing this topic.
Offline asphaltgalaxy

JGO n00b
*

Posts: 29
Medals: 1



« on: 2011-12-30 04:51:03 »

Hello!

Just created my second game, it's a 3billionth Tetris clone: 'Fall And Blocks'. Smiley



Applet is here:
http://asphaltgalaxy.com/test2/fallandblocks.html

Features:
  • Global score
  • 4 sizes of board
  • 3 next shape view modes


Few words about me:

I am new to Java, but not so new to programming (working mostly with Oracle databases/forms/reports). I am reading this forum for several months, and found it very useful. Just do little more searching and your problem is solved Smiley

I got problems with graphics (mean artwork), since I cannot draw. Thanks to modern drawing programs and their tutorials, I can do some very basic art. Smiley

Offline ra4king

JGO Kernel
*****

Posts: 3155
Medals: 196


I'm the King!


« Reply #1 on: 2011-12-30 22:31:19 »

Nice! I loved the effects and the smooth transitions, makes for an overall polished feel. Actually quite amazing for a graphics beginner! Keep up the great work Smiley

Offline ReBirth

JGO Wizard
****

Posts: 1272
Medals: 19



« Reply #2 on: 2011-12-30 23:19:09 »

The applet has earphones on it so it doesn't listen to my keyevent.

hint: I clicked the applet.

Games published by our own members! Go get 'em!
Offline asphaltgalaxy

JGO n00b
*

Posts: 29
Medals: 1



« Reply #3 on: 2011-12-31 02:14:57 »

Nice! I loved the effects and the smooth transitions, makes for an overall polished feel. Actually quite amazing for a graphics beginner! Keep up the great work Smiley

Thank you! Glad you liked it!
Offline asphaltgalaxy

JGO n00b
*

Posts: 29
Medals: 1



« Reply #4 on: 2011-12-31 02:22:32 »

The applet has earphones on it so it doesn't listen to my keyevent.

hint: I clicked the applet.

Hmmm. What OS r u using? I noticed some problems on some (tested on 2 actually Smiley ) Linux distros. On one of them I just refreshed webpage with applet and everything went ok (without additional click on applet).

So, where to start?

Class where listener is looks like:

1  
public class Board extends JPanel implements ActionListener, Runnable {


And the listener itself in this class is:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
        private class TAdapter extends KeyAdapter {
           
        public void keyPressed(KeyEvent e) {

            int key = e.getKeyCode();

            switch (gamestate) {
                case RUNNING: {
                    switch (key) {
                        case KeyEvent.VK_LEFT: {
                            shape.MoveDirection(blockboard, BlockShape.Direction.LEFT);
                            break;
                        }
                        ...


Where could be a problem?
Offline ReBirth

JGO Wizard
****

Posts: 1272
Medals: 19



« Reply #5 on: 2011-12-31 08:19:44 »

Well your code seems fine especially other user could try it (although I usually extends Applet instead container). I use win7 with firefox 9. I have noscript installed but already whitelisted your site. If I have to find the culprit, will blame jre7 or my browser Smiley

Offline asphaltgalaxy

JGO n00b
*

Posts: 29
Medals: 1



« Reply #6 on: 2012-01-02 12:43:41 »

And what about other applets? Is it ok with them on your machine?
Offline Grunnt

Jr. Member
**

Posts: 50
Medals: 3



« Reply #7 on: 2012-01-02 16:54:44 »

It looks good: the artwork is very colorful, and the animations are good-looking too. However, it stuttered a bit on my (admittedly not so recent) laptop. Perhaps it's generating a bit of "garbage"? Dunno, but the stuttering seems to happen like every second.

Offline Mads

JGO Ninja
***

Posts: 674
Medals: 16


Directly directional


« Reply #8 on: 2012-01-02 17:31:59 »

Nice game! I had a little bit of problems wi/ the speed at which blocks drop when pressing down - I'd like it just a little bit faster.
Also, there might be a problem with the timing of this.. Maybe it's just me.

I beat the highscore by one point, by the way.  persecutioncomplex

Offline ReBirth

JGO Wizard
****

Posts: 1272
Medals: 19



« Reply #9 on: 2012-01-03 04:41:07 »

@OP
other applet work fine, all game on java4k, ludum dare and my own. I cleared my browser cache and it works. Weird that it has something to do Cheesy

@Mads
Ienvy for your free time Smiley

Games published by our own members! Go get 'em!
Offline Shazer2

Jr. Member
**

Posts: 66
Medals: 3



« Reply #10 on: 2012-01-03 04:45:33 »

Very well done! I'm impressed. This is inspirational for a beginner like me!

~Shazer2

"When you want to be successful as bad as you want to breathe, then you will be successful." - Eric Thomas
Offline asphaltgalaxy

JGO n00b
*

Posts: 29
Medals: 1



« Reply #11 on: 2012-01-03 11:27:55 »

Thanks all of you! Really appreciate every response! It's so motivating. Smiley

@Mads
Quote
I beat the highscore by one point, by the way.  persecutioncomplex

Hmm... I also noticed hi score with max integer value and your name by side. Smiley How did you do that, what were your steps? I mean is it so easy and natural to insert fake score? Sure, I did nothing to prevent that, but there wasn't form like 'input your name and desired high score', anyway someone should at least know, what page to call. I read some threads here about this topic and all I understood, it is close to impossible to make 100% secure functionality. I really need your opinion.

@Grunnt
Quote
However, it stuttered a bit on my (admittedly not so recent) laptop. Perhaps it's generating a bit of "garbage"?

Tested on Celeron 1.4 single core old notebook with Win XP and there was less than 25% cpu usage and memory usage was like constant. So, how could I check whats wrong?
Offline Grunnt

Jr. Member
**

Posts: 50
Medals: 3



« Reply #12 on: 2012-01-04 05:00:08 »

@Grunnt
Quote
However, it stuttered a bit on my (admittedly not so recent) laptop. Perhaps it's generating a bit of "garbage"?

Tested on Celeron 1.4 single core old notebook with Win XP and there was less than 25% cpu usage and memory usage was like constant. So, how could I check whats wrong?

I guess I was mistaken because I just tried it again and it went pretty smooth. Perhaps something on the background was causing the stuttering. Normally you can check for garbage generation using a profiler such as Oracle's VisualVM (http://docs.oracle.com/javase/6/docs/technotes/guides/visualvm/profiler.html).

Offline ReBirth

JGO Wizard
****

Posts: 1272
Medals: 19



« Reply #13 on: 2012-01-04 08:29:42 »

Hi OP, you said that you took tutorial to draw the graphics. Mind to share any good one?

Offline asphaltgalaxy

JGO n00b
*

Posts: 29
Medals: 1



« Reply #14 on: 2012-01-04 11:54:46 »

Since I used Inkscape for game board background, so sharing here links to some Inkscape tutorials:

http://inkscapetutorials.wordpress.com/suggest-a-tutorial/tutorial-list/
http://2dgameartforprogrammers.blogspot.com/

And exactly that one I used when was creating background for Fall And Blocks: Smiley
http://2dgameartforprogrammers.blogspot.com/2011/10/more-fun-with-gradients.html

Hope it helps!
Offline ReBirth

JGO Wizard
****

Posts: 1272
Medals: 19



« Reply #15 on: 2012-01-05 06:49:17 »

Bookmarked! thanks for the links Smiley I never use Inkscape, hope it'll no hard to pratice them on Paint.NET.

Offline Grunnt

Jr. Member
**

Posts: 50
Medals: 3



« Reply #16 on: 2012-01-05 07:49:45 »

Actually, it's quite easy to combine InkScape and Paint.Net. For example, use InkScape to make a general outline, export it to a bitmap, and do the finishing touch in Paint.Net.

Offline ReBirth

JGO Wizard
****

Posts: 1272
Medals: 19



« Reply #17 on: 2012-01-06 17:42:18 »

I downloaded the inkscape to make life easier Wink

Offline asphaltgalaxy

JGO n00b
*

Posts: 29
Medals: 1



« Reply #18 on: 2012-01-07 04:12:00 »

That's cool! Now, waiting for results Smiley
Pages: [1]
  Print  
 
 
Jump to:  


Add your game by posting it in the showcase section.

The first screenshot will be displayed as a thumbnail.

obsidian_golem 2012-05-23 10:14:50

Danny02 2012-05-21 17:10:34

Danny02 2012-05-21 17:07:10

Danny02 2012-05-21 16:56:12

davedes 2012-05-21 13:59:23

obsidian_golem 2012-05-20 20:28:41

darkjava55 2012-05-12 16:14:40

Ultroman 2012-05-12 09:36:05

Ultroman 2012-05-11 22:49:53

Ultroman 2012-05-11 22:20:01
Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.136 seconds with 20 queries.