Recent

Poll

Vote: What's the best project of this year?

"ball" by raw
1 (3.7%)
"bgragraphics" by j-g (pocket watch)
2 (7.4%)
"duplo6" by bylaardt
7 (25.9%)
"glslideshow" by handoko
2 (7.4%)
"mariocronch" by ericktux
0 (0%)
"movingdots" by lainz
1 (3.7%)
"movingdotsgl" by lainz
0 (0%)
"relogio" by bylaardt
5 (18.5%)
"starsfieldshooter" by turrican
0 (0%)
"steampunkclock" by bylaardt
1 (3.7%)
"sudoku" by user137
5 (18.5%)
"furiouspaladin" by handoko
3 (11.1%)
"educrace" by lulu
0 (0%)

Total Members Voted: 27

Author Topic: Graphics Contest 2017, please vote now!  (Read 155476 times)

minesadorada

  • Hero Member
  • *****
  • Posts: 605
  • Retired
Re: Graphics Contest 2017
« Reply #135 on: July 10, 2017, 06:28:45 pm »
@minesadorada

I also got these missing dll errors
I downloaded from https://github.com/liballeg/allegro5/releases
Version 5.2 im on Windows XP 32bit sp3 and "allegro-mingw-gcc5.3.0-x86-5.2.0.zip" contained
all the dlls needed to run the Game.
if you are 64bit try "allegro-mingw-gcc5.3.0-x64-5.2.0.zip" ?

Hope this helps
For Win 10 x64 you need to download:
allegro-mingw-gcc5.3.0-x86-5.2.0.zip

and extract into the .exe folder:
allegro_acodec-5.2.dll
allegro_audio-5.2.dll
allegro_font-5.2.dll
allegro_image-5.2.dll
allegro_primitives-5.2.dll
allegro_ttf-5.2.dll
allegro-5.2.dll

The game opens OK, but with a DOS console in the background.  The game window is tiny (320x240?) on a 1920 screen, so the instruction text is practically unreadable.

I was expecting to move via left-arrow-right/arrow but no luck.

The only way to exit the game is by closing the DOS console.  There is no File/close menu in the game window. ALT+F4 didn't work.

So: to fix things for Windows..
1. Make an InnoSetup that includes the dll files
2. Make the initial screen 640 x 480 at least, with an option to enlarge
3. Include File/close in the game menu
4. Use left/right arrow keys to move - it's sort-of standard.
5. After the message "You Failed" I couldn't find an easy way to restart the game

Those are my initial comments (as invited)
GPL Apps: Health MonitorRetro Ski Run
OnlinePackageManager Components: LazAutoUpdate, LongTimer, PoweredBy, ScrollText, PlaySound, CryptINI

Handoko

  • Hero Member
  • *****
  • Posts: 3759
  • My goal: build my own game engine using Lazarus
Re: Graphics Contest 2017
« Reply #136 on: July 10, 2017, 08:17:57 pm »
Quote
ALLEGRO_VSYNC
Set to 1 to tell the driver to wait for vsync in al_flip_display, or to 2 to force vsync off. The default of 0 means that Allegro does not try to modify the vsync behavior so it may be on or off. Note that even in the case of 1 or 2 it is possible to override the vsync behavior in the graphics driver so you should not rely on it.

Maybe you can toy with that option a little ?

The speed issue now has solved, thank you. The quote you provided explains why it runs well on my computer but too fast on others. I am busy at the moment, I will inspect it deeper later, maybe some days later.

And this is the main loop:

Code: Pascal  [Select][+][-]
  1. var
  2.   Event: ALLEGRO_EVENT;
  3. begin
  4.   ProcessInit;
  5.   Start(Intro1);
  6.   while (GameIsRunning) do begin
  7.     al_wait_for_event(EventQueue, Event);
  8.     ProcessUserInput;
  9.     ProcessUpdate;
  10.     ProcessDrawing;
  11.   end;
  12.   ProcessShutdown;
  13. end.
I'm really curious about your sources.  Your game loop looks as the loops used in the old times, when the target system had a fixed speed (i.e: game consoles, z80 based computers, ect.).  Nowadays a single target (i.e. PC) may have different speed (not only CPU but also memory, disk and graphics hardware, that affects the final speed).  Of course, it is possible to control speed using different ways, and I'm curious to know which one you've used as I'm sure it's very different to the one I'm using in my engine.

