Night Knight

Talk about making games.

Re: Night Knight

Postby happyjustbecause » Tue Mar 27, 2012 6:25 am

Here's an update on what I'm working on, it's slightly fixed since I made this, but it's a satisfactory video.



Enjoy!
For small creatures such as we the vastness is bearable only through love.
-Carl Sagan

Night Knight Development Thread
User avatar
happyjustbecause
 
Posts: 267
Joined: Tue Jul 26, 2011 3:10 pm
Location: Frazier Park, Ca
Score: 15 Give a positive score

Re: Night Knight

Postby Hblade » Tue Mar 27, 2012 2:16 pm

Looks awesome dude! :D
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

Re: Night Knight

Postby phyzix5761 » Tue Mar 27, 2012 9:17 pm

Check the z-depth of the collision box for the control button. You may have to mess with it depending on how you have the mouse button down event triggered.
phyzix5761
 
Posts: 261
Joined: Sun Feb 27, 2011 4:28 am
Score: 18 Give a positive score

Re: Night Knight

Postby happyjustbecause » Wed Mar 28, 2012 2:12 am

phyzix5761 wrote:Check the z-depth of the collision box for the control button. You may have to mess with it depending on how you have the mouse button down event triggered.


I figured out the problem, it was the crosshairs actors getting in the way. I had to disable MouseButtonDown events for it. Now it works fine :D !
For small creatures such as we the vastness is bearable only through love.
-Carl Sagan

Night Knight Development Thread
User avatar
happyjustbecause
 
Posts: 267
Joined: Tue Jul 26, 2011 3:10 pm
Location: Frazier Park, Ca
Score: 15 Give a positive score

Re: Night Knight

Postby happyjustbecause » Sat Mar 31, 2012 5:02 pm

Just wrote the possible "theme song" to Night Knight. It's inspired by the SpiderMan theme song. Hope you like it, and if you think of any revisions or additions, feel free to let me know!



Night Knight Night Knight Night Ni Ni Ni Ni Night Knight Night
Night Knight Night Knight Night Ni Ni Ni Ni Night Knight Night (HIGHER PITCH)
Night Knight Ni Ni Ni Ni Night Knight!

Let us tell you of such a hero,
No way is he a zero,
He protects us all,
From bad,
Prevents us from being sad,
He makes us glad,
Egad!
There goes the Night Knight!

Is he tough?
Of course he is,
Those muscles are enough
To stop a crime
Just in time,
To save the day
Any way
Night Knight Ni Ni Ni Ni Night Knight!

Is he clever?
Oh is he ever,
His brain's more witty,
Than anyone's in the city
Won't be stopped with a plight,
That's not enough to stumble the Knight
That's right, he sure is bright!

Is he kind?
So kind, I'm inclined,
To call him aligned
With the nicest of mankind,
Always gives peace of mind,
Unconfined to fighting crime,
He bears in mind,
All of mankind!
For small creatures such as we the vastness is bearable only through love.
-Carl Sagan

Night Knight Development Thread
User avatar
happyjustbecause
 
Posts: 267
Joined: Tue Jul 26, 2011 3:10 pm
Location: Frazier Park, Ca
Score: 15 Give a positive score

Re: Night Knight

Postby happyjustbecause » Sat Apr 28, 2012 9:48 pm

happyjustbecause wrote:


I made another official video of Documenting of Night Knight. This is now number 5 in the series of videos I've made. I've added a decent amount to the game since I made a video, at least an official video. I did do one more update video before this one, but I didn't embed it to this topic before, I wanted to make a larger video to update the public of my work. The video has 1080p as an option so it would be quite nice to watch in full screen and HD rather than as the small view in the forum, maybe I just enjoy high quality video too much, anyways... So I hope you enjoy the progress I'm making.

:)
For small creatures such as we the vastness is bearable only through love.
-Carl Sagan

Night Knight Development Thread
User avatar
happyjustbecause
 
Posts: 267
Joined: Tue Jul 26, 2011 3:10 pm
Location: Frazier Park, Ca
Score: 15 Give a positive score

Re: Night Knight

Postby NightOfHorror » Sat Apr 28, 2012 11:29 pm

looking good man. Can't wait to see full version. Nice deep story too.
viewtopic.php?f=2&t=12136
"I have not failed. I just found 10,000 ways that wont work." quoted by Thomas Edison.
Over the year, I decided my motto for me is I am knowledgeable, but not practical.
User avatar
NightOfHorror
 
