Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - ruler501

Pages: 1 ... 66 67 [68] 69 70 ... 184
1006
Computer Projects and Ideas / Re: My currently unnamed project
« on: June 27, 2011, 08:34:55 am »
Its more of a platformer. I'll go update the description a little to try and make it clearer.

EDIT:update have most of the unit creator working. It currently puts the data into a text file
test enemy killer file. I added comments to say what each line is
Code: [Select]
/str /Killer /2011-06-27 /enemy /ruler501 /FFBC /end#header with name of enemy date creators name, ID code(random 2 byte integer in hexadecimal)
0#class number
Killer#img folder
95#health(% of 100)
3#jump speed in px/s
50#transparency 0-255
4#walking speed running speed is just 2x this
1#boolean can crouch
5#AI level 1 would be perfect evasion if possible
I should have more up tomorrow. This was whipped together after much thought on how files should be set up. I should have  a rudimentary level editor by Thursday

1007
Humour and Jokes / Re: stupidity taken to the next level
« on: June 26, 2011, 11:53:01 pm »
No, the bottom of the ramp is flat, so the air there stays still for the most part, with the bottom of the ramp just moving over it, while the air has to move up and over on top of the ramp. Though I still don't get how stunt planes can fly upside down, wouldn't a reverse-Bernoulli effect occur, pushing the plane down?
Reminds me of an xkcd comic. I'll try to find it...
the one about the teacher. good, Bad and Worse

