PDA

View Full Version : Hello, PascalGameDevelopment



Weedo
07-11-2007, 06:19 PM
First of all, hey ! I havent found any Introduction threads !
I just discovered this comunity 3 days ago and i am trully fascinated about what you guys are doing around here.
I am Weedo, a 18 years old student from Romania, i do Pascal in school, but not at such a high standard. That's why i'm trying to improve my skill in programming area.
I belive Pascal is way over C/C++ , is easyer, is more understandable, it's not based on macros and so on...anyway this is not a C/Pascal comparition sheet...
At this moment i am in my last year of highschool, and in 5-6 mounths will take my assisstant'programmer diploma, based on pascal coding ! Anyway, as i feel, the kind of things we learn at school are pretty mutch basic, like math problems (matrixes *spelling ?*...vectors, diagonals, chess boards) but we dont progress, we dont get to know the real posibilities of pascal, hell we were never introduced to colisions/object movement/controls/textures....but probably becouse this thing is related to other projects.
Soo, for my diploma, i have to chose between a FoxPro project involving databases, a HTML Code project involving the construction of a site, and ofcourse Pascal. And becouse we didnt studied Fox at our class, and becouse HTML is used by everyone, and also becouse i like Pascal, i decided to head for a Pascal project (in particular, a game...thinkin' at Pong/Worm/Pacman, from what i've read here, i understanded that these are the easiest ones)
Anyway, as i stated above, i got no real knowledge of things like object , colisions, AI, controls, but i am looking forward to learn these stuffs, only that i cant realy find any good documentations about it
So here i am, asking for help about some documentation/tutorials about gaming'development for newbies(if i can call it so)

And, sorry for my ugly and extremly bad english, i learn french and german in school :(

NecroDOME
07-11-2007, 06:24 PM
Introduction thread: http://www.pascalgamedevelopment.com/viewtopic.php?t=31

Welcome :)

And indeed, the game stuff you have to learn yourself. Thats how I started.

arthurprs
07-11-2007, 06:39 PM
Hello, and welcome ^^

I uploaded source of 2 things that i writen when i started,
1 is a simple pong game on GDI, the another is something more complex about sprites (GDI too)

http://www.mediafire.com/?6d56ig5gvld

*GDI is the commom delphi form, not suitable for games but usefull when learning.

ask in the forum if you have any question/doubt

pstudio
07-11-2007, 06:40 PM
Hey and welcome to the community.
You can find some beginners tutorials at DelphiGameDev.com
These will give you a basic introduction to game programming in Pascal (using Delphi).

Robert Kosek
07-11-2007, 07:22 PM
Greetings Weebo, welcome to PGD! Glad to have you with us. Your English is quite passable, so don't feel badly. Many Americans and British do worse. (Ironically.)

