GLBasic forum

Main forum => Tutorials => Topic started by: Kitty Hello on 2008-Feb-12

Title: PeeJay's Game Programming Tutorial
Post by: Kitty Hello on 2008-Feb-12
http://www.glbasic.com/main.php?site=tutorial&lang=en
English so far, only.
Excellent work from PeeJay, who wrote a complete game as a tutorial from scratch.
On his site you can find another tutorial.
http://www.peejays-remakes.co.uk/
Title: PeeJay's Game Programming Tutorial
Post by: bigsofty on 2008-Feb-12
Wow, well done PeeJay! :)
Title: PeeJay's Game Programming Tutorial
Post by: PeeJay on 2008-Feb-12
Ta! As games go, they are pretty simple affairs, but if it helps someone start coding in GL, then it can only be for the good :)
Title: PeeJay's Game Programming Tutorial
Post by: Schranz0r on 2008-Feb-12
;) Nice work!
Title: PeeJay's Game Programming Tutorial
Post by: Achim on 2008-Feb-13
Thumbs up ! Well done :D

CYA !
Title: PeeJay's Game Programming Tutorial
Post by: AndyH on 2008-Feb-13
Nice one Peejay.
Title: PeeJay's Game Programming Tutorial
Post by: WPShadow on 2008-Feb-13
Really nice work!!!
Title: PeeJay's Game Programming Tutorial
Post by: BumbleBee on 2008-Feb-13
Yes, excellent!
And i've just visited your site and i found some nice games.  :)

Cheers
Title: PeeJay's Game Programming Tutorial
Post by: shaf on 2008-Feb-15
PeeJay,
 I'd like to add my thanks, started looking through the tutorials, very well done.

Cheers

Shaf
Title: PeeJay's Game Programming Tutorial
Post by: François Vanzeveren on 2008-Mar-02
Hello,

I am reading PeeJay's Tutorial and adapt the first lesson to run on my GP2X-F100 (i.e. setting the screen resolution to 320x240
Here is the code:
Code: GLBasic [Select]
SETSCREEN 320,240,1
LIMITFPS 60
SETTRANSPARENCY RGB(0,0,0)
LOADSPRITE "player.bmp",0
GLOBAL px= 320/2 - 32/2
GLOBAL py= 240/2 - 32/2

WHILE KEY(01)=FALSE
        DrawTheScreen()
WEND
END

FUNCTION DrawTheScreen:
        DRAWSPRITE 0,px,py
        SHOWSCREEN
ENDFUNCTION
I loaded the following files on my GP2X in a folder /Projects/MyFirstGame/
MyFirstGame.gpe
player.bmp

I am using the demo version.

This is maybe an issue with the screen depth?

Thanks for your precious help!

Regards

François
Title: PeeJay's Game Programming Tutorial
Post by: XaMMaX on 2008-Mar-02
If you write code for gp2x, better not even write "SETSCREEN 320,240,1" =)
Title: PeeJay's Game Programming Tutorial
Post by: François Vanzeveren on 2008-Mar-02
Hi XaMMaX,

I tried without SETSCREEN... but that does not help :(
Title: PeeJay's Game Programming Tutorial
Post by: XaMMaX on 2008-Mar-02
You miss "mmuhack.o" in your folder!
Title: PeeJay's Game Programming Tutorial
Post by: François Vanzeveren on 2008-Mar-02
THank you, XaMMaX,

It works!
Title: PeeJay's Game Programming Tutorial
Post by: François Vanzeveren on 2008-Mar-05
Hello,

I am done wit this fantastic tutorial. I really enjoyed following it and it convinced it to invest into the GLBasic Premium Pack (bought with a GP2X-F200 on www.gp2x.de).

So, the next steps...
Programming in GLBasic looks so simple, that now I have the feeling the most difficult task to develop a game is to create nice graphics...
So,my question is simple: is there a good tool that allows to build graphics and animations for those whith no drawing capabilities/skills :) (e.g. based on templates)...
I would be also interested in any web sites dedicated to 2D games graphics.

