Big Problems and no Idea

Non-platform specific questions.

Big Problems and no Idea

Postby sonicforvergame » Tue Feb 26, 2013 12:44 pm

For my new tap tap game i want to use a guitar hero style thing wich is quite complicated to explain so i made this MAP so you undestand
New WinRAR ZIP archive.zip
(196.38 KiB) Downloaded 117 times

The photo is the acutal photage of the game and everything in it was made by be (only the main disc and the sphere)

please Dowload the zip archive and answer to the question !
Kaizoku ni ore wa naru
User avatar
sonicforvergame
 
Posts: 422
Joined: Sat Sep 01, 2012 2:17 pm
Score: 10 Give a positive score

Re: Big Problems and no Idea

Postby skydereign » Tue Feb 26, 2013 7:30 pm

I think it would have been better if you explained it with text. And you could have just uploaded the image, instead of uploading a zip file. Trying to figure out to explain things to people helps you solve problems, simply saying it is too hard means you won't be able to solve it. As for your problem, why would you have to make 1500 events?
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: Big Problems and no Idea

Postby sonicforvergame » Wed Feb 27, 2013 6:07 am

I will try to explain everything

I upload a zip cuz the forum wont let me upload a file bigger than 100 kib (kilobytes)
I have to make 1500 actors because the song you are going to play should have at least 500 actors so it will be fun to play
THE ACTORS ARE SPHERE like the one in guitar hero

AND NOW THE PROBLEM

i want to make a sphere arrive to a DJ table :if the disc collide with the begging of the table you get EXCELLENT
If the disc collide at the center of the table you get Good
If the disc pass trough the table you get bad and -5 second of the original time

ALL OF THOSE HAVE TO BE DONE WITH YOU TAPPING AT THE RIGHT TIME
which i mean that you have to tap(SPACE BAR) when the sphere arrive to the DJ table so you get perfect
But if the disc pass through the table and you didn't tap you get bad

IF the disc is still not on the DJ table and you tap it get destroyed and you lose 5 second of the original time

IS THAT clear enough :?:
Kaizoku ni ore wa naru
User avatar
sonicforvergame
 
Posts: 422
Joined: Sat Sep 01, 2012 2:17 pm
Score: 10 Give a positive score

Re: Big Problems and no Idea

Postby skydereign » Wed Feb 27, 2013 6:56 am

sonicforvergame wrote:I upload a zip cuz the forum wont let me upload a file bigger than 100 kib (kilobytes)

The limit is 2MB. Using caps doesn't make things clearer, it usually makes things harder. And I understood the first time. I just mentioned that explaining it with text can help you figure things out, while saying you can't explain with text, makes it harder.

sonicforvergame wrote:I have to make 1500 actors because the song you are going to play should have at least 500 actors so it will be fun to play

This is where your problem is. This is not true, as that is the worst way to go about this. Even if for some reason you made 500 different actors, in no reason should you have to make at least one event for each of them (there is a thing called inheritance). By the sound of it, you should really just make one actor and clone it (setting different values to represent different notes, or similar).
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: Big Problems and no Idea

Postby MrJolteon » Wed Feb 27, 2013 7:49 am

sonicforvergame wrote:I upload a zip cuz the forum wont let me upload a file bigger than 100 kib (kilobytes)

[img]...
Join us on Discord!
Game Editor 2
These are the best ways to reach me these days


Your local Community Janitor, always lurking in the shadows...
User avatar
MrJolteon
 
Posts: 2326
Joined: Sat Aug 09, 2008 3:25 pm
Location: Stranded under endless sky
Score: 105 Give a positive score

Re: Big Problems and no Idea

Postby sonicforvergame » Wed Feb 27, 2013 5:29 pm

Ugh this is going to be difficult

Okay for skydereing :

I don't want to make DIFFERENT actors i am going to do like you said
MAKE one actor and clone it 499 times
But this is not the problem i don't know how to edit the guitar hero concept (the Third post) in game editor
I mean i don't know how to script or even make event to make the guitar hero concept

FOR MR Jolteon

Don't mind a pic if you can help me by using the information i gave i am sure you won't need a Map or Picture
The information is the topic where i putted the problem i am having (the Third post)
Kaizoku ni ore wa naru
User avatar
sonicforvergame
 
Posts: 422
Joined: Sat Sep 01, 2012 2:17 pm
Score: 10 Give a positive score

Re: Big Problems and no Idea

Postby sonicforvergame » Wed Feb 27, 2013 5:32 pm

skydereign wrote:
sonicforvergame wrote:I upload a zip cuz the forum wont let me upload a file bigger than 100 kib (kilobytes)

The limit is 2MB. Using caps doesn't make things clearer, it usually makes things harder. And I understood the first time. I just mentioned that explaining it with text can help you figure things out, while saying you can't explain with text, makes it harder.

sonicforvergame wrote:I have to make 1500 actors because the song you are going to play should have at least 500 actors so it will be fun to play

This is where your problem is. This is not true, as that is the worst way to go about this. Even if for some reason you made 500 different actors, in no reason should you have to make at least one event for each of them (there is a thing called inheritance). By the sound of it, you should really just make one actor and clone it (setting different values to represent different notes, or similar).


The limite is 100 kib at my place
Dont know why :!:
Kaizoku ni ore wa naru
User avatar
sonicforvergame
 
Posts: 422
Joined: Sat Sep 01, 2012 2:17 pm
Score: 10 Give a positive score

Re: Big Problems and no Idea

Postby skydereign » Wed Feb 27, 2013 7:13 pm