For Pascal in a server/CGI environment you might want to investigate L505 (Lars) work to make Powerful Web Utilities (http://z505.com/powtils/idx.shtml); it is the best Pascal CGI wrapper out there.

I'll see if I can dig up any helpful articles for you about game design. :)

chronozphere
07-11-2007, 08:10 PM
Welcome Weebo. I'm sure you will enjoy your stay here. ;)



And, sorry for my ugly and extremly bad english, i learn french and german in school


What are you talkin about?? Your english is quiet good IMHO. :thumbup:



I belive Pascal is way over C/C++...


Ghehe... i think most of the PGD members agree :razz: Don't we??



a Pascal project (in particular, a game...thinkin' at Pong/Worm/Pacman, from what i've read here, i understanded that these are the easiest ones


Hmmm.... pacman and pong are rather easy to make, but i don't know about worm. I assume you mean the worms game, with the destructable terrain and stuff. Making good destructable terrain can be rather hard. Fortunatly, User137 has made a great game, called "Flexbattle", wich has good destructable terrain. But sadly, i couldn't find the game itsself. maybe the site is down now. :(



matrixes *spelling ?*


They are called matrices ;)

arthurprs
07-11-2007, 08:23 PM
Greetings Weebo, welcome to PGD! Glad to have you with us. Your English is quite passable, so don't feel badly. Many Americans and British do worse. (Ironically.)

For Pascal in a server/CGI environment you might want to investigate L505 (Lars) work to make Powerful Web Utilities (http://z505.com/powtils/idx.shtml); it is the best Pascal CGI wrapper out there.

I'll see if I can dig up any helpful articles for you about game design. :)


Why Yet Another Web Framework?
Our opinion: PHP/Perl is messy, Python/Ruby is slow and less powerful.
please tell me that i don't read that...

complete false info...

L505
07-11-2007, 08:37 PM
Why Yet Another Web Framework?
Our opinion: PHP/Perl is messy, Python/Ruby is slow and less powerful.
please tell me that i don't read that...

complete false info...

Thanks for the flame bait.
I won't convince anyone.. LOL.

Completely true information. I work on Ruby and PHP scripts and Powtils programs for a living and I should know.

Perl and PHP are messy.. in our opinion. It is just our opinion. Not a fact. That's why it states on the website that it is an opinion, not a fact. Did I mention that it is an opinion.

Ruby and Python can be sped up by extending using Cee language. If that floats your boat, good. Personally, I like having one source base in one language. Not mixing and matching Cee with Ruby and PHP.

Google uses C++ to power their site.
http://code.google.com/p/google-ctemplate/

However, in many cases, speed and optimization is not important. In that case, your choices are clean languages such as Ruby, Python, Pascal. Pascal offers the advantage that you do not have to write performance friendly code in Cee, you can just use modern pascal. And of course you can reuse all your delphi code and freepascal code from desktop programs (non gui related algorithms, which I have many).

Weedo
07-11-2007, 08:48 PM
Hmmm.... pacman and pong are rather easy to make, but i don't know about worm. I assume you mean the worms game, with the destructable terrain and stuff. Making good destructable terrain can be rather hard. Fortunatly, User137 has made a great game, called "Flexbattle", wich has good destructable terrain. But sadly, i couldn't find the game itsself. maybe the site is down now. :(


I was refeering to that game where you control a worm and you run eating things and grow larger and larger ...and you dont have to hit your body :)

anyway, thanks alot for all the replies, feels nice to take part in such a friendly envoirement ! Will check out those delphi sites, at start i tought delphi and pascal are 2 different thing, thats why i never bothered to check delphi out...i did studied a bit of C++ witch i find it booring and messy, and some autoit, but thats way too macro'ed and script'ed...eaven a 5 years old can code in autoit.

Weedo
07-11-2007, 08:58 PM
oh and one more thing, i looked over the code of arthurprs, and i was thinikin'...back at school we got Borland Pascal 7.0 instaled, but just that, no libraries, no addons, nothing, so i was wondering, it can be done without addons ? just with a default instalation compiler ? becouse i cant instal new stuffs at school pc (the computers got some restrictions, heavy restrictions, they disabled eaven right click)

arthurprs
07-11-2007, 09:04 PM
Why Yet Another Web Framework?
Our opinion: PHP/Perl is messy, Python/Ruby is slow and less powerful.
please tell me that i don't read that...

complete false info...

Thanks for the flame bait.
I won't convince anyone.. LOL.

Completely true information. I work on Ruby and PHP scripts and Powtils programs for a living and I should know.

Perl and PHP are messy.. in our opinion. It is just our opinion. Not a fact. That's why it states on the website that it is an opinion, not a fact. Did I mention that it is an opinion.

Ruby and Python can be sped up by extending using Cee language. If that floats your boat, good. Personally, I like having one source base in one language. Not mixing and matching Cee with Ruby and PHP.

Google uses C++ to power their site.
http://code.google.com/p/google-ctemplate/

However, in many cases, speed and optimization is not important. In that case, your choices are clean languages such as Ruby, Python, Pascal. Pascal offers the advantage that you do not have to write performance friendly code in Cee, you can just use modern pascal. And of course you can reuse all your delphi code and freepascal code from desktop programs (non gui related algorithms, which I have many).
I really disagree with your comment but,
i don't expected to start a flamewar, sorry..

L505
07-11-2007, 10:31 PM
I really disagree with your comment but,
i don't expected to start a flamewar, sorry..

The website has been updated.
Try again.

Any other complaints will be taken care of immediately.

Traveler
07-11-2007, 10:57 PM
I was refeering to that game where you control a worm and you run eating things and grow larger and larger ...and you dont have to hit your body :)

I think you mean nibbles (http://en.wikipedia.org/wiki/Nibbles_%28computer_game%29)

Quite a fun game. It came with qbasic (ms-dos era) iirc. It think, it would really make a nice schoolproject, as the basic system is very simple to make. There are lots of interesting improvements too. You could for example add more pickups, than the obvious ones that'll make the snake grow. (speed, Invincibility, extra points/ whatever)

Weedo
07-11-2007, 11:15 PM
or a multiplayer battle mode, with 2 snakes on the same board, and each one trying to make the oponent crash into it..( like sudently cuting his trajectory and force the oponent to crash in its own body )

arthurprs
08-11-2007, 12:49 AM
with Borland Pascal 7.0 you will not be able to do much, only console things..

you can install freepascal 2.2, its completely free :)

Huehnerschaender
08-11-2007, 08:46 AM
@arthurps
he said he cannot install anything :) It's not a matter of costs, its a matter of security settings in the school.


Hi Weedo,

welcome to PGD.
Using Pascal 7 you could do a little game like Pacman using the DOS graphics mode. Pascal should include a unit called graphics.pas. In this unit you will find all you need to "draw" the game. It will look very simple but to show that you are able to program a small game it should be enough. I don't think your teacher wants to see if youre an artist, he needs to check your programming skills.

Don't hesitate to ask further questions. But personally I did not use the DOS Pascal compiler for ages now...

Greetings,
Dirk

wodzu
08-11-2007, 09:09 AM
Hello Weedo.

Welcome to our community :-)

