Notes on my game programming workflow

1. I create the basic game loop
that displays a titled screen

2. I create the basic classes


3. I define the functions for each clas
trying to use the same name in multiple classes
if I can such as „update“ „animate“, etc.
(because I think that kind of thing comes in handy)
##object images###

4. I create a basic image for a temp class object that has images
using variations of this

width = 40
height = 60
self.image = pygame.Surface([width, height])

5. I set a basic rect for each temp class object
and assign a position for it.

5b. set the updating for each temp class object
so the image remains on each game loop ???

###image initializations###
6. level initialization

####Temp Level initializations
1. in init function init object lists for non player objects
3. create lists with for loops and rand locations
4. add all lists with „.draw“ in draw function
5. update lists „.update“ in update function*not important yet
6. in main before loop instatiate level

level = Level(player) #don’t think „player“ is needed yet

7. In game loop before flip „level.draw“
##(((movement first, then updating becomes needed)))####

7. player initialization

1. in main before loop instatiate player

player = Player()

###initialize temp player locations
player.rect.x = 340
player.rect.y = SCREEN_HEIGHT – player.rect.height

2. in game loop blit starting location

screen.blit(player.image, (340, 500))

8. create add the level shift_world function to
increase the rect.y of all the object so that
they fall off screen away from the player’s ship.

when I do movement I will be able to have acceleration
and reverse affect these

and enemies should be able to ajust for these but not
affect them

9. create „levels“ which will be just sectors and each will initialize
enemies, obstacles, and items for it’s location.
(the „location“ actually doesn’t increase, just that the level
objects increase in rect y until they are off the screen)

10. create a sector list to hold all sectors
create a world_shift var to hold amount world is shifted
if >= 1000 go to next sector of sector list

(although I think each sector should be initialized to start somewhere above
the screen)

In main

###level instantiations/initializations
sector_list = []
temp_sector_1 = sector_1(player)
temp_sector_2 = sector_1(player)

#set current sector
current_sector_no = 0
current_sector = sector_list[current_sector_no]

In loop


if level.world_shift >= 1000:
level.world_shift = 0
current_sector_no += 1
current_sector = sector_list[current_sector_no]

screen.blit(player.image, (340, 500))

Then I add an offest to all sector objects rect.y +1000 so they
are initialized well about the screen
and I change the world_shift conditional to >= 1500

I can clone sectors now to add more to the level and
set and end sector where world shift stops being called and you
just have to collide with the wormhole.
####in no particular order

Now though the drawing has to happen in the sector class instead of the
level class.

obstacles wont have too much to them yet
and I know how to make a basic player
so I’ll focus on all the different types of enemies
…or maybe just 3 to start.

I’m starting to think a scrolling map isn’t a good idea
if this is to big and done fast. I need something more
modular and that I can work on in a more routined way so
I don’t want to have to do so much playing around with
level design at this point.

So I want to make this game instead a series of rooms (although in space,
still rooms) I guess like decent or something iunno)
So I can kind of batch work on all the rooms at once, instead of having
to working on one super long room, and one super big map.
For the enemies a player movement, I have an idea that will also allow
me to do things in a batch like fashion. I will make it so there is one big „ship“
class that holds all possible movement patterns of all ships in the game. Then each
enemy will have one or a few of those and the player ship will be able to gain the
ability to learn those movement patters.

8. movement

I will use the „animation“ function on each class save the „item“ class
and start with basic side to side movement.
9. weapons (need to make a bullet class and maybe have weapons as options
in def shoot)

10. collisions and boundaries (physics engine?)

11. actual map outlines

12. gamestates

13. appearances

14. enemy variation

15. camera (world shift,
for enemies I want to set their location on a map and then
have the world shift and as enemies enter into screen area
they are initialized and attack/move/etc.
I might end up doing collisions last
and movement second to last…

Kommentar verfassen

Trage deine Daten unten ein oder klicke ein Icon um dich einzuloggen:

Du kommentierst mit Deinem Abmelden /  Ändern )

Google Foto

Du kommentierst mit Deinem Google-Konto. Abmelden /  Ändern )


Du kommentierst mit Deinem Twitter-Konto. Abmelden /  Ändern )


Du kommentierst mit Deinem Facebook-Konto. Abmelden /  Ändern )

Verbinde mit %s