The code you quoted is the revised version, which should work correctly. I heard that Allegro 5 uses event concept, which I am not familiar with. I followed the sample from the wiki page, added the Allegro timer event, and the speed issue now has solved.

@ Scoops, lainz, minesadorada

Thank you for you helps. I found no such information on the web! This information is very valuable.

@ all

I am overwhelmed by 'real' job currently, I may be able to come back maybe some days later. Please report anything that seems weird. If no new bug found, I then will start to write the tutorial.

Of course I know I am not an expert in game programming, the code may not conform to the standard. So will first let it checked by seniors before publicized to the public.

This Furious Paladin is far from complete, but it has many interesting thing inside:
- How to manage animation
- Using app state (or others called it 'game state')
- Using dynamic array (instead of TFPList)

It uses dynamic array for storing the actor data. I set a test running dynamic array vs TFPList, the result is dynamic array runs a bit faster compare to TFPList but it runs much slower when adding/deleting items. In the game, it doesn't really delete the item, it simply mark it as 'expired', so can be reuse later.

See you.

Handoko

  • Hero Member
  • *****
  • Posts: 3759
  • My goal: build my own game engine using Lazarus
Re: Graphics Contest 2017
« Reply #137 on: July 10, 2017, 08:28:42 pm »
The game opens OK, but with a DOS console in the background.  The game window is tiny (320x240?) on a 1920 screen, so the instruction text is practically unreadable.

I was expecting to move via left-arrow-right/arrow but no luck.

The only way to exit the game is by closing the DOS console.  There is no File/close menu in the game window. ALT+F4 didn't work.

Sorry, I knew it. :'(

I wanted to make it stretchable on different screen sizes, but this is my first time using Allegro, I don't know how to do it properly. So to make it 'safe' on smaller screens, I decided the size is 500 x 300. I use software magnifier when running it on my 24" monitor. :o

Believe me, the game play better using shifts rather than arrows.
To back to the intro screen after losing the game, press [space].

Here is the intro1 screen:
« Last Edit: July 10, 2017, 08:32:32 pm by Handoko »

turrican

  • Full Member
  • ***
  • Posts: 133
  • Pascal is my life.
    • Homepage
Re: Graphics Contest 2017
« Reply #138 on: July 11, 2017, 12:33:37 am »
Here is my little project :

https://github.com/turric4n/SimpleZGL/tree/master/examples/StarfieldShooter

Here is the binary for Windows : http://www.turric4n.com/static/StarShooter_i386-win32.zip

Simply game developed for my little daughter.

Features :

Video - Full-Screen OpenGL or DirectX 9
1% CPU usage 5% GPU
Animations
Mouse Input
Collitions
Cross-Platform and MultiOS
 






« Last Edit: July 11, 2017, 12:38:00 am by turrican »

lainz

  • Hero Member
  • *****
  • Posts: 3699
  • Leandro Diaz
Re: Graphics Contest 2017
« Reply #139 on: July 11, 2017, 12:41:06 am »
Here is my little project :

https://github.com/turric4n/SimpleZGL/tree/master/examples/StarfieldShooter

Here is the binary for Windows : http://www.turric4n.com/static/StarShooter_i386-win32.zip

Simply game developed for my little daughter.

Features :

Video - Full-Screen OpenGL or DirectX 9
1% CPU usage 5% GPU
Animations
Mouse Input
Collitions
Cross-Platform and MultiOS

Well done! I've played it with Wine on Ubuntu and works fine. The only thing I see is that you maybe can center the ball when you do the click, simply add an offset so when you click it is displayed centered, not from the left corner. Another thing is that there's some flickering of the balls when there are more than one at the same time, but I can't say if it's a problem with Wine or the application itself.

Pascal

  • Hero Member
  • *****
  • Posts: 911
Re: Graphics Contest 2017
« Reply #140 on: July 11, 2017, 06:29:48 am »
Here is my little project :

https://github.com/turric4n/SimpleZGL/tree/master/examples/StarfieldShooter

Here is the binary for Windows : http://www.turric4n.com/static/StarShooter_i386-win32.zip