It is a real shame that you can't install anything on PC at school. In my opinion you should speak with some teacher about it. As far as I know the main purpose of school is to help in gaining knowledge. There is another solution for you. You may burn installed FreePascal on the CD and run it from there (of course if you have such possibility).

Good luck!

WILL
08-11-2007, 09:52 AM
I would agree that BP7, TP7 or anything older will do you about as much good as learning how to break the 640k memory barrier in DOS these days. :lol:

Free Pascal is definitely your best bet. If your school's computers had free/available USB sockets you could install Free Pascal onto a relatively cheap USB (thumb/stick) drive and have plenty of room to spare for your own sources and other API/headers, etc... That would allow you to do something useful and modern in (Object) Pascal at least.


The bigger issue at hand is, why on earth have they installed such an obsolete compiler on there in the first place? I'd recommend Free Pascal to your CS teachers next time you have the chance to speak on the matter.

It's sick and disgraceful how teachers these days just don't do their homework on what is current. Do a search on Google for Pascal and it's right on the first page, 3rd link down. :? And these people are supposed to be educators...

Weedo
08-11-2007, 01:13 PM
Well, yea is kinda sad, but in fact the TP compiler is not such a pain, is a nice way to familiarise yourself with the structures and such, but they could of added delphi too, lazarus, free pascal or whatever, realy a mess. Anyway, i guess i'll present the compiled exe and have the source code writen on a bunch of papers next to me ....so i wont be forced to open the source on the PC. Anyway, i'm on start now !

chronozphere
08-11-2007, 03:58 PM
I was refeering to that game where you control a worm and you run eating things and grow larger and larger ...and you dont have to hit your body Smile


That game is more famous by the name "Snake" AFAIK ;)

Weedo
08-11-2007, 06:33 PM
yea, snake/nibbles/worm whatever ^^ i dont know where to start from lolz, never did this before !

arthurprs
08-11-2007, 07:38 PM
something like...

program test;

uses
sysutils, crt;

type
Tpoint = record
x , y : integer;
end;

var
snake : array [1 .. MAXSNAKESIZE] of Tpoint;
snakesize : integer;
direction : integer;

var
i : integer;
begin
// initial snake
snakesize := 3;
snake[1].x := 3;snake[1].x := 1;
snake[2].x := 4;snake[2].x := 1;
snake[1].x := 5;snake[1].x := 1;
direction := 0;


while true do
begin
cls;
for i := 1 to snakesize do
case direction of
0 : snake[i].x := snake[i].x + 1;
1 : snake[i].y := snake[i]y - 1;
2 : snake[i].x := snake[i].x - 1;
3 : snake[i].y := snake[i].y + 1;
end;

for i := 1 to snakesize do
begin
goto(snake[i].x,snake[i].y);
write('*');
end;
// add keypress code to manage directions
// add a simple double loop to check snake head coliding with tail
// add a check if snake don't hit the walls
end;
end.

*don't sure if it works
*sorry for syntax errors, i writed this directly on the board