Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Discussion / Flip (Full Game / Tutorial for beginners)

Author
Message
Libervurto
14
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 27th Nov 2013 16:14 Edited at: 27th Nov 2013 16:23
Introduction to Game Development
(skip this section if you don't want to hear the lecture)

Making games is hard: that's the first lesson of game development. If you only ever complete one project in your life then be proud of it, because programming is a skilled craft that takes years to learn and can never truly be mastered. Maybe it is harder for onlookers to appreciate the work that goes into creating a game, or any form of software, if while we work there is no hammering of nails or sawing of wood. All we coders appear to be doing is incessantly tapping at a keyboard for hours; the only time we make any real noise is when we're having a bad day. It doesn't look like we're doing much, and if we do our job right, the finished product will seem so intuitive and simple that it belies the complexity hidden within.

So, now that we know how hard it is to make games what hope is there for a beginner? Well, you're going to have to forget about that epic game idea that more than likely got you interested in programming to begin with; okay, you can still talk about it and think about the game mechanics but don't waste any time trying to make it. It will be years, possibly decades, before you are ready to make the type of game you are used to playing, and you wont be making it in Dark Basic.

You probably feel demotivated now but that's only because you don't know the possibilities that remain. Being able to write programs allows you to experiment with ideas and be creative in unique and powerful ways. Even if you only have a low spec PC, your computer is a powerful machine capable of doing amazing things, all you need is the patience and perseverance to learn how to get the most out of it.


Let's Start Making Games!
Where can we start today? As a beginner it can be difficult to find interesting and fun projects to learn from: pong, tic-tac-toe, hangman, these are all very boring but the step up to something like tetris or space invaders is surprisingly steep. However, I have found a collection of games that I believe would make great projects for beginners: Simon Tatham's Portable Puzzle Collection, try them out (you can download them or play in the browser). Some of these games are incredibly simple, others are deceptively difficult to recreate, but all of them are fun to play and mentally challenging and there are a tonne of them!

I have decided to recreate some of these games myself — possibly the whole lot if I get around to it! I don't often complete projects so it's nice to have a solid goal that I know I can achieve, and since they are all relatively simple and I have a fair amount of programming experience I thought it would be a nice idea to bring you along with me.


Game 1: Flip
The first game I will tackle is called Flip. It's probably the simplest of them all, but that's a good place to start. The player is given a grid of tiles that are white on one side and black on the other, each tile can be flipped over but this will also flip the tiles immediately adjacent horizontally and vertically. The objective is to have all white faces up.

I'm going to make this into a proper tutorial but for now I'll just be posting the code I have. The game is finished but I'd like to add some features to it and sort out any bugs that might have crept in.

FULL SOURCE CODE:

I am hopeless at this game, I haven't beaten it once.


Formerly OBese87.
seppgirty
FPSC Developer
11
Years of Service
User Offline
Joined: 3rd Jul 2009
Location: pittsburgh, pa.
Posted: 28th Nov 2013 01:08
looking forward to your tutorial. i hope you get it done.

gamer, lover, filmmaker
HomerS
13
Years of Service
User Offline
Joined: 8th Apr 2007
Location:
Posted: 21st Dec 2013 23:34
Thanks Libervurto!

It makes the programming a little bit clearer for me.

So simple but complex at the same time...

That is why we must do our mathematics homework. LOL

Greetings!

Toedeledoki

Login to post a reply

Server time is: 2020-08-13 18:54:18
Your offset time is: 2020-08-13 18:54:18