Posts: 1823
Joined: Fri Aug 27, 2010 2:50 am
Location: Cedar Hill, MO, of the USA
Score: 51 Give a positive score

Re: Night Knight

Postby lcl » Sun Apr 29, 2012 8:16 am

Wow! This game just keeps getting better and better! :D
The graphics are very impressive and the menu style that you use is also professional, I like it!
And the color change effect is very nice too.

I could help you with those UFO's not changing their color.
It's simple. When you try to recolor clones you can't just write like:
Code: Select all
UFO.r = 50;

Because that only changes the color of the clone that has the lowest cloneindex.
What you could do is to have a variable that holds the highest cloneindex and then when you want to change the color you'd do a for loop
which goes through all the clones and changes their r, g and b values.
Something like this: (you need to change it in order to make it work in your case)
Code: Select all
int i;
Actor * a; //This is GE's built in pointer for actors, you can search more information about it from documentation or forum
char nameOfClone[256];

for (i = 0; i < highestIndex; i ++)
{
    sprintf(nameOfClone, "UFO.%i", i); //This will set string 'nameOfClone' to contain the clonename of the i numbered clone.
    //EXAMPLE: i = 5 ---> nameOfClone = "UFO.5"

    a = getclone(nameOfClone); //With the string we just made, get the pointer to the clone and store it to 'a'.
    //And now just change the r, g and b values
    a->r = 156;
    a->g = 255;
    a->b = 0;
    //Note that you can't use a.r here, because 'a' is not an actor, it is pointer to actor. That's why you have to use a->r
}

I hope that helps. If you have any questions, don't hesitate to ask. :)
User avatar
lcl
 
Posts: 2339
Joined: Thu Mar 25, 2010 5:55 pm
Location: Finland
Score: 276 Give a positive score

Re: Night Knight

Postby happyjustbecause » Mon Apr 30, 2012 1:48 am

lcl wrote:Wow! This game just keeps getting better and better! :D
The graphics are very impressive and the menu style that you use is also professional, I like it!
And the color change effect is very nice too.

I could help you with those UFO's not changing their color.
It's simple. When you try to recolor clones you can't just write like:
Code: Select all
UFO.r = 50;

Because that only changes the color of the clone that has the lowest cloneindex.
What you could do is to have a variable that holds the highest cloneindex and then when you want to change the color you'd do a for loop
which goes through all the clones and changes their r, g and b values.
Something like this: (you need to change it in order to make it work in your case)
Code: Select all
int i;
Actor * a; //This is GE's built in pointer for actors, you can search more information about it from documentation or forum
char nameOfClone[256];

for (i = 0; i < highestIndex; i ++)
{
    sprintf(nameOfClone, "UFO.%i", i); //This will set string 'nameOfClone' to contain the clonename of the i numbered clone.
    //EXAMPLE: i = 5 ---> nameOfClone = "UFO.5"

    a = getclone(nameOfClone); //With the string we just made, get the pointer to the clone and store it to 'a'.
    //And now just change the r, g and b values
    a->r = 156;
    a->g = 255;
    a->b = 0;
    //Note that you can't use a.r here, because 'a' is not an actor, it is pointer to actor. That's why you have to use a->r
}

I hope that helps. If you have any questions, don't hesitate to ask. :)


