Source Code
-
- DCEmu Veteran
- Posts: 4306
- https://www.artistsworkshop.eu/meble-kuchenne-na-wymiar-warszawa-gdzie-zamowic/
- Joined: Sat Nov 30, 2002 7:01 pm
- Location: San Jose
- Has thanked: 0
- Been thanked: 0
- Contact:
- JMD
- Insane DCEmu
- Posts: 234
- Joined: Wed Dec 11, 2002 6:45 am
- Location: A Melody From a Past Life Keeps Pulling Me Back
- Has thanked: 0
- Been thanked: 0
- Contact:
More seriously, I thing that the easiest game to make for beginers should :
- A 2D graphics game used with SDL
- Have statics levels (no scroll)
- Simple player controls (just directions for exemple)
- Just 1 player
- Have simple graphics (not a lot of bitmaps to create)
- No enemies or simples move ones with poor AI
In fact, a game like Sokoban should be perfect. A Pacman should be fun too (may be harder).
- A 2D graphics game used with SDL
- Have statics levels (no scroll)
- Simple player controls (just directions for exemple)
- Just 1 player
- Have simple graphics (not a lot of bitmaps to create)
- No enemies or simples move ones with poor AI
In fact, a game like Sokoban should be perfect. A Pacman should be fun too (may be harder).
-
- DC Developer
- Posts: 9951
- Joined: Sun Dec 30, 2001 9:02 am
- Has thanked: 0
- Been thanked: 1 time
This is basically how Pong works:
Code: Select all
Reset ball position and direction, bat positions and scores
Main loop:
Get controller 1's state. Move left bat up/down.
Get controller 2's state. Move right bat up/down.
Move ball.
If the ball hits a bat, reverse it's horizontal direction.
If ball hits top or bottom, reverse it's vertical direction.
If ball hits left or right, reset the ball and add to the other player's score.
Draw a box for the ball, and two rectangles for the bats