Show us yer programming projects!

Coders forum. Discuss techniques, swap code snippets, ask for help etc. relating to all forms of software development.
Post Reply
adam
Baaaaaa!
Baaaaaa!
Posts: 4418
Joined: Sat Jun 24, 2006 9:15 pm 0

Re: Show us yer programming projects!

Post by adam »

theres this sinatra he mentions as a rails alternative, has anyone tried that?

http://www.sinatrarb.com/intro.html
User avatar
teamonkey
Sheepie Whore
Sheepie Whore
Posts: 12082
Joined: Thu Jun 13, 2002 1:07 am 0
XBL Gamertag: itsthetaste
PSN: teamonkey_ca
Contact:

Re: Show us yer programming projects!

Post by teamonkey »

I looked at it a couple of months back when I was evaluating web frameworks. It's very barebones. Sure you can develop web apps in it, but it's way too low-level for me. The stuff that it does (routing, passing through a template or caching engine) is fairly trivial, IMO.

Where Rails wins for me is how easy it makes all the boring, complex, time-consuming stuff like admin interfaces, authentication, database abstraction, and stuff like that. You'd be writing all that from scratch in Sinatra.
User avatar
toxibunny
Baaaaaaa!
Baaaaaaa!
Posts: 5906
Joined: Thu Jun 17, 2004 11:59 pm 0
Location: limb clock land

Re: Show us yer programming projects!

Post by toxibunny »

Righto then, this is what months of reading about python and pygame and doing Udacity CS101 has led up to. It's horrendous-looking code, and needs a serious tidy up and a bit of fixing the comments, but it mostly does what I want it to do, so far... I'm having a bit of a break and a think about what direction I want to go in, while I steel myself for the tidying. (I hate tidying).

This is probably the longest program I've came up with ever so far, and it's been simultaneously harder and easier than I thought it'd be. I've been taking it in chunks, with a couple of days of think time between each. chunk 1: make a screen, chunk 2: get the joypad doing something, chunk 3: make a controllable player, chunk 4: make an enemy, chunk 5: make the bullets (big deal, this part - had to use OOP __init__ stuff), chunk 6: make more enemies using the same technique I used to make all those bullets, chunk 7: collision detection....

You'll need a twin-stick joypad plugged in to 'play', and if you don't have any sort of joystick plugged in at all, all you'll get is error messages.

Spoiler: show

Code: Select all

from pygame.locals import *
###########################from BoxEnemy import BoxEnemy,PlayerSprite

screenResolution = (848,480)
WHITE = (255,255,255)
pygame.init()
pygame.joystick.init()
RED = (255,0,0)
GREEN = (0,255,0)




######################THIS USED TO BE THE BOXENEMY MODULE#################
def createimages():
    BoxEnemySize = [10,20]
    BoxEnemyImage = pygame.Surface(BoxEnemySize)
    BoxEnemyImage.fill(GREEN)

    NormalPlayerBulletSize = [5,5]
    NormalPlayerBulletImage = pygame.Surface(NormalPlayerBulletSize)
    #circlepos = (5,5)
    #pygame.draw.circle(NormalPlayerBulletImage,RED,circlepos,5,0)
    NormalPlayerBulletImage.fill(RED)
    return BoxEnemyImage,NormalPlayerBulletImage

enemyimage,bulletimage = createimages()

class BoxEnemy(pygame.sprite.Sprite): #extend pygame's sprite and use its methods for my own

    
    def __init__(self,initialPosition,speed): #methods inside classes always need 'self' - the __whatever__ methods automatically run.
        #the following code makes an image - just a simple box of 'sizex*sizey', filled with 'colour' passed in from the outside
        pygame.sprite.Sprite.__init__(self)
        #self.image = pygame.Surface([sizex,sizey])
        #self.image.fill(colour)
        self.image = enemyimage
        #Make the center the passed-in location
        self.rect = self.image.get_rect()
        self.rect.center = initialPosition
        self.nextMoveTime = 0 #see the movement methods
        self.speed = speed

    def update(self,current_time,(playerx,playery)):
        centrex = self.rect.centerx
        centrey = self.rect.centery
        if self.nextMoveTime < current_time: #first time called, it definitely is. see end of method.
            if self.rect.centerx <= playerx and abs(abs(centrex) - abs(playerx)) > 30:
                self.rect.centerx += self.speed
            if self.rect.centerx >= playerx and abs(abs(centrex) - abs(playerx)) > 30:
                self.rect.centerx -= self.speed
            if self.rect.centery <= playery and abs(abs(centrey) - abs(playery)) > 30:
                self.rect.centery += self.speed
            if self.rect.centery >= playery and abs(abs(centrey) - abs(playery)) > 30:
                self.rect.centery -= self.speed
            self.nextMoveTime = current_time + 10