Thanks for your help

François
Title: PeeJay's Game Programming Tutorial
Post by: Kitty Hello on 2008-Mar-05
I'm not much of an artist myself. I found, that it's quite easy to use images searched with google, then paste them in CorelDraw (Version 11 is cheap and good, or use any other vector program) and paint the shapes with simple primitives. Then add some gradient filling to each shape and you're pretty much done.
It's not really superb graphics, but it kind of worked for me. Best example:
http://www.greatgamesexperiment.com/game/TwisterDanceMat
If you take a close look at the graphics, you'll notice how simple they are made. But the overall experience is quite OK (for me).
Title: PeeJay's Game Programming Tutorial
Post by: François Vanzeveren on 2008-Mar-05
Hello,

I think there is a small bug in lesson 5 in the following code:
Code: GLBasic [Select]
IF py<en.eny
    en.dify=0-RND(3)
ELSE
    en.dify=RND(3)
ENDIF
There is a chance that the speed of the enemy is 0... and it will stay in memory, but outside the screen...

I think it should be something like:
Code: GLBasic [Select]
IF py<en.eny
    en.dify=-(1+RND(2))
ELSE
    en.dify=1+RND(2)
ENDIF
Voilà!
Title: PeeJay's Game Programming Tutorial
Post by: PeeJay on 2008-Mar-05
Ah, well spotted. I'm afraid that found it's way in as I was translating from another language to GL Basic :(

I'm glad you enjoyed working your way through the tutorial - now you have the full version of GL Basic, you can find a more advanced tutorial on my site that you might find useful too ....
Title: Re: PeeJay's Game Programming Tutorial
Post by: StylovisionS on 2008-Jun-04
Hi everyone! I'm reading PeeWee's tutorial at my work computer (my home computer isn't connected to the internet!). I'm trying to copy the tutorial via screen print so I can print out a copy, but the format on Lesson 5 is messed up! Is there any chance this can be rectified so I can read the tutorial in the comfort of my own home?

Danke!

Daryl

EDIT: Never fear, I have found the tutorials to print out on PeeWee's site :D
Title: Re: PeeJay's Game Programming Tutorial
Post by: Ian Price on 2008-Jun-04
The very least you could do is show PeeJay some respect, by getting his name right. It's printed on the screen and I'm sure it appears in his tutorials.

Then you can thank him for the excellent work he has done in putting it all together.
Title: Re: PeeJay's Game Programming Tutorial
Post by: XanthorXIII on 2011-Feb-23
I think this needs to be stickied.
Title: Re: PeeJay's Game Programming Tutorial
Post by: the.weavster on 2011-Mar-15
Thanks PeeJay  :)

Although I've been programming for years (primarily with REALbasic) I've never even attempted a game, your tutorial has been very helpful not only in getting familiar with using GLBasic but also with the nuts and bolts of creating a game.

Weave
Title: Re: PeeJay's Game Programming Tutorial
Post by: Stevester on 2011-Jun-18
Fantastic tutorial series!  :good:

I'm aware of the processes and structure but its really handy to see the GLBasic commands in use. Allows me to shortcut a lot of searching through the help file!

I'm guessing this was originally put together for Blitz.

Well commented final version and the little touches used are very effective.

Love Peejay's remakes site as well (I also owned the Cascade 50 cassette!!!).



Title: Re: PeeJay's Game Programming Tutorial
Post by: PeeJay on 2011-Dec-13
Thanks all  - it's nice to know that people have found it useful in giving them a foot on the ladder. You are quite correct Stevester - it was originally a Blitz tutorial, which I then rewrote as I made the change over to GLBasic myself, so I could learn the syntax and differences as I went along.

Rumour has it that there may be another 50 crap games in the pipeline, but I wouldn't hold your breath (both for the length of time it may take, and because for crap games, I wouldn't even hold a fart in!)  :D
Title: Re: PeeJay's Game Programming Tutorial
Post by: caffeinekid on 2011-Dec-13
He's alive!!  >:D