There are two Entities in the game and we controlling one of them. The other entity moves in a particular direction throughout the game and I want to make the AI like the enemy shoots at my player after some duration of time. I am using Directx 10 SDK for this.
I think I would need to calculate the distance between the two entities and shoot it towards the player.
I would need to calculate the distance between the two vectors and direction of A towards B.
How to calculate the direction between the two?
I'm working on a small arcade-style Android game for phones and tablets( using Android Studio and Java ) and I'm not 100% satisfied with the touch screen controls. The game has five buttons for control; left and right, and three buttons for firing three different bullet types( essential to the main mechanic of the game itself ).
The irony is that they respond very well even with scaling on different devices and the coding is bullet-proof( zero crashes or bugs since extensive testing ), but as the game is as fast paced as Space Invaders or Columns it kinda falls apart as I switch between pressing buttons in the heat of the action. I am now at the point where I'm having to slow the game down to make it easier to cope with the touch-screen buttons, or adopt a harsh attitude that the player will need an Android-compatible gamepad for the best possible experience...
Quality controls with standard input is something I take very seriously, but in this case I feel action games are not suited for tablets without a gamepad. Would this be a correct assumption or could I do better?
Any thoughts would be most welcome - even if you are just a gamer.
Important: I am trying to realize in scrtach which is performance very low due to it's "virutal level" scrtach->flashplayer->java...
Also i'm new to this forum so i'm sorry if I missed group (like last time)
Like a title is saying: I have project ,and I get negative feedback on it because some people need 30 min to complete it (what is the planned time) but problem is that some people need EVEN 5 hours…(game is incremental/idle/upgrade type so it's important to keep same time ...) ———————————————————————————————————————- Of course people with slower computer will have less fps so game will be slower for them, so I have created TimeDelta system for each frame to calculate something to do per second for example
so that mean it will be moving speed number of pixels(or units) per second so it will be same for almost each user.
But problem is next: I have to change ySpeed by jumpPower (#PlayerJump in my project) when any jump button is pressed then in each frame decrease ySpeed by gravity it is(-10 * TimeDelta) but when someone have lower fps it will have higher TimeDelta and will fall faster but with same jump it turns out to jump significantly lower that changes core of game
BUT even worse if fps suddenly in moment of jump then timeDelta would be 1 so player will jump much much MUCH higher , then fall much slower because timeDelta changed in meanwhile…(and the point of my game is about upgrading jump not complete game in first fps drop)
Then I got an idea to fix TimeDelta (like in unity for rigibody) so it will be rounded like if calculated TimeDelta is 0.01834 it will be 0.02 fixed if weaker computer is using it the TImeDelta will be 0.143 so runded to 0.14 and so on…
I did not manage to realize it… i tried to calculate it before main initialization of game objects but I'm afraid to fps will drop in moment that is calculating so it will be much diffirent… I was trying with empty loop(400)(in scrtach even this is taking time) to calculate it but i'm not sure is it right
So is there good way to realize this fixed TimeDelta
I only have timer function to use and time difference between frames
I would like inform you that "War IOM" v2 have been re-work graphics and added more feature to serve user experience.
Here is my banner screenshot:
You can access to the website and play it directly on your phone (Chrome mobile, Safari iPhone, iPad) or your Laptop
Link to play: https://www.iomgame.com/wariom/
++++ Game description:
The rule to win the game is very simple: buy the soldiers, defeat the enemy army and then destroys the flag. Try to use fireball to wipe out the enemy.
The game had the shop to buy new soldier, upgrade soldier and choose the team out.
Game data be stored on both user's device and server so never lost data again.
++++ Here is the look and feel of War IOM icon on your Home-screen phone
Rumor: You can get double gem receive if you beat the mini boss at level 3. Also win level 3 will give you a lot of Gem, use it to buy new solider and upgrade your army!
My facebook page: https://www.facebook.com/Iomgame-245553622715070/
/******** Change log update 08/26 ********/
-- Add new game play for level 6.
-- Improve camera.
-- Improve game performance.
/******** Change log update 08/31 ********/
-- Improve sound load time. No painful for waiting sound loading any more!
/******** Change log update 19/09 ********/
-- Add level 7 with new game play.
Hi, this is my first finished game ever.
It took my 2 years because Im little bit lazy.
Its simple game where you defend the castle agains random spawned enemies. Lots of flying physics objects included :).
What do you think?
Google play link