That'd be great if you could help me get the color changing fixed. I'm not fully sure how to do this code, I'm already using a variable storing the highest clone index for my UFO, and it seems like I could use that in here, but I'm not sure how. It's called "highest_UFO". I've barely gotten into strings and this, so bare with me if I'm a little unaware on how this works. Also, I'm already using int i, but could I use it as well, because they both loop through cloneindexes? (the one I'm already using is used for my pause menu) Or should I just change i to something else?

Also I'm a little confused on what:

Code: Select all
Actor * a;


does, or what to do to it to make it work for me. It's a pointer, but why can't I use the actor's name?

Is:

Code: Select all
char nameOfClone[256]


supposed to be replaced with the actor's name, and the highest clone index? Like:

Code: Select all
char UFO[50]


or something?

Thanks for offering to help, and sorry if your now regretting offering to help after seeing my confusion! But we'll figure it out soon enough, hopefully :D .

And a side note, I fixed the BlueMoon power's sound effect and the bomb's sound effect is working much better.
For small creatures such as we the vastness is bearable only through love.
-Carl Sagan

Night Knight Development Thread
User avatar
happyjustbecause
 
Posts: 267
Joined: Tue Jul 26, 2011 3:10 pm
Location: Frazier Park, Ca
Score: 15 Give a positive score

Re: Night Knight

Postby skydereign » Mon Apr 30, 2012 2:14 am

The code you are using for the pause system is very similar to the code lcl is suggesting. You know how you are creating temp strings to hold the name of each clone? That is used with the getclone function (instead of SendActivationEvent) to store a pointer to the actual actor (allowing you to change its rgb values). Same general idea, you just use it slightly differently.
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: Night Knight

Postby happyjustbecause » Mon Apr 30, 2012 4:07 am

Image

Here's my attempt at the correct code, there's an error on line 3, a "redecleration of UFO parameter." What does that exactly mean :?: ?
For small creatures such as we the vastness is bearable only through love.
-Carl Sagan

Night Knight Development Thread
User avatar
happyjustbecause
 
Posts: 267
Joined: Tue Jul 26, 2011 3:10 pm
Location: Frazier Park, Ca
Score: 15 Give a positive score

Re: Night Knight

Postby skydereign » Mon Apr 30, 2012 4:22 am

It means the name for that variable is already used. You can't name a variable the same as an actor. So, change it to UFO_cname, or something else. Also change the UFO on line 7 to match the new var name.
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: Night Knight

Postby happyjustbecause » Mon Apr 30, 2012 4:45 am

When I attempt to test the green down in the game, the game goes back to the editing menu (leaves game, doesn't crash program) this pops up:

Green_Down -> MouseButtonDown (Left), line 8 : READ attempted beyond allowed access area


What does this mean? And how can I fix it?
For small creatures such as we the vastness is bearable only through love.
-Carl Sagan

Night Knight Development Thread
User avatar
happyjustbecause
 
Posts: 267
Joined: Tue Jul 26, 2011 3:10 pm
Location: Frazier Park, Ca
Score: 15 Give a positive score

Re: Night Knight

Postby lcl » Mon Apr 30, 2012 9:11 am

[quote=happyjustbecause]Thanks for offering to help, and sorry if your now regretting offering to help after seeing my confusion! But we'll figure it out soon enough, hopefully[/quote]
No no, there's no way I'd be regretting of offering my help with this. :)

The error you are getting is because you're trying to have access to actor pointer 'a' before setting it to anything. If you look at your code and the code I suggested to you, you will notice that you have skipped the use of 'getclone()'. So the only thing you need to do is to place the getclone() call above the lines that are setting the a's colors. Remember that 'a' is the pointer to clone and this pointer, thanks to the for loop and sprintf() has all the different clones pointed to when the for loop has reached its end.

So, something like that:
Code: Select all
a = getclone(UFO_cname);

Replace the UFO_cname with the string you have used.

[quote=happyjustbecause]Also I'm a little confused on what:
Code: Select all
Actor * a;

does, or what to do to it to make it work for me. It's a pointer, but why can't I use the actor's name?[/quote]
It is a pointer to actor. You set it to point to some actor and then you can change the variables of the actor it points to by using it instead of the actor name.
You don't actually need this with single actors, but with clones it's required because GE doesn't understand this:
Code: Select all
myActor.2.r = 30;

I wish that helped you :)
If you still don't understand 'Actor *' pointers, you can search from forum or the GE's documentation.
If you still have questions, just ask and I'll help you :D
User avatar
lcl
 
Posts: 2339
Joined: Thu Mar 25, 2010 5:55 pm
Location: Finland
Score: 276 Give a positive score

Re: Night Knight

Postby happyjustbecause » Mon Apr 30, 2012 11:22 pm

Oh... I forgot an essential piece of code! I just tried out the code, and I have it working perfectly now! And now I know the format to follow if I want to change any other actors that have clones. Thanks a lot for the help, both you and "Sky" =D.
For small creatures such as we the vastness is bearable only through love.
-Carl Sagan

Night Knight Development Thread
User avatar
happyjustbecause
 
Posts: 267
Joined: Tue Jul 26, 2011 3:10 pm
Location: Frazier Park, Ca
Score: 15 Give a positive score

PreviousNext

Return to Game Development

Who is online

Users browsing this forum: No registered users and 1 guest