class PlayerBullet(pygame.sprite.Sprite):
    speed = 1
    
    lifespan = 1.0 #seconds
    def __init__ (self,current_time,player,initialPosition,initialAngle):
        pygame.sprite.Sprite.__init__(self)
        #self.image = pygame.Surface([10,10])
        #self.image.fill(RED)
        self.image = bulletimage
        self.rect = self.image.get_rect()
        self.rect.center = initialPosition
        self.angle = initialAngle
        self.lifetime = 0.0
        self.birth = current_time
        
    def update(self,time,delta_time):
        movex,movey = math.sin(self.angle)*self.speed*delta_time,math.cos(self.angle)*self.speed*delta_time
        self.rect.centerx += movex
        self.rect.centery += movey
    
    def dieIfOld(self,current_time):
        if current_time - self.birth > 750:
            self.kill()
            

        
        
        
        
    
        
    

class PlayerSprite(pygame.sprite.Sprite): #the player. vector movement
    def __init__(self,colour,joypad,initialPosition,initialVelocityVector):
        pygame.sprite.Sprite.__init__(self)
        self.image = pygame.Surface([10,10])
        self.image.fill(colour)
        self.rect = self.image.get_rect()
        self.rect.center = initialPosition
        self.nextMoveTime = 0
        self.shootingAngle = None
        self.isShooting = True
        self.lives = 3
        self.hasPowerup = False
        self.speed = 6 #just to be used in the crappy placeholder 'update'
        self.joypad = joypad
        
    def calcShootingAngle(self,stick,xaxis,yaxis):
        #this is a first attempt at shooting by the player using the joypad.
        #it should input the angle of the joypad axis (in radians)
        #and using trigonometry, calculate the startpos and endpos of a line between the player center position
        #and the results of sin/cos stuff 
        centerx = self.rect.centerx
        centery = self.rect.centery
        angle = getJoypadRadians(stick,xaxis,yaxis)
        if angle:
            return (centerx,centery),(centerx+math.sin(angle)*50,centery+math.cos(angle)*50)
        return None

    def calcMove(self,stick,xaxis,yaxis):
        #this should input the angle of movement (in radians),
        #the joypad object, and the x and y axes of the movement stick,
        #and output 2 values to be added to the x and y in the PlayerSprite update function.
        angle = getJoypadRadians(stick,xaxis,yaxis)
        #length = (math.sqrt(((xaxis*100) ** 2) + ((yaxis*100) ** 2)))/10
        if angle:
            return math.sin(angle)*10,math.cos(angle)*10
        return 0,0

    def update(self,delta_time):
        centerx = self.rect.centerx
        centery = self.rect.centery
        speed = self.speed/float(delta_time)
        xmove,ymove = self.calcMove(self.joypad,0,1)
        #if self.nextMoveTime < current_time:
        self.rect.centerx += xmove * speed
        self.rect.centery += ymove * speed
        self.nextMoveTime += 10
        
############################################################################


#KEYBOARD CONTROLS

def KeyboardForJoypadwasd():
    #returns x,y for wsad, hopefully...
    x=0
    y=0
    key=pygame.key.get_pressed()
    if key[K_a]:
        x=-1
    if key[K_d]:
        x=1
    if key[K_w]:
        y=-1
    if key[K_s]:
        y=1
    #print x,y
    return x,y

def KeyboardForJoypadcurs():
    #returns x,y for cursor keys, hopefully...
    x2=0
    y2=0
    key=pygame.key.get_pressed()
    if key[K_LEFT]:
        x2=-1
    if key[K_RIGHT]:
        x2=1
    if key[K_UP]:
        y2=-1
    if key[K_DOWN]:
        y2=1
    #print x2,y2
    return x2,y2

def initJoypad():
    #tries to initialise a joypad (which may have multiple sticks). returns a joypad object.
    try:
        j = pygame.joystick.Joystick(0) # create a joystick instance
        j.init() # init instance
        print 'Enabled joystick: ' + j.get_name()
        return j
    except pygame.error:
        print ("No joystick found. going to wasd+cursors, hopefully")
        return False

