Path: chuka.playstation.co.uk!news From: Alex Herbert Newsgroups: scee.yaroze.freetalk.english Subject: Re: coding help Date: Fri, 24 Jul 1998 15:14:26 +0000 Organization: PlayStation Net Yaroze (SCEE) Lines: 73 Message-ID: <35B896C2.E91E784F@ndirect.co.uk> References: <01bdb66c$5c6fdcc0$9a3363c3@default> Reply-To: aherbert@ndirect.co.uk NNTP-Posting-Host: dialin2-21.ndirect.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 4.04 [en] (Win95; I) T Khan wrote: > Hi, > > Can anyone help me? I don't now anything about c programing or graphics. I > need some serious help. Is there any help on the website which I can > download or something. If you don't know anything about C or graphics, then you've got a lot to learn. The Yaroze kit is intended for people who have at least a grounding in C and some knowledge of graphics. Maybe the Yaroze is a little adventurous for you. But if you're serious, and stop wanting to play "backups" then we'll help you as much as we can. You tell us what you can't do, but you don't tell us what you can. Can you program at all? If so, what language(s)? If you can program, then we should be able to put things in some kind of perspective which you'd understand. > Also I am working on car model movement, and I need to know how to make the > model > gradually gain speed (accelerate) and slow down. I use the MoveImage > command. The basic way to create movement in 2D is as follows: You have your objects coordinates x and y, yes? Each frame, you should add a velocity_x and velocity_y to x and y respectively. This will get the object moving at a fixed speed. Remember, adding a negative velocity will move the object in the opposite direction. OK, now if you add acceleration_x, and acceleration_y to your velocities in the same way, the effect of acceleration is achieved. The acceleration variable should be modified as appropriate for the movement type. BTW, MoveImage() is not the best function to use for game objects. GsSortSprite() is better. > And how would you straighten the car (after a bend) once it has been > leaning? I use the 'Rotate' command to make it lean but it just seems to > carry on leaning more and more. Which Rotate command is this? To rotate your object you should have an angle variable, and a single acceleration variable. From these you can obtain an acceleration_x and y by using sin() and cos(). (How are you with trig?). By adding and subtracting to the angle, you'll rotate the acceleration. The angle can also be used to show the correct orientation of the object with GsSortSprite(). All this will provide a frictionless world, which is not right for a driving game. Simple friction can be acheived by accelerating the velocities towards 0. > How do you put sound in a game, e.g music, sound effects to the car? By usng the sound and music functions within the library. You'll need some data, (such as a MIDI file) and probably some WAVs if you don't want to use the included GM sound data. Convert this data using the tools provided, and implement using the sound functions as described in the manuals. > The manuals hardly explain this stuff. The manuals explain everything. It can be hard to find what you want, but everything is there. (The only exception I can think of is dynamic TMD creation/modification, for which info can be found on this site.) However, they won't teach you to program C. They assume you already can! > Are there any downloadable tool wich make programming easier? C is your tool. If you want something simpler, then the Yaroze is not for you. You could view other peoples code to be tools for making programming easier, but you still need to be able to program C to understand. As I say, we'll help you, but we need to know how much you know and understand already. Herbs