So, I really like playing this game. It's called Ragdoll Invaders.
What I plan to do is start with a simplified version, and get more complicated from there.
First step: Generate the sprites for it.
Anyone have any suggestions for that?
While I wait for that, I will post how I will do the AI routines.
Their movement is simple enough-every few seconds, pick a new direction to go in. For their attacks, though... For the first one, it's easy enough. Just shoot towards where you currently are. Something like:
Code:
There's the beginning of the AI code.
As for movement:
Code:
I'll have to make some more code, like have a chance that Z can be negative, so it can move in more than 1 direction, and I'll have to put in some screen bounds, so it won't go past the screen edge. Shouldn't be too hard for that.
Thoughts? Questions? Comments?
EDIT:
Code so far:
Code:
What I plan to do is start with a simplified version, and get more complicated from there.
First step: Generate the sprites for it.
Anyone have any suggestions for that?
While I wait for that, I will post how I will do the AI routines.
Their movement is simple enough-every few seconds, pick a new direction to go in. For their attacks, though... For the first one, it's easy enough. Just shoot towards where you currently are. Something like:
Code:
If P>=2 //a timer that determines when to attack
A->X //A and B is your current position, and X and Y are where it's going to shoot.
B->Y
There's the beginning of the AI code.
As for movement:
Code:
randInt(1,3)->Z
L1(1)+Z->Z
L1(2)-Z->Z
I'll have to make some more code, like have a chance that Z can be negative, so it can move in more than 1 direction, and I'll have to put in some screen bounds, so it won't go past the screen edge. Shouldn't be too hard for that.
Thoughts? Questions? Comments?
EDIT:
Code so far:
Code:
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <tice.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <graphx.h>
int a; // makes the integers that will, for now, be the x and y coords for the first sprite
int b;
int screenBoundSprite1;
int screenBoundSprite2;
int screenBoundSprite3;