def getJoypadAngle(stick,xaxis,yaxis):
    #returns an integer value between -180 and 180 where 0 is straight DOWN, with a deadzone of 0.25% stick travel. it increases counterclockwise though :/
    if abs(stick.get_axis(xaxis)) >= 0.25 or abs(stick.get_axis(yaxis)) >= 0.25:
        return round(math.atan2(stick.get_axis(xaxis),stick.get_axis(yaxis))*180/math.pi)
    return 0

def getJoypadRadians(stick,xaxis,yaxis):
    if abs(stick.get_axis(xaxis)) >= 0.25 or abs(stick.get_axis(yaxis)) >= 0.25:
        return math.atan2(stick.get_axis(xaxis),stick.get_axis(yaxis))
    return None
    
    
    

def getJoypadXY(stick,xaxis,yaxis):
    #returns separate x and y coordinates between -1 and 1 where 0 is in the middle. deadzone of 25%.
    x,y = 0,0
    basex = stick.get_axis(xaxis)
    basey = stick.get_axis(yaxis)
    if abs(basex) >= 0.25:
        if basex > 0:
            x = round(basex,2)
        if basex <= 0:
            x = -(round(abs(basex),2))
    if abs(basey) >= 0.25:
        if basey > 0:
            y =round(basey,1)
        if basey <= 0:
            y = -(round(abs(basey),1))
    return x,y

def getAxesStringTuple(stick):
    #stupid function giving a 4-tuple of strings of the data coming from the sticks of a 2-sticked joypad.
    ax1,ax2,ax3,ax4 = stick.get_axis(0),stick.get_axis(1),stick.get_axis(2),stick.get_axis(3)
    return (str(ax1),str(ax2),str(ax3),str(ax4))

def printJoypad():
    pass

def displayJoypadInfoandFPS(RenderTarget,pad,x,y,fps):
    XandY1 = "Stick 1 X/Y:"+str(getJoypadXY(pad,0,1))
    XandY2 = "Stick 2 X/Y:"+str(getJoypadXY(pad,3,2))
    Angle1 = "Stick 1 Deg:"+str(getJoypadAngle(pad,0,1))
    Angle2 = "Stick 2 Deg:"+str(getJoypadAngle(pad,3,2))
    Ren1 = font.render(XandY1,True,(255,255,255),(0,0,0))
    Ren2 = font.render(Angle1,True,(255,255,255),(0,0,0))
    Ren3 = font.render(XandY2,True,(255,255,255),(0,0,0))
    Ren4 = font.render(Angle2,True,(255,255,255),(0,0,0))
    Rct1 = Ren1.get_rect()
    Rct2 = Ren2.get_rect()
    Rct3 = Ren3.get_rect()
    Rct4 = Ren4.get_rect()
    Rct1.left,Rct1.top = x,y
    Rct2.left,Rct2.top = x,y+20
    Rct3.left,Rct3.top = x,y+40
    Rct4.left,Rct4.top = x,y+60
    RenderTarget.blit(Ren1,Rct1)
    RenderTarget.blit(Ren2,Rct2)
    RenderTarget.blit(Ren3,Rct3)
    RenderTarget.blit(Ren4,Rct4)
    fpstext = "FPS ="+str(fps)
    ren5 = font.render(fpstext,True,(255,255,255),(0,0,0))
    rct5 = ren5.get_rect()
    rct5.left,rct5.top = x,y+80
    RenderTarget.blit(ren5,rct5)
    
    
    
    

theScreen = pygame.display.set_mode(screenResolution)
j = initJoypad()

pygame.font.init()
font = pygame.font.Font(None, 17)

def joyScreenSizePlot(stick,x,y,screensizex,screensizey):
    ###takes in the stick object, 2 ints representing the x and y axes, and the size of the screen, represented as 2 ints. returns a tuple which displays the stick position using the whole of the screen.
    return (int(((stick.get_axis(x)/2)*screensizex)+(screensizex/2))),(int(((stick.get_axis(y)/2)*screensizey)+(screensizey/2)))
def keyScreenSizePlot(x,y,screensizex,screensizey):
    #return int((x*screensizex/2)+(screensizex/2)),int((y*screensizey/2)+(screensizey/2))
    return (x*screensizex/2)+(screensizex/2),(y*screensizey/2)+(screensizey/2)