Simply game developed for my little daughter.

Features :

Video - Full-Screen OpenGL or DirectX 9
1% CPU usage 5% GPU
Animations
Mouse Input
Collitions
Cross-Platform and MultiOS

Doesn't run on Win10 Pro x64 (1703). Just Black Screen with flickering mouse pointer.
Compatibility mode doesen't help except flicking mouse pointer.
laz trunk x64 - fpc trunk i386 (cross x64) - Windows 10 Pro x64 (2004)

Ñuño_Martínez

  • Hero Member
  • *****
  • Posts: 1052
    • Burdjia
Re: Graphics Contest 2017
« Reply #141 on: July 11, 2017, 10:21:29 am »
For Ubuntu I downloaded the PPA containing 5.2 and the game runs fine.

For Wine I downloaded the 5.2.0 dll and put into the exe folder, then run with Wine and works fine also. If you download a newer version like 5.2.x there are more dependencies that doesn't come with Windows, something related with C++. These DLL doesn't come with the Allegro download, must be downloaded in another place.

As the Allegro.pas README file says, I recommend you to download the DLL from http://download.gna.org/allegro/allegro-bin/.  I had little problems with them.  (I'm having troubles to connect with them now)

The game opens OK, but with a DOS console in the background.  The game window is tiny (320x240?) on a 1920 screen, so the instruction text is practically unreadable.

The best solution is to use Allegro transformations (linked the C documentation because the Pascal one isn't complete yet).  The idea is to create a "zoom in" transformation and apply it when rendering.  In my game engine I use this:
Code: Pascal  [Select][+][-]
  1. CONST
  2. { The screen size we want. }
  3.   S_WIDTH = 320; S_HEIGHT = 240;
  4. VAR
  5. { The transformation matrix. }
  6.   TheMatrix: ALLEGRO_TRANSFORM;
  7. { The display. }
  8.   Display: ALLEGRO_DISPLAYptr;
  9.  
  10. BEGIN
  11.   ...
  12. { After creating the display. }
  13.   al_identity_transform (TheMatrix); { To initialize. }
  14.   al_scale_transform (
  15.     fMatrix,
  16.     al_get_display_width (Display) / S_WIDTH,
  17.     al_get_display_height (Display) / S_HEIGHT
  18.   );
  19. { This will aply the matrix to the current active bitmap.  Everything draw
  20.   to such bitmap will be affected by this matrix.  Don't need to call this
  21.   each frame. }
  22.   al_use_transform (fMatrix);
  23.   ...
  24.  
The background console can be avoided compiling with the "-WG" option ("Windows GUI application").
« Last Edit: July 11, 2017, 10:27:55 am by Ñuño_Martínez »
Are you interested in game programming? Join the Pascal Game Development community!
Also visit the Game Development Portal

turrican

  • Full Member
  • ***
  • Posts: 133
  • Pascal is my life.
    • Homepage
Re: Graphics Contest 2017
« Reply #142 on: July 12, 2017, 03:37:59 pm »
Here is my little project :

https://github.com/turric4n/SimpleZGL/tree/master/examples/StarfieldShooter

Here is the binary for Windows : http://www.turric4n.com/static/StarShooter_i386-win32.zip

Simply game developed for my little daughter.

Features :

Video - Full-Screen OpenGL or DirectX 9
1% CPU usage 5% GPU
Animations
Mouse Input
Collitions
Cross-Platform and MultiOS

Well done! I've played it with Wine on Ubuntu and works fine. The only thing I see is that you maybe can center the ball when you do the click, simply add an offset so when you click it is displayed centered, not from the left corner. Another thing is that there's some flickering of the balls when there are more than one at the same time, but I can't say if it's a problem with Wine or the application itself.

Thank you very much! I will implement the improvements that are you suggesting :)

Here is my little project :

https://github.com/turric4n/SimpleZGL/tree/master/examples/StarfieldShooter

Here is the binary for Windows : http://www.turric4n.com/static/StarShooter_i386-win32.zip

Simply game developed for my little daughter.

Features :

Video - Full-Screen OpenGL or DirectX 9
1% CPU usage 5% GPU
Animations
Mouse Input
Collitions
Cross-Platform and MultiOS

