PDA

View Full Version : Impossible...



Arachanox
10-02-2007, 01:16 AM
This website's name is "Pascal Game Development". So, using my superb inference skills, I assume that everything here is programmed in Pascal.

But when I saw 3d games being made with Pascal, I knew there was something wrong here. I'm just a student with two years in Computer Science classes, with minimal experience in Pascal and average in Visual Basic, but I never knew any of this was possible in Pascal.

I've been trying to learn how to place simply bitmaps into code to create a scrolling tile-based map, but I've just heard all of these words that I've never heard of before:

OpenGl, DelphiX, FreePascal...

I'm not sure in which direction to look at! I'm just sitting here with Bloodshed Dev-Pascal, not knowing the background information about these things.

So basically, I'm just saying that:

a. You guys are doing something that I don't know with Pascal that breaks the laws of physics.
b. I still don't know how to tile, and I don't know where to learn the background information so I can learn how to tile.

~Arachanox

AthenaOfDelphi
10-02-2007, 02:01 AM
First off, welcome to PGD :-)

If you're new here.. now is the best time to arrive... the annual competition is just kicking off and I have a feeling we're going to see some excellent work this year.



but I never knew any of this was possible in Pascal


Thats because unfortunately they don't teach any different. Too many people make the assumption that Pascal is an old and dieing language. Old maybe... dieing... not a chance :-D

As for learning, I'd suggest you check our Free Pascal (http://www.freepascal.org/). Mostly Delphi compatible and lots of support on here.

For more information about how to use OpenGL and stuff like that, check out the Library and Articles sections.

And feel free to ask questions in the appropriate forum.

JSoftware
10-02-2007, 02:15 AM
a. You guys are doing something that I don't know with Pascal that breaks the laws of physics.
Welcome to PGD 8) As Athena says: ask all you can in the appropiate forums.

jasonf
10-02-2007, 02:27 AM
a. You guys are doing something that I don't know with Pascal that breaks the laws of physics.


It's not us... it's the compiler.. apparently, written by a genius :D

It is a common misconception that Pascal is an Old Man's language.. actually, only last week, I saw a Pascal programmer who when I spoke to him didn't say "you know, I remember when all this was Fields" :D

Welcome to the nut house, I hope you like games.. especially this year, it's going to be mad.

Edit: WILL, we need something to say how many bottles of wine we've had when we post.. a simple drop down will suffice.. :D I'm on 2 at the moment, so please don't accidentally mistake what I'm saying with sage advice.. unless it makes sense in which case.... YAY! :lol:

WILL
10-02-2007, 07:07 AM
Welcome to the nut house, I hope you like games.. especially this year, it's going to be mad.

Now thats what I'm talkin' about! ;) Love to see the enthusiasm Jason. :thumbup:

Though the boys beat me to it... (well actually it was Athena so it would be the girl... or girls, but so far shes the only resident 'PGD chick' so it's singular until she can trick some other of her female programmer friends that we are really just decent people... umm...) Welcome to PGD! :D


And just for the record, who ever told you Pascal was this that and the other thing... has not been here. ;) If you want to learn how to make games and do the things that you've seen here, this is the place to learn it.

We have some great things listed in the PGD Library as a reference for our visitors. And we also have some articles written specifically for the PGD community in the Articles section.

Tools you definitely want to checkout are: Free Pascal (cross-platform Pascal compiler), Delphi (commercial software studio and compiler) and Lazarus (open source alternative to Delphi, but uses the Free Pascal compilers instead)

There are a ton of libraries, component suites (for Delphi) and wrappers for graphics that you can use and learn. As well as sound, physics and a great many other things. You just have to decide what you want to do and where you think you'll be most comfortable starting in on.

I could pump you full of all kinds f information now, but I think it'll be best to let you explore and check things out. ;)

Oh and our Links section is pretty fantastic too, be sure to check that out eventually aswell.

IlovePascal
10-02-2007, 08:13 AM
This website's name is "Pascal Game Development". So, using my superb inference skills, I assume that everything here is programmed in Pascal
Well that's a good start! lol

Let me tell you a few things before I try to answer your questions:

