Recent

Recent Posts

Pages: [1] 2 3 ... 10
1
General / Re: Here's some Pong game. Suggestions? Feedback? Ideeas?
« Last post by Seenkao on Today at 04:28:13 am »
Могу я предложить ZenGL? Он работает с графикой используя OpenGL, но для того чтоб его использовать не обязательно знать OpenGL. Уже есть готовый функционал, для отрисовки примитивов, использования спрайтов, работы с ресурсами и многое другое. Всё можно увидеть в демо-версиях идущих вместе с библиотекой.
И, он поддерживает несколько платформ: Windows, Linux, MacOS, Android.  :)

Я не думаю, что это будет намного сложнее чем работать в текстовом режиме. И допустим уже есть готовые функции для проверки столкновения.
Я бы посоветовал вам другие какие-то движки, но не уверен насколько они просты для изучения. В данном случае вам нужно знать только паскаль и уметь им пользоваться. Демонстрации показывают основную функциональность и вместе с ними код документирован. А так же ведётся документация внутри библиотеки ZenGL. На данный момент не полностью, но постепенно заполняются не документированные части.
-----------------------------------------------------

Google translate:
May I suggest ZenGL? It works with graphics using OpenGL, but you don't need to know OpenGL to use it. There is already ready-made functionality for drawing primitives, using sprites, working with resources, and much more. Everything can be seen in the demo versions that come with the library.
And, it supports multiple platforms: Windows, Linux, MacOS, Android. :)

I don't think it will be much more difficult than working in text mode. And let’s say there are already ready-made functions for checking collisions.
I would recommend some other engines, but I'm not sure how easy they are to learn. In this case, you only need to know Pascal and be able to use it. The demos show the basic functionality and along with them the code is documented. Documentation is also maintained inside the ZenGL library. At the moment, not completely, but the undocumented parts are gradually being filled in.
2
LazReport / Re: Designer
« Last post by SandyG on Today at 03:20:24 am »
Will take a look at the 2x feature, will help a lot if it works.

Sandy
3
General / Re: A question on Modula2 vs Free Pascal
« Last post by speter on Today at 03:09:19 am »
They are really easy to stop though. Just don’t allow people who don’t know pascal to post.  Problem solved.  8)
I would not support this approach.

I would suggest the opposite -> give help to everyone who asks; especially those with poor (or no) knowledge of Pascal.

cheers
S.
4
General / Re: Initiaiizing records by constructor
« Last post by speter on Today at 03:04:31 am »
Interestingly, when I implement Thaddy's very cool code,
I get a "managed type not initialised" warning if "a:TA" is a local variable;
the compiler does not give the warning if "a:TA" is a global.

Code: Pascal  [Select][+][-]
  1. unit foo;
  2.  
  3. {$mode objfpc}{$modeswitch advancedrecords}{$H+}
  4.  ...
  5. type
  6.   TA = record
  7.     int: integer;
  8.     str: string;
  9.     class operator initialize(var a:TA);
  10.   end;
  11.  
  12.   { TForm1 }
  13.  
  14.   TForm1 = class(TForm)
  15.    ...
  16.     procedure FormCreate(Sender: TObject);
  17.   private
  18.  
  19.   public
  20.     a : ta;
  21.   end;
  22.  
  23. var
  24.   Form1: TForm1;
  25.  
  26. implementation
  27.  
  28. {$R *.lfm}
  29.  
  30. { TForm1 }
  31.  
  32. class operator TA.initialize(var a:TA);
  33. begin
  34.   a.int := 200;
  35.   a.str := 'test';
  36. end;
  37.  
  38. procedure TForm1.FormCreate(Sender: TObject);
  39. var
  40.   b : ta;
  41. begin
  42.   memo1.append('int='+a.int.tostring+'; str='+a.str);
  43.   memo1.append('int='+b.int.tostring+'; str='+b.str);
  44. end;

The code above give the message:
  Warning: Local variable "b" of a managed type does not seem to be initialized
(even though it _is_ initialised.)

cheers
S.
5
General / Re: Best way to exchange data between a form and a unit
« Last post by cdbc on Today at 03:00:24 am »
Hi
That's the spirit  ;)
Nice to hear, your efforts now, _will_ pay you back  8)
Remember, that if you have a field/member of the transaction, say e.g.: "TSettingsTransaction.Sender : TObject", then you are able to send the /offending/ checkbox along, throug the observer mechanism in i.e.: "procedure HandleObsNotify(aReason: TProviderReason;aNotifyClass: TObject;UserData: pointer);" and then check for it in the /common/ handler e.g.:
Code: Pascal  [Select][+][-]
  1. TSomeView.DoSetChecks(anObj: TObject;aSettingsRec: PSettingsRec);
  2. begin
  3.   ...
  4.   with aSettingsRec^ do begin
  5.     if anObj is TCheckBox then begin
  6.       if TCheckBox(anObj).Name = 'chbActiveLogging' then TCheckBox(anObj).Checked:= srActiveLog; // field of record
  7.       ...
  8.       etc...
  9.     end;
  10.   end;
  11. end;
That should alleviate duplicate code...  :D
Just a thought, anyway, best keep it simple.
Regards Benny
6
General / Re: A question on Modula2 vs Free Pascal
« Last post by Joanna on Today at 01:36:43 am »
@thaddy I’ve heard stories of you scolding people but I’ve never had a problem with you  :)

I’m sorry to say but you and mark Had your efforts to help wasted upon someone who didn’t deserve them.

Thaddy, you have done nothing wrong. The goal of this person who does not even know pascal was to attack the nice people in this forum who try to help. If he keeps being allowed to do this the forums will become toxic and less helpful as people get burned out and leave.

This is just another “Trojan horse“ Style attack upon the fpc community.
They like to disguise themselves as new people interested in pascal but they are really like a weapon filled with poison once they get in.

They are really easy to stop though. Just don’t allow people who don’t know pascal to post.  Problem solved.  8)
7
Android / lamw
« Last post by desconocido on Today at 12:58:09 am »
I need help installing lazarus android module wizard, I have many errors, it is almost impossible, I have checked almost everywhere, can someone help me, thank you very much
8
General / Re: A question on Modula2 vs Free Pascal
« Last post by Thaddy on Today at 12:38:08 am »
Joanna, Marcov is allowed to always put me right. My answer could indeed be interpreted as unfriendly.
It wasn't. OP did not put any effort in. That hurts me. He seems not a noob, lacks basic linux build-from-source knowledge and does not listen to Mark and me. He should have had a running M2 this weekend.

At least i have Modula-2 installed....(for now)
9
General / Re: Initiaiizing records by constructor
« Last post by Thaddy on Today at 12:23:13 am »
Here's a solution with management operator, btw:
Code: Pascal  [Select][+][-]
  1. {$mode objfpc}{$modeswitch advancedrecords}{$H+}
  2. type
  3.   TA = record
  4.     int: integer;
  5.     str: string;
  6.     class operator initialize(var a:TA);
  7.   end;
  8.  
  9.  class operator TA.initialize(var a:TA);
  10.  begin
  11.    a.int := 200;
  12.    a.str := 'test';
  13.  end;
  14.  
  15. var
  16.   a:TA;
  17. begin
  18.   writeln(a.int,a.str);
  19. end.
10
General / Re: Initiaiizing records by constructor
« Last post by Thaddy on Today at 12:13:36 am »
How about using a procedure instead of a constructor?
Not a good idea. Separates code from implementation.
We have better options nowadays, management operators and record constructors, when properly used.
Also note that in his case the string type is not clear. What string type does string mean?
Pages: [1] 2 3 ... 10

TinyPortal © 2005-2018