Challenge of the Month - January+February 2016
Click here to participate:
These challenges are intended for people who are learning to program for the first time or for those returning to programming who want to start using Small Basic. Some will be easy, some will be hard - but they will all make you think, and more importantly be GREAT FUN!
Please post your solutions / partial solutions / questions / feedback etc. into this thread that will remain 'sticky' for the month. The only rule is that your solution must use standard Small Basic methods (no extensions).
It would be good if people could post their problems with these challenges so that a discussion can start so that everyone can learn from each other. Post here!
We may extend these challenges over into a second month if solutions and questions are still coming in.
Also post feedback on the kind of challenges that you want to see more of in the future.
Basic Challenges
Write prgrams to:
- Count down from 10 seconds, displaying the time counting down
- Modify the countdown timer to play a sound with increasing pitch frequency as the timer reaches zero
- Add a visual display of some kind to show the countdown, perhaps an egg timer or decreasing bar or something fun
- Read an option from the user to select a GraphicsWindow background colour from a list.
- Consider the best way to make it easy for the user to change the colour, maybe by keys, mouse or buttons
- Move an 'X' in the TextWindow
- Load a GraphicsWindow layout of some shapes from a file, so the shapes can then be read and drawn as specified by the file. You will need to define the format for the data stored in the file, try to make it so that you can edit the file in notepad to define the layout as easily as possible
Graphics Challenges
Write prgrams to:
- Move an image smoothly with the arrow keys
- Move an image or shape with the mouse, try to make a 'click and drag' feature
- Add a feature to rotate a selected shape with the right mouse button down
- Finally you can check if the Shift or Control key is down to zoom or fade the shape
- Draw a dynamic picture of a moving river. Hint: try using a Timer or 'game loop' to move, rotate, zoom or change opacity of some wave type objects to give a flowing effect.
- Try making some other dynamic visual effects like fire, fog etc.
Physics Challenge
- Write a program to calculate and draw a ball that bounces with gravity and gradually slows with each bounce.
Game Challenges
- Write a simple slalom skiing game.
- Write a card 'snap' game where random cards played in turn by each player. When 2 cards with the same face value are shown the player first to press their key wins the cards. The player that wins all the cards is the winner of the game. The cards can be images like below or ordinary palying cards.
Community Suggestion (By Zock77)
- Write a pathmapping program. If you want to do a hard one, you might try to use the A-star algorithm, or for something a little easier, the Breadth-first algorithm.
Community Suggestion (By Nonki)
- Make a calendar program with holidays 2016 in your country.
Do you have an idea for a future challenge? Please post it here!
Thanks for participating! The more you learn, the more you're helping others to learn too!
Small and Basically yours,
- Ninja Ed & LitDev