Hello, I'm after some advice on the following design idea. I'm currently creating some classes for my new side scrolling shooter game (R-Type style). The...
We use a similar concept in our commercial console games to reduce memory fragmentation and memory alloc/free overhead. We create a pool of objects at the...
Thanks for you input Sly. I don't know why I didn't think about using two lists rather than trying to be "clever" with one. You mention console games and...
Delphi most certainly does support double linked lists. :) Here is a very simple class to get you started. type TLinkedListNode = class public Next, Prev:...
Hi Sly, Thanks for the code, I'll give it a go when my boss isn't looking ... I guess what I should have said is that Delphi doesn't have a built in double...
Hi Sly, I've had a little Google on Double Linked Lists and played around with some code. I have two questions/comments for you. Firstly, the code you supplied...
Hi Ian, You could make a private list, let's say FSprites : TList; then make a property Sprites [Index : Integer] : TMySprite read GetMySprite; Then make a...
Yes, Next and Prev should be of type TLinkedListNode. That's what you get for typing code directly into an email reply. :) It's also been a few years since...
Thanks for that Sly. Quite a bit of coding there :o) I'll grab a coffee and modify my game classes based on your linked list concept / code snippets. Once I...
I would say the best thing to do would be to try to understand it before integrating it. It is better to use code that you understand than code you don't. :) ...
I totally agree with what you say Sly. I'm reasonably happy with the way Linked Lists work. I used them many years ago when I maintained a C++ application....
Hi all, I'm looking for an interface programmer (I'm using Delphi 6 right
now) for a wargame project. Paid position of course. Experience not
necessary, a...
Hello, In my game I have a sprite object that will display a background tile. When I create one of these it gets a pointer to a surface that contains many...
I think your proposed solution would work just fine. We do a similar thing in our commercial games, but my example comes from 3D animation data. The...
Hi Ian, Storing the information in the class makes the code more clean and readable. This solution is especially good if you have many instances. On the other...
Hello, Thanks for your comments (and to Sly's). My program is now starting to grow and I have a nice bit of scrolling going. As soon as I can get some decent...
Hi all, Recently, I started to study GDI+. It happens that impressive things can be done with just a few lines of code and good enough speed. I want to make...
Hi, How you want to apppy this is an important factor. But you can get some very good source and examples at Torry or EFG labs. On Torry there is one FW...
Hi This TGradient component is really nice and extremely fast. I would love to learn how does it things so fast. However it uses GDI for drawing, which is slow...
Hi, In a number of applications I needed a structure like this: type MyStructure = record Num : integer; Arr : array[0..n] of ...; Str : array[0..n] of ...; ...
Would this work for you ? MyStructure = record Num : integer; Arr : array of integer ; Str : array of integer ; end; Ian ________________________________ From:...
Hello everybody! I wasn't very active here for some time but I managed to get almost to the end of Electrotehnic faculty and now I got a job so again I don't...
Hi guys I came to a very strange situation: Folowing th advice of Ian, I declared: type TmyGradient=record Numb : integer; Colors : array of cardinal; Pos...
Hello, I've created a program that exports map data for use in my game. The information about each tile is held in a record and is saved to disk using the...
Hello, I think I've resolved my problem. I am now writing out the file using "file of integer". I first write the header which has a fixed length, this is...