1008
Computer Projects and Ideas / Re: My currently unnamed project
« on: June 26, 2011, 11:49:49 pm »
I'd prefer it if the name didn't say 10 level. the 10 levels I'll include will just be demos really. there won't be any limit on the levels a levelpack(I have some interesting Ideas you could do with this

EDIT:If you made the change between levels instantaneous with no transition and make an RPG like game with scenes as levels. You'd have to go in a certain order though and couldn't go backwards between scenes

1009
Computer Projects and Ideas / Re: My currently unnamed project
« on: June 26, 2011, 11:40:33 pm »
2d for now. this is the kind of game I've always wanted so eventually it will be 3d but I only know 2d for now so...

I like the name just I'd like it to be a little catchier...

1010
Computer Projects and Ideas / My currently unnamed project
« on: June 26, 2011, 11:30:05 pm »
This is the project I have been quasi working on for a few weeks. It is to be a nearly completely user made game. what I will be making is the framework and a 10 level level pack to demonstrate what it can do.

This game will have two parts to its release version
The game engine that takes the levelpack files and lets you play the game.

utilities for making your own fully customized levelpacks

The Goals for the game engine part in order of importance:
Do not limit the player and developer too much from possible games
Provide interesting ways to play
Protect from crashes
have easter eggs(this very bottom level)

The Goals For utilities in oder of importance:
Easy interface
allows easy customization of levels, weapons, enemies, obstacles, characters
creates safe levels
almost no limits on what it can make
ability to compile into a not too large level pack

This game will have you be able to create custom weapons, and obstacles. You can assign those weapons to players and enemies. The obstacles can then be utilized in levels. All of these are then compiled into a level pack file. they will all be written in hexadecimal code.
The point of each level will be to move from a predetermined starting point to a 'flag'(you choose the image for this in the level customization. There can be enemies with very simple events set for their appearance(you picking up a nearby weapon, you getting to a certain point, or with a timer). These enemies can have either predetermined weapons or a weapon from a random selection of weapons you said are possible for it to use(the possible weapons are set while customizing the enemy the when/where they pop out and what weapons they have is set in the level file). there can be obstacles with set images/fill color/transparency that you set if htey do damage and/or impede movement if so by what percent. You make players saying what weapons they can use, whether they can double jump, whether they can crouch, with how much speed they jump and how much health they start with out of 100%. YOu put all of these things together into a level, you decide what player is used on that level, what obstacles and where they will be(this will be on  a grid I don't want it to be pixel by pixel), when and where enemies pop out(from that same grid), what the power of gravity is, where the flag and starting points are and images for those places

Now I've told about the game(more information later) what do you guys think the name should be?


Here is like the bare frame of the games code
Code: [Select]
#import neeeded modules
import pygame
import math
import sys
import random
import binhex
from pygame.locals import *

gravity=0

#check to make sure pygame is working
if not pygame.font:
    print 'Warning, fonts disabled'
if not pygame.mixer:
    print 'Warning, sound disabled'

#functions to create our resources
def load_image(name, colorkey=None):
    fullname = os.path.join('data', name)
    try:
        image = pygame.image.load(fullname)
    except pygame.error, message:
        print 'Cannot load image:', fullname
        raise SystemExit, message
    image = image.convert()
    if colorkey is not None:
        if colorkey is -1:
            colorkey = image.get_at((0,0))
        image.set_colorkey(colorkey, RLEACCEL)
    return image, image.get_rect()

def load_sound(name):
    class NoneSound:
        def play(self): pass
    if not pygame.mixer or not pygame.mixer.get_init():
        return NoneSound()
    fullname = os.path.join('data', name)
    try:
        sound = pygame.mixer.Sound(fullname)
    except pygame.error, message:
        print 'Cannot load sound:', fullname
        raise SystemExit, message
    return sound

#functions to get the stats for ingame objects
def getEnemyStats(ID):
    return {}

def getObstacleStats(ID):
    return {}

def getPlayerStats(ID):
    return {}

def getWeaponStats(ID):
    return {}

#function to get all the level data
def getLevel(ID):
    return {}

#function to get the constants for the game
def getConstants(levelpack):
    return {}

#class for enemies
class Enemy(pygame.sprite.Sprite):
   
    def __init__(self, name, ID):
        stats=getEnemyStats(ID)#get this enemies stats
        #define needed variables
        self.name=name
        self.ID=ID
        self.danger=0
        self.jump=0
        self.gravity=0
        self.xvel=0
        self.yvel=0
        self.area.bottom=599
        self.area.right=599
   
    def update(self):
        if not self.danger or self.jump:#check to see if there is a special situation
            if stats[speed]:#see if this is a moving enemy and at what speed it would move
                newpos=self.rect.move((speed,self.gravity))
            else:
                newpos=self.rect.move((0, self.gravity))           
        elif self.danger:#see if the enemy is in danger
            self.evade()
            return 0
        elif self.jump:#see if the enemy is jumping
            newpos=((self.xvel,self.yvel-self.gravity))
        self.rect=newpos#move the enemy to its new position
   
    #implement the force of gravity
    def gravity(self):
        #need a collision detector here
        if self.rect.bottom>=self.area.bottom:
            self.downforce=0
            self.jump=0
            self.change=0
            self.rect.bottom=599
        else:
            self.downforce+=1/constants[gravity]
   
    #evade danger
    def evade():
        return 0

def engine():
    return 1

def playGame(run):
    #start set_up
    while run:

        clock.tick(constant[speed])

        #run game engine
        engine()

        for event in pygame.event.get():
            if event.type == QUIT:
                pygame.quit()
                return
            elif event.type == KEYDOWN and event.key == K_ESCAPE:
                pygame.quit()
                return
            if event.type == MOUSEBUTTONDOWN:
                sets=pygame.mouse.get_pressed()
                if sets[0]==1:
                    pass
            elif event.type == KEYDOWN and event.key == K_LEFT:
                player.left()
            elif event.type == KEYDOWN and event.key == K_RIGHT:
                player.right()
            else:
                player.still()

        allsprites.update()

    #Draw Everything
        screen.blit(background, (0, 0))
        allsprites.draw(screen)
        pygame.display.flip()

def collidedetect(defense,offense):
    if offense.rect.left<defense.rect.right:
        if offense.rect.left>defense.rect.left:
            if offense.rect.top<defense.rect.bottom:
                if offense.rect.top>defense.rect.top:
                    return 1
            elif offense.rect.bottom<defense.rect.bottom:
                if offense.rect.bottom>defense.rect.top:
                    return 1
    elif offense.rect.right>defense.rect.left:
        if offense.rect.right<defense.rect.right:
            if offense.rect.top<defense.rect.bottom:
                if offense.rect.top>defense.rect.top:
                    return 3
            elif offense.rect.bottom<defense.rect.botom:
                if offense.rect.bottom>defense.rect.top:
                    return 3
    elif offense.rect.top<defense.rect.bottom:
        if offense.rect.top>defense.rect.top:
            if offense.rect.left>defense.rect.left:
                if offense.rect.left<defense.rect.right:
                    return 2
            elif offense.rect.right<defense.rect.right:
                if offense.rect.right>defense.rect.left:
                    return 2
    elif offense.rect.bottom<defense.rect.bottom:
        if offense.rect.bottom>defense.rect.top:
            if offense.rect.left>defense.rect.left:
                if offense.rect.left<defense.rect.right:
                    return 0
            elif offense.rect.right<defense.rect.right:
                if offense.rect.right>defense.rect.left:
                    return 0
    else:
        return 5

def main():
    run=1
    playGame()
    return 1

if __name__ == '__main__':
    try:
        levelpack=sys.argv[1]#get the levelpacks name
    except IndexError:
        print "need a valid levelpack file or folder"
        exit(1)
    constants=getConstants(levelpack)#find out the needed constants
    main()
I have lots of work to do

1011
Miscellaneous / Re: What is your avatar?
« on: June 26, 2011, 09:32:25 pm »
I have an Nspire and have never figured out how to send programs to the 84 emulator so I just use TI-BASIC or on comp(this mainly) I love wabbit emu

1012
Humour and Jokes / Re: stupidity taken to the next level
« on: June 26, 2011, 09:29:03 pm »
No, the bottom of the ramp is flat, so the air there stays still for the most part, with the bottom of the ramp just moving over it, while the air has to move up and over on top of the ramp. Though I still don't get how stunt planes can fly upside down, wouldn't a reverse-Bernoulli effect occur, pushing the plane down?
I've never understood this either. COuld someone please explain how planes fly if they can also fly upside down so the wing idea doesn't work

1013
Miscellaneous / Re: What is your avatar?
« on: June 26, 2011, 08:23:08 pm »
I like your avatar ben_g. I made a program liek it just it used 5 predefines sets over and over again just really fast so you couldn't tell
thanks. Mine is really random. It took 1 full lesson to get those random strings of 1's and 0's working.
I tried that just it was in TI-BASIC so it was really slow

1014
Miscellaneous / Re: What is your avatar?
« on: June 26, 2011, 07:14:03 pm »
I like your avatar ben_g. I made a program liek it just it used 5 predefines sets over and over again just really fast so you couldn't tell

1015
Miscellaneous / Re: What is your avatar?
« on: June 26, 2011, 07:03:22 pm »
No I haven't what is it?

1016
Humour and Jokes / Re: stupidity taken to the next level
« on: June 26, 2011, 07:01:40 pm »
I feel horrible I'm actually thinking of ways to make it work

1017
Miscellaneous / Re: What is your avatar?
« on: June 26, 2011, 06:44:00 pm »
Yours isn't too bad its just the ones that choose from everyones... so much confusion till I read names

1018
Humour and Jokes / Re: stupidity taken to the next level
« on: June 26, 2011, 06:41:11 pm »
Poor Bike. The person deserved what he got for stupidity

1019
Miscellaneous / Re: Definitely retiring from coding
« on: June 26, 2011, 06:40:18 pm »
This is horrible I have convinced my parents that programming is good(they don't want me testing stuff on their computers though...) I hope you can convince your parents that programming is good and will help you/them

1020
Miscellaneous / Re: What is your avatar?
« on: June 26, 2011, 06:37:59 pm »
Wow I love how I can't tell who people are by avatar images anymore because there random(ruler goes to privately freak out)

Pages: 1 ... 66 67 [68] 69 70 ... 184