JoshIdeas is proud to work side by side with Hyun. He’s an amazing animator. Check out his YouTube channel and this cool live wallpaper. You just got Hyun rolled by Hyun’s official live wallpaper! Enjoy the excitement of one of Hyun’s dancing stick figures right inside your android phone! Now it’s party time, any time! [...]
Download Glow Hockey Multiplayer game. This game is an air hockey look alike game that allows two wifi enabled Android devices to connect and battle it out. Share your tablet or phone screen and play two player on the same device. Also, single player has been added. Share a large tablet screen to enjoy multiplayer [...]
Our first Android game! A very special thank you to everyone that helped make this happen. Somewhat Possible Game will challenge you every tap on the screen. Obstacle course platform game based on frustrating you until you complete or endure each level. Each level offers a unique take on how to jump over simple shapes. [...]
Today I discovered an awesome performance boost for my games. I actually made one of my games run really slow trying to figure out how to make it appear or look better. AndEngine was putting weird lines around certain sprites. Seemed to occur most often with transparency enabled pngs.
I left them like this thinking it was actually helping… The weird lines around the sprites did occur less, so I figured this was the only fix. At least for now…
Since I implemented this fix into the AndEngine source I no longer need that ugly setBlendFunction(); and now the game is running really smooth. And the colors are more brilliant.
I thought it would be really cool to have a live wallpaper that had Street Fighter like effects and fighting scenes so I started working on a Pivot Fighter Live Wallpaper that hopefully will be just that. This idea originally started from a game called Pivot Fighter that’s for the Android game platform. I’ve been working on, more off then on, this Android game for about a year now. The code base for Pivot Fighter (Android Game) is about 16,000 lines of code! 16,000! I thought it would be easy to take the code or ideas from Pivot Fighter and turn it into a live wallpaper. So far it has been pretty easy and I get to reuse this AI for the Pivot Fighter Android game. Pretty cool
The Pivot Fighter live wallpaper has almost 3,000 lines of code so far and will have more, lots more.
How am I designing this AI?
So far the code I have that acts as AI is merely random selection. This will be replaced with “assessment” logic or situational awareness. It has two main parts. One, a parent decision and Two, a sub decision control system. This is a really good start to a basic control system. This allows me to build the entire movement and fighting selection prior to implementing the situational logic that will do the “thinking” for each character.
The basic feel of the code is run two threads. Each thread is in responsible for one individual character. The logic is simple from there. Simply choose a randomly generated number between 1 and whatever and then execute. It will continue to execute that randomly chosen number until that number has expired. This works really well since we can tell the system to never break out of the loop until a certain goal has been reached. We can also add in code that checks the situation or the opponents movements. This aids it telling the AI character that he’s in danger should choose a more appropriate decision that will aid in his protection
It’s like this:
boolean mIsParentDecisionRunning = false;
int decision = 0;
int previousDecision = -1;
int decisionMin = 1;
int decisionMax = 3;
// sub decision maker
boolean mIsSubDecisionRunning = false;
int subDecision = 0;
int previousSubDecision = 0;
int subDecisionMin = 0;
int subDecisionMax = 0;
public void loadAI()
{
mScene.registerUpdateHandler(new IUpdateHandler()
{
@Override
public void onUpdate(float pSecondsElapsed)
{
if(mIsParentDecisionRunning == false)
{
decision = decisionMin + (int)(Math.random() * ((decisionMax - decisionMin) + 1));
if(previousDecision != decision)
{
previousDecision = decision;
mIsParentDecisionRunning = true;
}
}
if(mIsParentDecisionRunning == true)
{
switch(decision)
{
case DECISION_PARENT_MOVE:
UserDataType userDataType = (UserDataType)mBodyFighter.getUserData();
if(userDataType.mCanMove == true)
{
if(mIsSubDecisionRunning == false)
{
subDecision = subDecisionMin + (int)(Math.random() * ((subDecisionMax - subDecisionMin) + 1));
if(previousSubDecision != subDecision)
{
previousSubDecision = subDecision;
mIsSubDecisionRunning = true;
}
}
if(mIsSubDecisionRunning == true)
{
switch(subDecision)
{
case DECISION_SUB_MOVE_TOWARDSOPPONENT:
break;
case DECISION_SUB_MOVE_AWAYFROMOPPONENT:
break;
case DECISION_SUB_MOVE_JUMP:
break;
case DECISION_SUB_MOVE_JUMPTOWARDSOPPONENT:
break;
case DECISION_SUB_MOVE_JUMPAWAYFROMOPPONENT:
break;
case DECISION_SUB_MOVE_CROUCH:
break;
default:
break;
} // ~~~~~~~~~~~~~~~~~~~~~ END SUBDECISION MOVE SWITCH
}
}
break; // ==================== END DECISION PARENT MOVE
}
}
}
@Override
public void reset() {}
});
}
JoshIdeas is proud to work side by side with Hyun. He’s an amazing animator. Check out his YouTube channel and this cool live wallpaper.
You just got Hyun rolled by Hyun’s official live wallpaper! Enjoy the excitement of one of Hyun’s dancing stick figures right inside your android phone! Now it’s party time, any time!
You just got Hyun rolled by the Hyun’s official live wallpaper!
The Hyun-rolled stick figure has made numerous secret cameo appearances in Hyun’s stick figure animations that can be seen on the flyingpanda1990 youtube channel.
Hello, my name is Noah Wood and I produce the music and Art for the Android games my Uncle and I design. On Youtube I go by the channel name of GamingMonstas and my Artist name is Agama.
I am a big gamer and a beginner at Fl Studio. I have been drawing almost my entire life and it is one of my biggest hobbies. When I got into producing music I started out with other programs such as Mixcraft and Dubstep Studio.
I was trying to figure out how to use the onScroll() feature within AndEngine. OnScroll() is really cool since it allows you to touch the scene and move the camera around. But now I needed the same feature to apply to a Live Wallpaper. The issue I found was that onScroll() requires the TouchEvent.ACTION_MOVE to function. So I had to find a way to turn on all important touch events within a Live Wallpaper.
The onScroll() method only works for dedicated Surface Views or Surface Views that aren’t Live Wallpapers. Live Wallpapers use an entirely different set of classes to create and manager a Surface View, hence you can’t use the normal convention when using touch events. I found out that when using a Live Wallpaper you cannot use onManagedTouchEvent() method that comes from the AndEngine class since it doesn’t have anywhere to attach to.
A Live Wallpaper uses a different Engine then what you’re use to when developing a game or app. This class isn’t related to the AndEngine Engine. It’s Google’s Engine for the Live Wallpaper service that controls the displaying and functionality of the Live Wallpaper. To activate touch events within this new Engine, you must override the Live Wallpaper service onTouch() method. As I did below..
download the Live Wallpaper source code from AndEngine, here. Make sure you can get the project working in Eclipse or any other IDE and able to see it working on your phone/emulator.
BaseLiveWallpaperService.java ::
Add within BaseLiveWallpaperServer -> BaseWallpaperGLEngine
private float mLastX;
private float mLastY;
private boolean mTriggered;
private static final float TRIGGER_SCROLL_MINIMUM_DISTANCE_DEFAULT = 1;
@Override
public void onTouchEvent (MotionEvent event)
{
super.onTouchEvent(event);
final float touchX = event.getX();
final float touchY = event.getY();
switch(event.getAction()) {
case MotionEvent.ACTION_DOWN:
this.mLastX = touchX;
this.mLastY = touchY;
this.mTriggered = false;
return;
case MotionEvent.ACTION_MOVE:
case MotionEvent.ACTION_UP:
case MotionEvent.ACTION_CANCEL:
final float distanceX = touchX - this.mLastX;
final float distanceY = touchY - this.mLastY;
final float triggerScrollMinimumDistance = TRIGGER_SCROLL_MINIMUM_DISTANCE_DEFAULT;
if(this.mTriggered || Math.abs(distanceX) > triggerScrollMinimumDistance || Math.abs(distanceY) > triggerScrollMinimumDistance)
{
if(mScrollDetectorListener != null)
mScrollDetectorListener.onScroll(event, distanceX, distanceY);
this.mLastX = touchX;
this.mLastY = touchY;
this.mTriggered = true;
}
return;
default:
return;
}
}
Add to BaseLiveWallpaperService.java
public IScrollDetectorListener mScrollDetectorListener;
public static interface IScrollDetectorListener {
// ===========================================================
// Constants
// ===========================================================
// ===========================================================
// Methods
// ===========================================================
public void onScroll(final MotionEvent pEvent, final float pDistanceX, final float pDistanceY);
}
Most programmers should be able to figure out what needs to be done here. So I won’t post very much detail. Keep in mind that this code is straight from the onTouch event within AndEngine but modified to fit into the Live Wallpaper construct. Since we now have turned on the ability to get all touch events we can add code that controls the scrolling when you move your finger around the Live Wallpaper.
Download Glow Hockey Multiplayer game. This game is an air hockey look alike game that allows two wifi enabled Android devices to connect and battle it out. Share your tablet or phone screen and play two player on the same device. Also, single player has been added. Share a large tablet screen to enjoy multiplayer glow hockey. Challenge yourself against a human opponent, invite your friends!
FEATURES:
+ No ads
+ Single Player AI (first draft)
+ Multiplayer (wifi and same device only)
+ Colorful glow graphics
+ Clean sound effects (Paid version)
+ Smooth and responsive game play
+ Realistic physics
+ Vibrate when touch (if device supports it) (Paid version)
+ Looks great on tablet or small phone devices
+ Extensive game play options (Paid version)
+ Multitouch (Is your phone not multitouch? Let me know)
Glow Hockey has amazing options that control friction, bounce effects on walls, paddle, and puck. Turn up the sensitivity to watch how crazy the game can get!
Check out the demo video:
Change log:
1.9 (December 13th, 2011):
*Major performance updates!
*Fixed an issue with lines showing up
1.8 (November 11th, 2011):
*Someone kindly reported an issue when attempting to purchase the “Full Version”. This is the first attempt to fix that issue.
1.7 (October 21st, 2011):
*I’m hoping this fixes the crash some people are having once and for all
1.6 (October 19th, 2011):
*Some phones are crashing due to operating system differences. This is first attempt to fix this issue.
1.5 (October 19th, 2011):
*Fixed null pointer issue with dialog. Has this fixed the dialog crash issue?
1.4 (October 18th, 2011):
*Second attempt to fix dialog crash issue.
*Added first draft of single player AI
*Added Full Version button (buy the game) Don’t forget to support this game. Thank you
1.3 (October 16th, 2011):
*User reported crash when trying to start dialog. This is the first attempt to fix the issue
1.2 (October 14th, 2011):
*Built in multiplayer on same device
*Bug fixed when loading options screen
*Started on single player AI but not yet deployed
Our first Android game! A very special thank you to everyone that helped make this happen.
Somewhat Possible Game will challenge you every tap on the screen. Obstacle course platform game based on frustrating you until you complete or endure each level.
Available on Android Market
Each level offers a unique take on how to jump over simple shapes. Careful not to jump to soon or to late as blocks are placed strategically. Sensors are also placed throughout levels will will either change direction, increase speed, or rotate the screen.
Some of the things you’ll encounter inside The Somewhat Possible Game:
Blocks that fall after or prior to you jumping off, rising, falling on touch, rising on touch. Sensors that increase running speed, decrease running speed, change directions, rotate the screen 180 degrees.