sonicforvergame wrote:I don't want to make DIFFERENT actors i am going to do like you said
MAKE one actor and clone it 499 times
But this is not the problem i don't know how to edit the guitar hero concept (the Third post) in game editor
I mean i don't know how to script or even make event to make the guitar hero concept

Then this should have been your question. The more specific it is, the easier it will be to help. You said you want the space bar to trigger the event. So you have the 500 clones, that way they all receive the same space event (not the optimal method, but easiest to understand). Then you have code like this.
Code: Select all
int dist = abs(x-disk.x-disk.width/2);
if(dist<5) // within 5 pixels of the target
{
    // Excellent
    DestroyActor("Event Actor");
}
else if(dist <10)
{
    // Good
    DestroyActor("Event Actor");
}
else if(dist<20)
{
    // bad
    DestroyActor("Event Actor");
}

Now the exact method of determining distance will be up to you. It sounds like you want to make it when it is before the disk, you get a bad, so you'll have to factor that in. But the important idea here is that I am using ranges. Exact positioning might not be possible given initial positioning, speed, and frame rate, not to mention that is way to hard. You should give them a range of perhaps three to six frames to get an excellent.
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: Big Problems and no Idea

Postby sonicforvergame » Wed Feb 27, 2013 7:48 pm

uhmm verry good
the code itself is quite easy and i undestood it
now for one thing

int dist = abs(x-disk.x-disk.width/2);
if(dist<5) // (within 5 pixels of the target)<-------------------This part is not necessary,right?
{
// Excellent<-------------------------------------------------do i have to do ,like create actor excellent (image show up saying excellent)?
DestroyActor("Event Actor");
}
else if(dist <10)
{
// Good<-----------------------------------------------------Do i have to do ,like create actor good (image show up saying good)?
DestroyActor("Event Actor");
}
else if(dist<20)
{
// bad<------------------------------------------------------Do i have to do ,like create actor bad (image show up saying bad)?
DestroyActor("Event Actor");
}
Kaizoku ni ore wa naru
User avatar
sonicforvergame
 
Posts: 422
Joined: Sat Sep 01, 2012 2:17 pm
Score: 10 Give a positive score

Re: Big Problems and no Idea

Postby skydereign » Wed Feb 27, 2013 7:52 pm

It looks like you are intending to just copy the code structure, which won't really work. It isn't exactly what you want, just the general idea of how to approach the problem. Namely, the x checking in the if statements isn't actually what you told me you wanted, it is close, but it just uses distance to check, not actual position (if you clicked it before or after the disk).
Code: Select all
// this is a comment
// comments do not do anything and are used usually to explain how code works
// they can be removed or changed
/* this is also a comment, though in gE it doesn't change color */

sonicforvergame wrote:// Excellent<-------------------------------------------------do i have to do ,like create actor excellent (image show up saying excellent)?

You have to do whatever it is your game needs to do when the player gets an excellent. For instance create an actor displaying excellent and increase the player's points. In the case of bad, you also wanted to decrease time.
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: Big Problems and no Idea

Postby lcl » Wed Feb 27, 2013 7:55 pm

In GE code (and in C overall) everything that follows '//' is considered as comments, so it's not code. Everything written after them on the line is just commenting that explains how the code works. It's not needed for the code to work.

Example:
x = 5; //This sets the x equal to five.

The equation makes x = 5 and the comment just explains that to anyone reading the code.

...Aww.. skydereign was faster. :)
User avatar
lcl
 
Posts: 2339
Joined: Thu Mar 25, 2010 5:55 pm
Location: Finland
Score: 276 Give a positive score

Re: Big Problems and no Idea

Postby sonicforvergame » Wed Feb 27, 2013 8:12 pm

Code: Select all
Sphere actor : draw actor:script editor : int dist = abs(x-disk.x-disk.width/2);
: button down (space bar): if(dist<5 of disk)
{
score+10
CreatActor("Excellent")
DestroyActor("Event Actor");
}
else if(dist <10)
{
score+5
CreateActor("Good")
DestroyActor("Event Actor");
}
else if(dist<20)
{
score-5
CreateActor("Bad")
DestroyActor("Event Actor");
}


"disk" is the real name because you have the sphere and the DJ disk that is represented by "disk"
Last edited by sonicforvergame on Wed Feb 27, 2013 8:22 pm, edited 6 times in total.
Kaizoku ni ore wa naru
User avatar
sonicforvergame
 
Posts: 422
Joined: Sat Sep 01, 2012 2:17 pm
Score: 10 Give a positive score

Re: Big Problems and no Idea

Postby skydereign » Wed Feb 27, 2013 8:16 pm

I'm going to assume you know that won't work due to errors, and that is meant to be pseudocode. I recommend using the [Code] button to insert your code. It looks a lot cleaner, and therefore is easier to read. The disk was just a reference to whatever actor you wanted to check the distance from. Replace it with the proper actor in your game.
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: Big Problems and no Idea

Postby sonicforvergame » Wed Feb 27, 2013 8:21 pm

Is it better
Look up
Kaizoku ni ore wa naru
User avatar
sonicforvergame
 
Posts: 422
Joined: Sat Sep 01, 2012 2:17 pm
Score: 10 Give a positive score

Re: Big Problems and no Idea

Postby skydereign » Wed Feb 27, 2013 8:25 pm

Actually, that isn't that much better. Look at the first two lines, that is pretty messed up. The code should at least look like it should compile. Now, don't put that in draw. There is no reason to. All that code should go in the keydown space event.
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Next

Return to General

Who is online

Users browsing this forum: No registered users and 1 guest

cron