Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit/AppGameKit Studio Showcase / Moondog's Mini-Projects Journal

Author
Message
JLMoondog
Moderator
15
Years of Service
User Offline
Joined: 18th Jan 2009
Location: Paradox
Posted: 2nd Sep 2012 17:33 Edited at: 2nd Sep 2012 17:34
For a while now I've kept a game design journal always on me, just a small notebook that when I get a fantastic idea I can take it out and doodle away. Over time I've accumulated a large amount of designs, mostly mini-games but some grander adventures have surfaced. Since I have a hard time getting my ideas into code(I'm more a graphics guy you would say), I thought keeping an only journal would help me realize these ideas while keeping me organized(another thing I don't excel in...).

I've finally got my hands on the full version of AppGameKit and have spent the last 12 hours learning the ropes. My past ideas with AppGameKit have been overly ambitious and it's been sometime since I've actually programmed or finished a decent project. Kuuhaku Kyuushuu anyone? So to get back into the game I'm starting from my simplistic idea and working my way back up. In a attempt to re-learn what programming knowledge I've lost and to start building my game ideas and hopefully port them.

Day 1: Two source files!?
Today has been an epic journey filled with cursing and desk smacking as I figure out the basics of just getting my code to work! For my first project I'm building a game based off a sport a friend and I invented back in my marching band days called blood tennis. Basically you have two players, one on each end of a tennis court and you hit a tennis ball back and forth like regular tennis. Only difference? You can only use your hands. As the name suggests, it got painful. Eventually we got the bright idea of wearing gloves! The sport became a hit with the band and eventually there were regular games with dozens of players.

So my first project is something similar, you control a paddle and hit a ball around an arena. The more times you hit it the more points you rack up. If the ball gets past your paddle then game-over..sound familiar(well your crazy then)?

So day one consisted of me getting a basic arena setup, a ball bouncing around with physics and to develop an idea I had to create a 3D ball with true reflections. After some fiddling here is the result:


Day two goals; get a paddle into the arena with mouse control(touchscreen in mind). Get rid of the bottom collision and setup a reset option.

Thanks guys, happy coding.

I meant to post this yesterday but I sort of fell asleep at the keyboard...so to speak.

erebusman
13
Years of Service
User Offline
Joined: 23rd Jul 2011
Location: Sacramento, CA
Posted: 2nd Sep 2012 18:53
Looks good Josh!

I'm a little confused when you say a "3d ball with true reflections" being that AppGameKit is only 2d at the moment?

Or do you have access to the upcoming 3d stuff they are working on?


If it is 2D i might suggest using a transparent/translucent PNG for the 'glass' part of that puck; it would help show the yellow lines when it travels over them and give an illusion of 3d better.

Otherwise looks fantastic good job!
JLMoondog
Moderator
15
Years of Service
User Offline
Joined: 18th Jan 2009
Location: Paradox
Posted: 2nd Sep 2012 21:06
Quote: "I'm a little confused when you say a "3d ball with true reflections" being that AppGameKit is only 2d at the moment?"

Since it's a top-down view you wouldn't actually see the ground on the sphere from that angle. Right now it's a bit confusing to look at because of the shadows. I'm still playing around with the effect. It currently only reflects the sides and ceiling, it is a fake reflect but I'm adding several layers to get it as 'realistic' as possible.

Next step is to add shadow casting and shade the sphere. I know I'm sort of working backwards but that's how I roll.

3d point in space
15
Years of Service
User Offline
Joined: 30th Jun 2009
Location: Idaho
Posted: 2nd Sep 2012 21:13
That look great with the layers looks like you have 3 different layers for the rotating object one transparent, shadow layer and the sprite layer for this visual effect.

Developer of Space Chips, pianobasic, zipzapzoom, and vet pinball apps. Developed the tiled map engine seen on the showcase. Veteran for the military.
MrValentine
AGK Backer
13
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 2nd Sep 2012 21:21
Nice... taggataggatagga

looking forward to day 2!

JLMoondog
Moderator
15
Years of Service
User Offline
Joined: 18th Jan 2009
Location: Paradox
Posted: 9th Sep 2012 03:03 Edited at: 9th Sep 2012 03:09
Day 2: Should have started with %..

Back with day 2. After messing around with the code for a few hours I decided to throw the whole thing out. I've rewritten the code using the percentage system, which after getting my brain to think in % is really easy to program for. The screen was switched to vertical mode, with ipad resolution in mind. I've also added a paddle that's controlled through either mouse or touchscreen. Ball still has some odd physics to work out, but I'm getting there. Graphics are just thrown in, I'll be updating the look later as I've had a crazy idea!


I also have a strange question which I hope someone can answer. I'm trying to set this up for 2 players with touchscreen. Right now I do a check to see if the pointerstate = 1 and where the pointer state is located. I then move the paddle to the pointer's position but lock the x movement. In theory, if I only check the bottom half of the screen for the 1st player, and the top half for the second player, will I be able to have two player inputs at the same time?

Digital Awakening
AGK Developer
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 9th Sep 2012 09:55
Nice so far

The big shadow from the ball makes it look like it is floating high up while the paddle have no shadow. You could make the shadow move close and away as well as change the size of the ball to make it look like it flies in an arc.

To use multitouch you can't use the pointer commands. Instead there are a bunch of GetRawTouch commands at the bottom of the input page. The mouse generates a single touch when the button is pressed so no need for special mouse commands for testing.

JLMoondog
Moderator
15
Years of Service
User Offline
Joined: 18th Jan 2009
Location: Paradox
Posted: 9th Sep 2012 17:53
Quote: "To use multitouch you can't use the pointer commands. Instead there are a bunch of GetRawTouch commands at the bottom of the input page. The mouse generates a single touch when the button is pressed so no need for special mouse commands for testing."

Ah kul, I'll have to take a look at those commands. I'm glad there is a way.

As for the shadow, like I said just throw in graphics.

Cliff Mellangard 3DEGS
Developer
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location: Sweden
Posted: 9th Sep 2012 19:34
Tgc have a code snippet for multi touch in the codebase that works extremely well.
I use it for my control buttons

Android 2.3 Gingerbread , ZTE Skate , 480x800 , 800 mhz cpu , Samsung Galaxy Y , 240x320 , 832 mhz cpu
Android 4.0 Sandwich , Dmtech 3g 9738B , 1024x768 , 9.7 inches , cortex A8 1.2 cpu , 1 gb ram.
JLMoondog
Moderator
15
Years of Service
User Offline
Joined: 18th Jan 2009
Location: Paradox
Posted: 9th Sep 2012 23:00 Edited at: 9th Sep 2012 23:02
Day 3: Physics Smysics
I almost have a complete system finished. After that I can add some actual gameplay elements to spice things up. I ended up writing my own physics so I could have more control over the ball's velocity and direction. The native 2D commands are excellent, but I just couldn't get some things to work right...though I'm still new to the language.


I've also replaced the pad code so I could get multi-touch working. So far looking good. Thanks for the tip Cliff Mellangard 3DEGS.

Login to post a reply

Server time is: 2024-11-23 11:37:18
Your offset time is: 2024-11-23 11:37:18