two questions
Displaying 1-4 of 4 total.
1
Please enter a numerical value for the importance of this sticky.
Enter 0 to unsticky.
ShadowDrak

I tried a really simple program in 2.7 that displays a rectangle. It only displays black though heres the code:

# Startup sequence
from std import *

screen=GetScreenImage()
jumpspeed=100

def Jump():
time=GetTime()
while (GetTime()-time)



Posted on 2001-08-14 13:17:53

ShadowDrak

here's a link to the code
www.geocities.com/ShadowDrak.geo/startup.txt
I had to change it to a txt file because geocities is gay.

also i wanted to ask if there was a direct x driver for the new version of 2.7(because it didn't have one with it) thanks

-ShadowDrak



Posted on 2001-08-14 14:31:40

ShadowDrak

I noticed my mistakes in snytax.

But now I'm having brain fart. I think i've been out of math class too long.
anyway, i'm trying to code an expression in jump() to set a ypos variable to a physics equation(if you want to know which one. the equation is on my previous post) but I can't remember the correct transformation to account for verge being upside down compared to a coordinate plane.
Awe jeezus... I really made that sound complicated. I don't remember how to make it appear(from a graphing standpoint) that (0,0) is at the bottom right of the screen.
do i multiply by negative one then subtract the screeny?
For some reason i can't remember.



Posted on 2001-08-14 19:06:59

andy

First off, gfx_dd7 is depreciated. DirectDraw is a horrible API to use for something like VERGE. I currently have a half-finished OpenGL driver. It's a much better solution than directdraw ever was.

For the other, if you're after a kinematic model, all you have to do is add a constant (gravity) to the y velocity every iteration through your main loop. Then add the y velocity to the y coordinate. :)

If you want pixels away from the bottom of the screen instead of the top, you simply subtract the value from the screen height. newval=screen.height-myval



"Ignorance is its own reward" -- Proverb

Posted on 2001-08-15 09:32:40


Displaying 1-4 of 4 total.
1
 
Newest messages

Ben McGraw's lovingly crafted this website from scratch for years.
It's a lot prettier this go around because of Jon Wofford.
Verge-rpg.com is a member of the lunarnet irc network, and would like to take this opportunity to remind you that regardless how babies taste, it is wrong to eat them.