elapsed = 0.0


def mainloop():
    pygame.event.pump()
    theScreen.fill((0,0,0))
    #pygame.draw.circle(theScreen,(255,0,0),(400,300),10,0)
    #anglestring1,anglestring2 = str(getJoypadAngle(j,0,1)),str(getJoypadAngle(j,3,2))
    #text = font.render(anglestring1+anglestring2+get_axes_as_string(j),True,(255,255,255),(0,0,0))
    #axes = getAxesString(j)
    ##numbers = str(getJoypadXY(j,0,1))
    ##angles = anglestring1+".."+anglestring2+".."+numbers+".."+axes
    #text = font.render(angles,True,(255,255,255),(0,0,0))
    #r = text.get_rect()
    #r.left = 0
    #r.top = 0
    #theScreen.blit(text, r)
    time = pygame.time.get_ticks()
    clock = pygame.time.Clock()
    delta_time = clock.tick(75)
    
    ######the fps thingy isn't working
    fps = clock.get_fps()
    ##################################

    if len(BoxEnemies) < 25:
        randlocation = (random.randrange(0,848),random.randrange(0,480))
        randspeed = random.randrange(1,3)
        BoxEnemies.add(BoxEnemy(randlocation,randspeed))
        
    

    if j:
        displayJoypadInfoandFPS(theScreen,j,10,10,fps)
        stick1position = joyScreenSizePlot(j,0,1,512,384)
        stick2position = joyScreenSizePlot(j,3,2,512,384)
        pygame.draw.circle(theScreen,(255,0,0),stick2position,10,0)
        pygame.draw.circle(theScreen,WHITE,stick1position,10,0)
    if not j:
        x1,y1 = KeyboardForJoypadwasd()
        x2,y2 = KeyboardForJoypadcurs()
        stick1position = keyScreenSizePlot(x1,y1,512,384)
        stick2position = keyScreenSizePlot(x2,y2,512,384)
        #print stick1position,stick2position
        pygame.draw.circle(theScreen,(255,0,0),stick2position,10,0)
        pygame.draw.circle(theScreen,WHITE,stick1position,10,0)

    pygame.sprite.groupcollide(PlayerBullets,BoxEnemies,True,True)

    for player in Players:
        player.update(delta_time)
        theScreen.blit(player.image,player.rect)



    for enemy in BoxEnemies:
        enemy.update(time,player.rect.center)
        theScreen.blit(enemy.image,enemy.rect)
    
    if player.calcShootingAngle(j,3,2):
        if player.isShooting and len(PlayerBullets) <=50:
            PlayerBullets.add(PlayerBullet(time,player,player.rect.center,getJoypadRadians(j,3,2)))
        startpos,endpos = player.calcShootingAngle(j,3,2)
        pygame.draw.line(theScreen,WHITE,startpos,endpos,2)
    for bullet in PlayerBullets:
        bullet.dieIfOld(time)
        bullet.update(time,delta_time)
        theScreen.blit(bullet.image,bullet.rect)
    pygame.display.flip()

running = 1

BoxEnemies = pygame.sprite.Group()
#for location, speed in [([100,100],2),([200,200],1)]:
#    BoxEnemies.add(BoxEnemy(location,speed))
#print BoxEnemies

Players = pygame.sprite.Group()
for colour,joypad,initialposition,initialvelocityvector in [([255,255,255],j,[200,200],0)]:
    Players.add(PlayerSprite(colour,joypad,initialposition,initialvelocityvector))
PlayerBullets = pygame.sprite.Group()


print Players
                
while running:
    
    event = pygame.event.poll()
    if event.type == pygame.QUIT:
        running = 0
        pygame.quit()
        os.sys.exit()
    mainloop()
        
    
I made a deviantart page.
'....The baron is a gay old rogue with an eye for the ladies....'
User avatar
Barney
Baaaaaa!
Baaaaaa!
Posts: 2131
Joined: Tue Aug 23, 2005 7:59 pm 0
Location: UK, Broughton, Brigg

Re: Show us yer programming projects!

Post by Barney »

Been pratting around doing fun stuff to SpecBAS instead of grunt work :)



This is a couple of commands that take an array of points and spit out transformed and projected 2D points, which can be plotted all in one go :)