Doesn't run on Win10 Pro x64 (1703). Just Black Screen with flickering mouse pointer.
Compatibility mode doesen't help except flicking mouse pointer.

 %) Thanks for your feedback. What GPU are you using?

turrican

  • Full Member
  • ***
  • Posts: 133
  • Pascal is my life.
    • Homepage
Re: Graphics Contest 2017
« Reply #143 on: July 12, 2017, 03:41:00 pm »
For Ubuntu I downloaded the PPA containing 5.2 and the game runs fine.

For Wine I downloaded the 5.2.0 dll and put into the exe folder, then run with Wine and works fine also. If you download a newer version like 5.2.x there are more dependencies that doesn't come with Windows, something related with C++. These DLL doesn't come with the Allegro download, must be downloaded in another place.


I had the same problem and I solved with the correct DLL 5.2 .


Pascal

  • Hero Member
  • *****
  • Posts: 911
Re: Graphics Contest 2017
« Reply #144 on: July 12, 2017, 04:20:19 pm »
%) Thanks for your feedback. What GPU are you using?
Build in Intel (i7 6700K -> HD 530)

Just tested on an other machine. With HD 4600 it works. Nice  :D
laz trunk x64 - fpc trunk i386 (cross x64) - Windows 10 Pro x64 (2004)

turrican

  • Full Member
  • ***
  • Posts: 133
  • Pascal is my life.
    • Homepage
Re: Graphics Contest 2017
« Reply #145 on: July 12, 2017, 05:01:07 pm »
%) Thanks for your feedback. What GPU are you using?
Build in Intel (i7 6700K -> HD 530)

Just tested on an other machine. With HD 4600 it works. Nice  :D

It's strange about Integrated Intel 530. I will check with my Surface PRO 3 that has an integrated graphics too. Thanks for your efforts ;)

Pascal

  • Hero Member
  • *****
  • Posts: 911
Re: Graphics Contest 2017
« Reply #146 on: July 12, 2017, 11:17:40 pm »
Here you can see some progress on my presentation prog: The sizeable SlidesView:
laz trunk x64 - fpc trunk i386 (cross x64) - Windows 10 Pro x64 (2004)

Ericktux

  • Full Member
  • ***
  • Posts: 207
Re: Graphics Contest 2017
« Reply #147 on: July 14, 2017, 07:08:08 am »
hi my friends, this is my videogame incomplete Years ago, called "Mario cronch"  :D
I share the sources  :)

https://www.mediafire.com/?8fot8akdaazpmwo (project)

turrican

  • Full Member
  • ***
  • Posts: 133
  • Pascal is my life.
    • Homepage
Re: Graphics Contest 2017
« Reply #148 on: July 14, 2017, 09:25:05 am »
hi my friends, this is my videogame incomplete Years ago, called "Mario cronch"  :D
I share the sources  :)

https://www.mediafire.com/?8fot8akdaazpmwo (project)

Hi!

I saw your code and is very chaotic :)

Recomendations :

   - Avoid timers! Just one timer for the main loop. Usage more than one timer points to bad/faulty architecture design.
   - Resources are inside the PE externalize assets!
   - Canvas and GDI is very slow CPU and consumer, try to use another canvas implementation or move to an hardware accelerated backend. Ex. OpenGL.

Just my 5 cents.

Handoko

  • Hero Member
  • *****
  • Posts: 3759
  • My goal: build my own game engine using Lazarus
Re: Graphics Contest 2017
« Reply #149 on: July 18, 2017, 07:49:08 am »
Some improvements have added to Furious Paladin:
- 18 July 2017  - Double sized window on large screen
- 18 July 2017  - Use ctrl keys instead of shift keys
- 10 July 2017  - Use 60 fixed fps

On Windows, the shift key detection behave differently than on Linux. So I changed it to use ctrls instead of shifts. The game does not use arrow keys for playing, because it plays better using 2 hands.

For Linux users, you need to install liballegro5.2 package. For Windows users, the needed library files are included in the download.

On double sized display mode, the images do not look good. It is understandable because it used 2x scale up. Nothing much I can do, because the size of paladin images I got are too small.

http://forum.lazarus.freepascal.org/index.php/topic,35313.msg252085.html#msg252085

 

TinyPortal © 2005-2018