Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 My RPG Cant Get Some Things Right!
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Gackt




PostPosted: Wed Dec 19, 2007 9:11 pm   Post subject: My RPG Cant Get Some Things Right!

Hi, I'm working on this one RPG game, I need some help on the character selection so when i Choose the character, He corrisponds to the game play, I know i used IF statements because i haven't learned anything else so dont say i didnt do it right. And also, could you help me on like when the character is moving he doesnt dissapear or anything? Also, how would i fix the sign erasing? If states like if SignPoleX <= (the variable) then blah blah blah or something? Sorry for asking so much :p

Thank You Muchly Smile


By The Way, I know its not that good yet, but Im only grade 10 and i don't know all that fancy code stuff.



A Warriors Journey.zip
 Description:
A Zip File Of My Program.

Download
 Filename:  A Warriors Journey.zip
 Filesize:  326.68 KB
 Downloaded:  95 Time(s)

Sponsor
Sponsor
Sponsor
sponsor
agnivohneb




PostPosted: Wed Dec 19, 2007 10:46 pm   Post subject: Re: My RPG Cant Get Some Things Right!

Before I start I want to say good job for a first try. Smile

Now Mad

You may want to look at where you put "exit" in the first loop.
Have a look at this example
Turing:
% This is how you have it
loop
    /* YOUR STUFF */
    exit
end loop


%This is how it should look
loop
    /* YOUR STUFF */
    exit when /* CRITERIA (similar to IF) */
end if

% OR
loop
    if /* CRITERIA */ then
        /* YOUR STUFF */
        exit
    end if
end loop
This will help you have the time to select a character.

As for the sign diapering you have it set when you get to the top of the screen change it to green (blending with the grass).

Another thing I noticed almost instant is the flicker. You have way, way, way to many "View.Update"s you also need to put in a View.Set("offscreenonly") for the "View.Update" to work. and a clear screen directly after the "View.Update".

Get rid of the "Pic.Free"s also, and don't keep using the "Pic.FileNew" every time you move the person. you only need to define it once per file and you don't need to free it.

I am sure others can add more to this but I have to get off my computer now.\

BTW: you can never ask so much. It just takes a little while longer to get back to you is all Laughing
Gackt




PostPosted: Thu Dec 20, 2007 9:19 am   Post subject: Re: My RPG Cant Get Some Things Right!

Kay, Thanks, I dont really know what to do with the View.Updates so i just put them in random spots and hope they work :p

Thanks for all your help.
Jestar




PostPosted: Thu Dec 20, 2007 9:23 am   Post subject: Re: My RPG Cant Get Some Things Right!

View.Updates get rid of any flickering or flashing after a cls
Gackt




PostPosted: Thu Dec 20, 2007 9:48 am   Post subject: Re: My RPG Cant Get Some Things Right!

Jestar @ 20th December, 9:23 am wrote:
View.Updates get rid of any flickering or flashing after a cls


Oh, i meant, I dont know where to put them, I know what they do :p
Gackt




PostPosted: Thu Dec 20, 2007 10:51 am   Post subject: Re: My RPG Cant Get Some Things Right!

Here's An Updated Version Of It. I just Fixed The Flickering and Stuff, But any idea's how i would Import Sephiroth? I delcared variables for them and when i copied Cloud's controls and pasted them as Sephiroths it said something like Undeclared variable, If you could show me how to fix it i would be very please Very Happy


A Warriors Journey.zip
 Description:

Download
 Filename:  A Warriors Journey.zip
 Filesize:  292.55 KB
 Downloaded:  82 Time(s)

Degensquared




PostPosted: Thu Dec 20, 2007 11:39 am   Post subject: RE:My RPG Cant Get Some Things Right!

Pretty much, you need to put View.Update every time that you want the screen to show something (when you are using offscreenonly)

Essentially, instead of showing a picture and a black screen, it shows a picture and then a different picture, with no break inbetween.
agnivohneb




PostPosted: Thu Dec 20, 2007 5:24 pm   Post subject: Re: My RPG Cant Get Some Things Right!

Hi, me again. Smile

WOW. Shocked

You have a lot going on in this program. You have somethings called when you don't need to and you are missing things as well. consider my last post when I said you need the View.Set("offscreenonly"), you still don't have it. the View.Updates are not doing a thing now. and position of the View.Update is key, place it at the very bottom of the loop (not the if). Get rid of the Pic.FileNew ("MANERASE.bmp") inside the loop. you will just get an error after a while of moving. Why do you want him to disappear?...