This is ace, I love having my own language to mess around with!
"Oh dear lord, I slightly soiled myself. Oxfam won’t be pleased."
User avatar
toxibunny
Baaaaaaa!
Baaaaaaa!
Posts: 5906
Joined: Thu Jun 17, 2004 11:59 pm 0
Location: limb clock land

Re: Show us yer programming projects!

Post by toxibunny »

Fuck! And I'm pleased when I get a bunch of rectangles to follow a square ... 8O


(Edit)... move closer to a square, I mean... getting stuff to *follow* it is a whole other level.
.
I made a deviantart page.
'....The baron is a gay old rogue with an eye for the ladies....'
User avatar
Barney
Baaaaaa!
Baaaaaa!
Posts: 2131
Joined: Tue Aug 23, 2005 7:59 pm 0
Location: UK, Broughton, Brigg

Re: Show us yer programming projects!

Post by Barney »

toxibunny wrote:Fuck! And I'm pleased when I get a bunch of rectangles to follow a square ... 8O


(Edit)... move closer to a square, I mean... getting stuff to *follow* it is a whole other level.
.
I thought it was really quite ace that you could post the code in a spoiler tag :-D That makes software distribution really quite cool, kind of like when they used to play tape-sounds at the end of 80s computer shows that you could record and pipe into your own machine...

To be fair, I've been writing this BASIC interpreter for a couple of years now. It's maturing nicely, but every now and then I get the urge to add commands that are really specific and quite hatstand - and I really wanted a galaxy-like effect after I saw one in an Amiga demo :)
"Oh dear lord, I slightly soiled myself. Oxfam won’t be pleased."
User avatar
toxibunny
Baaaaaaa!
Baaaaaaa!
Posts: 5906
Joined: Thu Jun 17, 2004 11:59 pm 0
Location: limb clock land

Re: Show us yer programming projects!

Post by toxibunny »

Hatstand away, my good man. Hatstand away... well, maybe you're beyond the hatstand, the cloakroom, the mansion, and *everything*, if you can make *that* come out of spectrum BASIC! 8O


...I know it's your own implementation, I've seen various progress reports, etc. over the years... but holy hell, man! very, very impressive... both in the idea, and the accomplishment...


...as for 'putting stuff in the spoiler/code tags'... I know! The year is 2012, Isotonic drinks are already old-fashioned, we've invented flying cars and discovered they're not practical, and nowadays we swap code through spoiler tags 8)

...I was just copying off sdetoni though...
I made a deviantart page.
'....The baron is a gay old rogue with an eye for the ladies....'
User avatar
nyarla
Baaaaaa!
Baaaaaa!
Posts: 2820
Joined: Tue Jan 14, 2003 1:53 pm 0
Location: i said kiss me you're beautiful these are truly the last days
Contact:

Re: Show us yer programming projects!

Post by nyarla »

Not much spare time, slooow going with my 3D game, but I'm pleased with it so far..