I started programming only two years ago, and last year when I found this site, I felt exactly like you. I don't want to say I will answer your questions better than anyone else, because I'm very much a beginner myself, but I'm gonna say it.
The reason for this is that I have been member of this 'community' for about half a year, and only less than a month ago, I actually got the answer I was looking for, which is probably the one you're looking for too.

The programming course I did only covered the very basics of programming, so when we came to graphics, I loved it so much that I started making a whole bunch of little games with squares, circles and lines, one more complex than the other, until the point that I wanted to make a 3D engine. So from scratch, only using my maths and squares, circles and lines, I programmed an 'environment' that you could rotate with the mouse, zoom in and out and I drew in it a rectangle. The problem came when I decide to draw in more than a simple rectangle! It lagged very badly!

So I looked for help on the internet, and as most ppl do, I googled something like 'pascal game help' and it came with this site. On the first page was a game, 'Tanx', that had won some kind of 'The Big Boss' competition, so I checked it out, and was totally amazed at the fact that it was all 3D and full of great textures and stuff!

I became a member and for 6 months I asked the same questions you're asking here.

I've been trying to learn how to place simply bitmaps into code to create a scrolling tile-based map, but I've just heard all of these words that I've never heard of before:

OpenGl, DelphiX, FreePascal...
and a whole lot more!

Now I will come to my point and say: The people in here are way too advanced and think we know a lot more than we do, so the help you'll get is limited. (I truly mean no offence, but this is how I feel)

If you don't feel like reading thousands of tutorials and a whole bunch of definitions of things you will not remember (that's what happened to me), I will try to help you the way I hope I had been helped.

One thing I'm assuming here is that you use the unit Graph to draw your shapes; is that right?
(When you start a program, do you write 'uses graph,...;' and then initialise a graph window?)

The bitmap stuff, I'm sorry, I still don't know how to do that either (even though I was told like ten times how to do it, but I never really understood... :oops: ), so I can't help you with that; but I can guide you through the 3D stuff, if you want.
The problem is that you will have to be ready to make a big change from using Graph. If that's not what you're looking for, my help stops here. If you are willing to know more, tell me.

EDIT:
PS: where do you live, if you don't mind me askin :?:

WILL
10-02-2007, 08:38 AM
Now I will come to my point and say: The people in here are way too advanced and think we know a lot more than we do, so the help you'll get is limited. (I truly mean no offence, but this is how I feel)

If you don't feel like reading thousands of tutorials and a whole bunch of definitions of things you will not remember (that's what happened to me), I will try to help you the way I hope I had been helped.

Hmm well you bring up some interesting points there. Though I think that when a beginner comes and asks the more experienced crowd about things, we've gone through so much of the material and learned so much that we sort of find it hard to pick from what information is easier to digest from a beginner-type's knowledge-base as the novice or experts are operating at a whole other level. Nevermind that everyone's knowledge and experiences are all different. :P

I think for the beginner it's best to seek out your options based on your interest(s) and then from there you go on to read up and gain more experience on through reading and experimenting with code, etc.

Overall though, it's a fact of life that whoever you are, you start something new, you're just gonna have to do the reading first. No one can just hand you the knowledge. :? Unfortunately though some new guys just aren't willing to do that. That's probably why a lot of these things remain a mystery to them...

Huehnerschaender
10-02-2007, 09:06 AM
In addition to what WILL said, I want to mention, that especially when it comes to graphics (and here 3D graphics) you have to turn over your thinking a bit. I met some people on the internet who did great in 2D graphics, but did not seem to have the phantasie to think in 3D. They were able to do great things in 2D, no question. But if someone is not able to think with 3 coordinates instead of 2, it doesn't make sense to try to tell him how he can rotate things in 3D world (just as an example).

So basically, we are glad if we can help, but we can't turn your head.
I totally agree with the point that the advanced ones tend to use words, expression and scientistc background they are used to... But if, e.g. someone tells you to take a look at DirectX, and you have never heard of it, this means you don't know the capabilites of your PC but you want to use them. It's like when you ask someone how to drive a car and he tells you to turn on the motor and you ask "what is a motor"?

What I did when I started 3D stuff was, asking questions on this kind of forums and if I did not understand something I used google to find out what it is about. This way you learn MUCH more than if someone tells you "DirectX is a framework to access the computers hardware", because you have to read through things, find new "unknown worlds", read further, learn more and more, and finally when you know what you were looking for, you may be able to make use of it.

Just my thoughts. Personally I really know how hard it is to start this stuff. It was a real bunch of work for me to get "the basics", think in 3D and make use of those strange constructs like matrices...

So if someone wants help in improving his skills, I think we are able to show him in which direction he has to look. But I don't think we can teach you things in a minute, we learnt ourself in years.

Greetings and welcome to PGD :)

Dirk

dmantione
10-02-2007, 10:19 AM
b. I still don't know how to tile, and I don't know where to learn the background information so I can learn how to tile.


To get a bit more in detail, you have the right tool, Dev-Pascal should allow you to do this, allthough you might want to migrate to the Free Pascal IDE since Dev-Pascal hasn't been updated in a long time. One solution to achieve this is William Cairn's Simple 2D Libraries:

http://www.pascalgamedevelopment.com/viewtopic.php?t=1614&sid=4cfd1379c63ceff73440672d9e326554

Perhaps William can send you his latest version, if necessary I can send you a small example. Bit first take a look at it.

dmantione
10-02-2007, 12:21 PM
By the way, I think this thread shows two things:
* Pascal Game Development is very important to show people what amazing powers the Pascal programming langauge has
* There is a big barrier for beginners to develop real world programs.

The second point is worrying for me some time already. Pascal is still a big fish in education, but all schools and universities teach people how to write colourfull text modes using the crt unit. Great to teach the basics of programming, bad to show the power of Pascal.

A tutorial "how to use framework X" is not enough, beginners usually do know the basics of procedural programming, but many real world libraries are object oriented. Further, many toolkits are too low-level to be attractive to people. I.e. JEDI-SDL is a great library, but serving beginners the bare OpenGL API is often too much for them.

AthenaOfDelphi
10-02-2007, 05:25 PM
In some respects I agree with you dmantione, there is a big barrier for beginners, but I think Dirk summed it up nicely...



What I did when I started 3D stuff was, asking questions on this kind of forums and if I did not understand something I used google to find out what it is about. This way you learn MUCH more than if someone tells you "DirectX is a framework to access the computers hardware", because you have to read through things, find new "unknown worlds", read further, learn more and more, and finally when you know what you were looking for, you may be able to make use of it.



Whilst there maybe a barrier, if people REALLY want to do this stuff, they'll go off and research, get books (everyone who asked me what I wanted for a christmas present last year was given the title of a different book), experiment and ask more questions until finally the barrier is gone.

The web is awash with information from the very basics right the way up to how to squeeze every last pixel out of your GPU. If people want to know about this stuff, they can find out. But they have to want to do it... they have to want to put the time in.

Half the fun is figuring everything out for yourself.

cairnswm
12-02-2007, 08:35 AM
One solution to achieve this is William Cairn's Simple 2D Libraries:

http://www.pascalgamedevelopment.com/viewtopic.php?t=1614&sid=4cfd1379c63ceff73440672d9e326554

Perhaps William can send you his latest version, if necessary I can send you a small example. Bit first take a look at it.

S2DL is design ONLY for making 2D games. there is no 3D supprt at all. This is becuase I only make 2D games and have never truly made the step up to 3D games. There is still so much to learn making 2D games that I dont really need to make the change.

S2DL can be downloaded from http://www.cairnsgames.co.za/files/S2DLV1-10.zip - this is version 1.10 - dmantoine and I have made ver 1.12 which is fully compilable on linuc with FreePascal (ver 1.10 is not quite). In the download are some simple example games to look at.

As part of my Multiplexity contest game entry I am working on S2DL ver 2.0 that will follow some formal design process rather than just being thrown together as I needed things :) as well as a state management system to make putting games together even easier :)

dmantione
12-02-2007, 09:11 AM
Yes, but the poster said he wanted to make a scrolling tile-based map. S2DL should be a good match for building tile-based engines, don't you think?

cairnswm
12-02-2007, 10:47 AM
S2DL is perfect for tile based maps/games :) - becuase most of the time thats the sort of game I make :)

ver 2.0 will actually have an example scrollable tilemap as part of the code. (I'll be doing it tonight I hope)

Arachanox
12-02-2007, 12:53 PM
Thanks to all of you for replying! I'm going to try out William's 2d libraries later, but they look exciting. I didn't expect so many people to reply, this forum is very responsive!

Oh, and ILovePascal, I live somewhere in Louisiana.

Huehnerschaender
12-02-2007, 01:38 PM
Arachanox,

by discussing here, we almost forgot to ask where exactly your problem lies :)

You mentioned something about tiling... what exactly do you want to know?
Don't you know what a tile is? Don't you know how to draw a map out of tiles? Don't you know how to store a tiled map in memory? etc etc...

Just as a tip: When you need a quick and precise answer, ask your questions precisely :) People here tend to write whole books and do not answer the core question, if it is not asked clearly :)

IlovePascal
12-02-2007, 10:46 PM
Thanks to all of you for replying! I'm going to try out William's 2d libraries later, but they look exciting. I didn't expect so many people to reply, this forum is very responsive!.

lol!


Oh, and ILovePascal, I live somewhere in Louisiana.

oh ok, I jst thot u 'sounded' like a friend of mine from this side of the world! sorry bout tht :wink:

And to all the previous posts: You are entirely right, so I won't comment any further; I was simply stating it.

Arachanox
13-02-2007, 03:25 AM
William's 2d library sounds interesting enough, but I'm having difficullty with installation. I believe that I require FreePascal, or can Dev-Pascal work as well?

Also, which in which folder do I place the 4 files from William's 2d library?

And is there anything else I need to do before I can start using the commands?

Thanks,

~Arachanox

cairnswm
13-02-2007, 05:50 AM
In the S2DL Folder is a file named "Installing JEDI-SDL.txt" that explains how to install JEDI-SDL and S2DL. The examples use Lazarus (as its free and easy to install) and there is a "Installing Lazarus.txt" file as well though its very brief.

The S2DL Files:
S2DLDraws,
S2DLImage,
S2DLLogger,
S2DLNeheFont,
S2DLSound
can be placed in the same directory as your project file.

I have not used Dev-Pascal so cant help you get S2DL working in it. Switch to Lazarus and I'll be able to help even though I use Delphi as my primary development tool :)

dmantione
13-02-2007, 08:10 AM
You can use Dev-Pascal, but nobody uses it here, because it hasn't been updated for five years. S2DL depends on JEDI-SDL, so download that too. In all IDEs, you have to adjust the unit path to point to the directory where the S2DL files are is and the directory JEDI-SDL files are.

For example, in the textmode IDE:
* Select Options->Directories and fill in the directories in the "unit tab"

In Lazarus you do:
* Select Project->"Compiler options" and fill in the directories in the "other unit files" box.

Arachanox
13-02-2007, 12:58 PM
Ok, well it turns out that there wasn't a textfile in the 2d library folder after all, so oh well.

On the bright side, I've found Lazarus 0.9.21 and JEDI-SDL so hopefully when they are working I can use tiling functions.

~Arachanox

cairnswm
13-02-2007, 01:23 PM
I've just downloaded my S2DL download from my site and there are definitly 3 text files in the root directory when extracted. I presume you have downlaoded the wrong files

http://www.cairnsgames.co.za/files/s2dlv1-10.zip

Arachanox
13-02-2007, 04:57 PM
I presume that I had. Thanks, I found the text files now!

IlovePascal
14-02-2007, 12:43 AM
Hey, I downloaded it (s2dl) as well (you advised me to on another thread), but did not manage to get HelloWorld to work. I read your txt files, followed the instructions, but I still got many errors!

Mainly it was because writing in the 'units paths' a path to the JEDI-SDL directory didn't include all the files inside the other folders in there, so it couldn't open them.

cairnswm
14-02-2007, 04:53 AM
S2DL ver 2.0 has just been released - see my post in the "Your Projects" section.

I normally move all the JEDI-SDL pas files into the JEDI-SDL main directory so that I dont need to include all the different possible paths.