Whoo hoo first post on the SCI board...|
Well anyway here is my problem, I used ShowCel to draw the view onto the screen(I am not sure if I was supposed use this command though) then I used
The problem is that it leaves a sort of shadow of all the previous cels behind.
Which leads to my question. Am I going about setting up animations on the screen the right way? Should I even be using ShowCel or should I use some other command? And if so what should I be doing to draw the animation on screen?
Aaaargh! I just typed in a whole response, went preview, pressed back, and it was GONE!!! |
Anyways, the jist of it is the following...
If you do a DrawPic then ShowCel, it will be okay.
You can only do so much with using vars for views. To properly make a game, you'd need to build a class system like Sierra did. It's a lot of work, but when done, SCI will be as easy as AGI. With a class system, you could do stuff like the following...
(instance MyView of View
to declare it. and to use it...
Without a class sytem, you can only make demos and very tiny games.
Also, don't forget ++ -- += and -=.
Yeah, I hate it when I press the backspace key on message boards. It drives me nuts.|
Thanks for the help. Looks like I have some work to do with rewriting what I have done with the views. Also how can I set a specific view to be the ego and be controllable by the mouse and the keyboard?
|Brian Provinciano||The SCI engine without a class system is pretty much a virtual machine with graphics, sound and input support. The entire game base including inventory, sprites, control, and all that other stuff needs to be written by the scriptor. You'd need to write a view class, then a subclass of view for ego which reads the keyboard/mouse input and controls the ego. Like I said, it's a lot of work. The good news is that once it's written once, it never needs to be again. You could disassemble Sierra's scripts and recode them for SCI Studio--which would be the best approach. However, until then, you even need to write a handler in your script to look at the control lines in the picture to check if the view can move. Not too much is automatic.|
Boy it looks like it is going to be alot of work. I have somewhat figured out the class things and methods. But am not really sure about what instances are for, I guess I little more studying on them wouldn't hurt.|
I have been able to get the views to work using a class system I set up. But I still have one problem. It leaves the shadow like before. Do I need to erase the cel before I draw it again? Or do I need to do something else?
Whatever happened to that project where you could just link to Sierra's original classes?|
Chris: As I said, if you do a DrawPic, then DrawCel, you won't have the junk left behind.|
Nick: When I open sourced my compiler, Lars updated it, the object file format, and made it support objects created from Sierra's classes. However, I had trouble compiling it under DOS and Windows and was getting runtime errors. It also seemed to create scripts that worked under FreeSCI, but not Sierra SCI. So, the current build of the compiler is based mainly on my old sources from before the modifications.
Lars' updated version is available in the CVS at sourceforge (project scicompiler) if you want to play with it. One main problem was that I make sure to initialize EVERY variable at the start, and free EVERY variable upon exit because SCI Studio may be running the compiler continually if the user compiles more than one script. However, if you are running the command line version, it's safe to not initialize/deinitialize some things because the next time it's run, they'll be at their intial values again. So, anyways, variables not being initialized/deinitialized was one of the problems.
|AGI1122||Thanks that worked. I am going to create a cursor class now that will be for changing the cursor from the normal cursor into the busy cursor and viseversa. I think I am starting to understand SCI a little better now.|