First I messed around with having enemies as billboarded sprites, but it looked horrible when viewing an enemy from above or below.. (partially because me not art good, and drawing a 2d sprite as seen from above is hard! partially because it destroyed any feel that the enemy was "in the world", due to perspective.. kinda thing.. viewed from the sides it was cool, but from above it was very obvious that it's a flat rectangle floating above the ground..).

I don't want to have actual proper 3D models, I want sprites. Also, don't want to put in the time to learn how to model. So I went for halfway between the two - 3D "models" made of billboards... (just a single test model so far, spinning shiny balls!).

Image

Doing it this way is going to somewhat dictate the art style.. might be impossible to do certain things.. not sure yet (looks pretty cool though, and coherent in 3D space).. But this is meant to be a JRPG so having abstract representations of enemies in-the-world is cool. When you go up to fight 'em it could switch to BATTLE MODE and have the actual enemy gfx in 2D. Or something.

Finally got around to making it build for iOS and OSX from the same source/Xcode project yesterday, sooo much less hassle \o/ So now it's time to make in-game editing tools so I can easily mess around with these weird fake 3D models and see if it's going to work..

(Also, thinking of using this engine to do 7 DAY FPS CHALLENGE and make some stupid FPS. http://7dfps.org/ anyone else going to have a go?)
User avatar
Orangy Tang
Baaaaa!
Baaaaa!
Posts: 1794
Joined: Sun Apr 25, 2004 5:25 pm 0
Location: My secret lab
Contact:

Re: Show us yer programming projects!

Post by Orangy Tang »

nyarla wrote: Doing it this way is going to somewhat dictate the art style..
Looks good! Also reminds me of Ballz as well. :D
[ Triangular Pixels.net - play Snowman Village, Rescue Squad, NiGHTS 4k and more ] [ Development Journal ]
User avatar
GoatFoam
Baaaaa!
Baaaaa!
Posts: 1255
Joined: Tue Dec 12, 2006 11:05 am 0
Location: Brizzle
Contact:

Re: Show us yer programming projects!

Post by GoatFoam »

I remember reading that id software experimented with occasionally rendering 3D models to sprites when they were developing quake.

i.e. render model, use it until the viewpoint changes too much, re render etc... Apparently it gave a billboarded look and they decided it was crap, but if that's the style you want then it might work.
User avatar
gravy
Sheepie Whore
Sheepie Whore
Posts: 19572
Joined: Wed May 01, 2002 1:28 pm 0
Location: The Other Place

Re: Show us yer programming projects!

Post by gravy »

GoatFoam wrote:I remember reading that id software experimented with occasionally rendering 3D models to sprites when they were developing quake.

i.e. render model, use it until the viewpoint changes too much, re render etc... Apparently it gave a billboarded look and they decided it was crap, but if that's the style you want then it might work.
Yeah we'v done that on a game when I was at Climax, PS2 ATV Fury I think. It can work well. We had a bunch of ATV riders spread around a track so off in the distance we'd render them on a billboard and low rendering frequency. It worked really well. It's an old trick called impostors.

Here's a video of someone using it with world environment:

http://www.youtube.com/watch?v=BbP0MNKGMsE
User avatar
GoatFoam
Baaaaa!
Baaaaa!
Posts: 1255
Joined: Tue Dec 12, 2006 11:05 am 0
Location: Brizzle
Contact:

Re: Show us yer programming projects!

Post by GoatFoam »

Of course. I had just forgotten the word :)
User avatar
nyarla
Baaaaaa!
Baaaaaa!
Posts: 2820
Joined: Tue Jan 14, 2003 1:53 pm 0
Location: i said kiss me you're beautiful these are truly the last days
Contact:

Re: Show us yer programming projects!

Post by nyarla »

oh i'm not doing anything anywhere near as fancy as impostors :) just "models" made of a bunch of billboards positioned in 3d space. it's all impostor, all the time (much like my whole game dev career \o/)

yeah that BALLZ is exactly the idea. though i'm also not doing anything as fancy as that animation. and things aren't going to all be made of balls... these shiny balls are just a test! (this technique is going to look really weird doing anything with image components which aren't symmetrical.... so i'll probably just end up using it to make abstract whirly things...)

(the reason normal plain old every day billboard sprites aren't good enough is that you can walk on the walls and ceiling in this game - that's why you can see a creature from above or below as well as front/back/left/right)
User avatar
venusian
Baaaaaaa!
Baaaaaaa!
Posts: 6653
Joined: Wed Nov 06, 2002 2:22 pm 0
Location: South Gloucestershire

Re: Show us yer programming projects!

Post by venusian »

If your billboard scheme is going to force you into using geometric patterns, why not go the whole hog and programatically generate geometric 3D objects?
User avatar
nyarla
Baaaaaa!
Baaaaaa!
Posts: 2820
Joined: Tue Jan 14, 2003 1:53 pm 0
Location: i said kiss me you're beautiful these are truly the last days
Contact:

Re: Show us yer programming projects!

Post by nyarla »

oh i tried that first (only quickly and very simply though) but didn't like what i came up with.. might try it again later. i'm not unhappy with this billboard model thing btw, sorry if i gave that impression. i really like how it looks.. will still use it for SOMETHING even if i end up coming up with something better...

i don't mean it forces use of geometric patterns - it doesn't.. i meant that, because the billboards are currently always facing and aligned with the camera, if a billboard texture isn't symmetrical-ish, it looks weird when a creature moves onto a wall - the positions of its "body parts" move accordingly, but the orientation of each body part doesn't change. i want to find a way to make use of this to make it look weird in a consistent/pleasing way. (gotta make model editor so i can easily play and see what's possible)

might combine the billboard models with rotation of billboards (when needed, for some kinds of object/creature).. when i first tried single billboard enemies it was before i'd figured out how to do this matrix rotation properly, so it was all higgledy piggledy @_@
Post Reply