In short you should...
*debug it yourself (Turing comes with a debugger to slow things down)
*get a friend to debug (they must tell you why it will not work)
*clean your code (lots of things you don't need)
*rearrange your code (somethings don't work because they are in the wrong spot)
*re-submit to compsci.ca (you need to shorten the work for us)

There is a lot of work that needs to be done with this program. Its almost as if you want us to create your program for you with the amount of work that needs to get done, but we can't do that. Sad
Sponsor
Sponsor
Sponsor
sponsor
Gackt




PostPosted: Thu Dec 20, 2007 5:34 pm   Post subject: RE:My RPG Cant Get Some Things Right!

Oh Alright Man, I'll work on that, I'll eventually figure it out Smile Im working on getting rid of stuff that doesnt need to be there. Oh wow, I tottaly forgot when your using Array char of Boolean you don't half to erase him like when your using Getch and Hasch.

Thanks for your help!
Gackt




PostPosted: Sat Dec 22, 2007 9:55 pm   Post subject: Re: My RPG Cant Get Some Things Right!

Well, Here's An Update, Not Much, But, Its An Update.

Note. I haven't Debugged it yet.



A Warriors Journey.zip
 Description:

Download
 Filename:  A Warriors Journey.zip
 Filesize:  211.41 KB
 Downloaded:  80 Time(s)

Sean




PostPosted: Sun Dec 23, 2007 11:06 am   Post subject: Re: My RPG Cant Get Some Things Right!

code:

loop
%Your stuff
View.Update
cls
end loop


To set boundaries so he wont go off screen, make it so that his parameters can't go farther then a selected distance.

One script I know of, but not sure if you used a square.

code:


var player_x, player_y, player_x2, player_y2 : int
var key : array char of boolean

player_x := 10
player_y := 15
player_x2:= 100
player_y2 := 50

View.Set ("offscreenonly")

loop

Draw.FillBox (player_x,player_y,player_x2, player_y2,black)

Input.KeyDown (key)

if key (KEY_RIGHT_ARROW) and player_x2 < 620 then
player_x += 1
player_x2 += 1
end if

%etc...

View.Update
cls
end loop
Hackmaster




PostPosted: Mon Dec 24, 2007 3:40 pm   Post subject: Re: My RPG Cant Get Some Things Right!

good first shot at it. I know I have tried endlessly to make various RPGs, and let me tell you, they are very challenging. ESPECIALLY in grade 10, after probably only a semester of coding. so, good effort.

now, I'm going to give you some advice, not about specific code, but about practices. this post isn't going to be helpful to you if you hate programming and just want to get this thing over with. it doesn't sound like that though. so this ought to be good for you. Wink


you probably haven't learned about procedures yet. however, you should read up on them. I know Cervantes has written some good ones... the search bar is all you need... they ought to be in the tutorial forum. procedures would make your code a lot more efficient. it would also make it easier to read, and it would make it do a lot of things that you don't care about, like take up less space in memory and in general, execute cleaner. check them out.

once you've gotten your head wrapped around procedures, there is something else you need to wrap your head around. objects and classes. these things rarely come into play until grade 12 coding, but they would make your dilemma of have two different characters disappear. they would make your code... well, probably longer in this case, but once you get this program a bit bigger, you would love to have them. seriously. and funny enough, Cervantes comes to the rescue again, and he wrote (!)3 tutorials on the subject. those tutorials really helped me get into the swing of things with this stuff.

I'm currently working on an RPG of my own, in Java... I'm actually just starting, and I'm using the two things that I talked about earlier. they make your program easier for other people to understand, and in general, they make it work better.


those two programming practices are great, and if you like programming, you should try to learn them. don't worry if they don't come right away. they are HUGE concepts. it might take a while.


sigh... this takes me back to the days when I wrote a turing RPG... I only took it to a demo version.... and in fact, I don't think I ever posted it... wow. maybe I should. it was about 1500 lines, all told. it had about 16 different files associated with them. those were all class files. the main program, now that I look back, really sucks Embarassed ... it's not nice to look at at all. sigh.


anyhow.. good luck! I wish you the best of success... and check out Cervantes' tutorials... they rock.
Gackt




PostPosted: Mon Dec 24, 2007 7:28 pm   Post subject: RE:My RPG Cant Get Some Things Right!

I Shall Check On Procedures Right Away, I have 4 weeks to finish my program and if i work on a little bit daily i should have it done. Thank you very much! You were a big help.
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 13 Posts ]
Jump to:   


Style:  
Search: