Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2002-07

Extremely disappointed..

3 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Alan Grimes

I was greatly saddened when I read in one of the manuals that the overlay feature had been removed... I am a horribly inexperienced programmer so maybe there is a better way of doing what I wanted to do and I'm just being stupid and doing things in the wrong way (as usual.)

The project is an AI testbench program. I will need to do my very first serious graphics programming (!!!) and do a number of things I don't know how to accomplish in a reasonably managable way...

The software design that I have come up with so far is this:

the user types

c:\AI\> testbench simon.ai

and the testbench program loads..

Then, the program looks for the "simon.ai file" and loads that AI, providing key IO functions to simon and a number of other hooks. It will then switch to executing the main loop of the AI and only respond to either user or AI input.

In addition to this, other modules such as "chessbrd.ovl" and stuff could be swapped in and out to provide test programs for the AI to work with entirely within the testbench.exe program.

I call this style "system oriented design". It seems to me to be the most elegant way of orgainizing my source.. I had designed an entire OS around the paradigm but was unable to implement it... Here I hope to get some experience with using it on a real application. -- the first that I have been really motovated to write ever!!!

Please tell me what I am doing wrong and what features of FreePascal I should be looking at. =)

Linux has more source code than my brain. http://users.rcn.com/alangrimes/
Jeff Wormsley
to Alan Grimes

*********** REPLY SEPARATOR ***********

PM Alan Grimes wrote
I was greatly saddened when I read in one of the manuals that the overlay feature had been removed...

What you are looking for would probably be better suited by a plugin architecture. Plugins can be implemented in a variety of ways, ranging from DLL's/.so's (look to LoadLibrary and GetProcAddress API functions in Windows, I don't know the Linux versions for .so's) to named pipes (doable in windows and linux) to COM/COM+/DCOM implementations (Windows only?). Look for sample plugin frameworks and see what you can find that suits your needs. It may be Delphi code, and may be Windows specific, but it should get you thinking about methods that don't require quite the hassles and dangers that TP's old overlay method brought.

Jeff.

Lee, John

I thought that overlays were just a way of getting more memory space...so now we have 32 bit addresing in fpc you can get quite a large program (many many Mbytes cf some 64k kbytes under 16 bit tpc/bpc)in if you run on windoze or linux, or even quite large ones on go32v2... Did I miss something here? Regards John

I was greatly saddened when I read in one of the manuals that the overlay feature had been removed... I am a horribly inexperienced programmer so maybe there is a better way of doing what I wanted to do and I'm just being stupid and doing things in the wrong way (as usual.)

This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.