Quote- The game you submit must be a new game, not a work in progress game or an already made game.Ahhh... this can't be happening to me! %) Maybe, a game started on 28.12.2017 is still eligible? :-[
If it is not released yet you can.Oops, I've just re-read the announcements and saw my new game doesn't qualify (while retro-style, still much "newer" than 16-bit Sega)... Anyway, thumbs up!
please share this contestDone:
- The game you submit must be a new game, not a work in progress game or an already made game.I think i do understand what you meant there but for the sake of clarity: so, remakes (of existing (retro-)titles) are not allowed ? What about taking an existing game-concept and give it a twirl and/or twist ?
- 2D games onlyThere are (retro) 3D games even in 8 bit era (wireframed if hardware really lacked for example). 2.5D was also very popular. Did you perhaps meant: Game is not allowed to depend (or make use of) 3D hardware (acceleration) ?
- This year topic is 'retro games', so the graphics and music of the game must be retro style https://forum.lazarus.freepascal.org/index.php/topic,39495.msg271263.html#msg271263
I'm in! :)- This year topic is 'retro games', so the graphics and music of the game must be retro style https://forum.lazarus.freepascal.org/index.php/topic,39495.msg271263.html#msg271263
Graphics, audio.. can be third party or only own?
Thank you for the explanations Lainz.
They made things a whole lot more clear (and quite frankly i forgot to think about videotaping :-[).
I'm in! :D :D :D :D :D
Hi, this is my first submission for the contest, remember that you can submit any number of games (In my case maybe is the first and the last, who knows?)
The goal is to make circles, because all we need to ensure our mouse is working well and become a 2D artist some day, maybe not but =)
This remembers me some old games that comes on CD cases of magazines, single goal games that worth nothing.
The screen resolution of the game is 640x480 to keep it retro, but you can maximize the window if you want. And hopefully the graphics are retro enough, if not please tell me and I will try to fix that!
Instructions:
- Compile
- Hold down the mouse button and try to draw a circle, if it matches it adds score, in the top left corner of the window.
Thanks to a JSFiddle for the calculations of 'isCircle' function, converted from JavaScript to Pascal.
And bugs...
- If you draw an horizontal line of exactly 1 of width between two of the grid points it thinks is a circle also!
This game is to break the ice, well if there is some Ice on my country (nothing but the summer sun), so the good games will be these you make.
Tell your friends about the contest!
Edit:
To make my game more retro I'm removing the antialias lines, change this line:
Bitmap.DrawLineAntialias(x, y, x2, y2, BGRA(last_color.red, last_color.green, last_color.blue, SHADOW_STEP * i), 2);
To this:
Bitmap.DrawLine(x, y, x2, y2, BGRAWhite, True);
It's very well made example! But canvas is really CPU bond. Would be nice doing this using OpenGL :)
It's very well made example! But canvas is really CPU bond. Would be nice doing this using OpenGL :)
Thanks!
I don't know how to do this with OpenGL, in fact there are just a few lines drawn and is that thing I don't know how to do. It is not very well optimized yet, but on i7 4790 it draws everything in less than 3ms, and the timer is for 15 ms, so is enough time to render. I need to try this on a notebook or something slower to see.
I'm going to port your example to my framework. It will be a nice example to include :)
I'm going to port your example to my framework. It will be a nice example to include :)
Thanks, what's your framework?
I added your circle detection and line drawing code.
Here is the code : https://github.com/turric4n/SimpleZGL/tree/master/examples/Lainz_Circle
Here is precompiled binary for Win32 : http://www11.zippyshare.com/v/jqIBtyji/file.html
For more inspiration a long overdue block dropping game :)
http://wiki.lazarus.freepascal.org/Petris
Deadline:
- 6 months from now, until 31 June 2018. No exceptions. On August 2018 we will vote for the best game.
Deadline:
- 6 months from now, until 31 June 2018. No exceptions. On August 2018 we will vote for the best game.
if Pos('31 june',lainz.text)>0 then Exception.create('incompatibility found: Gregorian calendar and lainz date system.');
1% CPU on my machine
For more inspiration a long overdue block dropping game :)
http://wiki.lazarus.freepascal.org/Petris
Thanks. I love Tetris, I'm good at it, and I can't say that for another games like First Person Shooters =)Glad you liked it. I only come to 20K-ish :)
Added to the retro category. Also I've added turrican conversion of my code since the rules say nothing about conversions =)
Edit: here is my High Score =) 11:48251
Interesting. I lost some Commodore 64 games, I made many yearas ago, in my tapes.
Maybe it's time to revive them in Lazarus. :D
Interesting. I lost some Commodore 64 games, I made many yearas ago, in my tapes.
Maybe it's time to revive them in Lazarus. :D
If you need to rip audio from commodore 64 and use it from code, I can help you.Hopefully you are aware that most (if not all) sid related music is made out of code. So unless you have a sid-emulator and 6502 emulator, there is hardly any use to 'rip' those music. Yes, i am aware of existence of sid-players but not aware of any written in Pascal.
You can use libsid from pascal without problems. I do.If you need to rip audio from commodore 64 and use it from code, I can help you.Hopefully you are aware that most (if not all) sid related music is made out of code. So unless you have a sid-emulator and 6502 emulator, there is hardly any use to 'rip' those music. Yes, i am aware of existence of sid-players but not aware of any written in Pascal.
Fortunately my games had very simple sound. They were very simple. Anyway I have no idea how to create the sound in Lazarus.Interesting. I lost some Commodore 64 games, I made many yearas ago, in my tapes.
Maybe it's time to revive them in Lazarus. :D
That's very cool! If you need to rip audio from commodore 64 and use it from code, I can help you.
Fortunately my games had very simple sound. They were very simple. Anyway I have no idea how to create the sound in Lazarus.Interesting. I lost some Commodore 64 games, I made many yearas ago, in my tapes.
Maybe it's time to revive them in Lazarus. :D
That's very cool! If you need to rip audio from commodore 64 and use it from code, I can help you.
In fact, I have no idea how to start developing my game. I don't know What libraries to use, or what emulator, or just Canvas methods.
Petris is great on the Mac, too.Wauw nice.
I'd like to enter something - no idea what yet though!
I don't really want the hassle of building any sort of installer - especially for Windows - is it possible to distribute a game as an executable alongside the necessary libraries and resources in a single folder if using any of the mentioned libs?
I think I'll stick with Allegro.pas after all, it seems to work just fine (although the instructions on the wiki http://wiki.freepascal.org/Allegro.pas_tutorial_0 aren't quite right/up to date for Linux). Time for some thinking while I cobble together a framework/state machine...I know documentation isn't complete but I'm still working on Allegro.pas. Of course, I'll be glad to help answering any question here or at Pascal Game Development forum.
I think I'll stick with Allegro.pas after all, it seems to work just fine (although the instructions on the wiki http://wiki.freepascal.org/Allegro.pas_tutorial_0 aren't quite right/up to date for Linux). Time for some thinking while I cobble together a framework/state machine...
You need Allegro (http://liballeg.org/) development libraries (the ".a" ones) to compile it statically. It is possible, but Allegro.pas expects it dynamically linked so you'll need to modify Allegro.pas to accomplish it. I never tried so I have no idea how hard it can be.I know documentation isn't complete but I'm still working on Allegro.pas. Of course, I'll be glad to help answering any question here or at Pascal Game Development forum.
Well I do have a question you might be able to help with :D - how would I statically link so I could just distribute a single executable with assets etc? I tried fpc -k-static (as per this thread: http://forum.lazarus.freepascal.org/index.php?topic=15712.0) but it throws out an error message
/usr/bin/ld: cannot find -lallegro
If I just compile and run my program normally everything works fine. I'm not too familiar with the compiling/linking business!
This probably isn't the right thread to ask this question so feel free to point me to the right place :DA new thread here or at PGD (http://www.pascalgamedevelopment.com/) should be the best option. ::)
You need Allegro (http://liballeg.org/) development libraries (the ".a" ones) to compile it statically. It is possible, but Allegro.pas expects it dynamically linked so you'll need to modify Allegro.pas to accomplish it. I never tried so I have no idea how hard it can be.I have the 'dev' libraries installed already and it doesn't work.
If I use the default dynamic linking, that means the user will have to install allegro themselves on Linux (not a big deal except the version in their repo may not be up to date)
but what about on Windows - is an installer needed or can the libraries just be shipped in the application directory?
So, download sources and compile yourself. Changing the CMAKE configuration you can build the libraries the way you want (static, dynamic, debugging, monolithic...) but you would need some time and tries to learn how to do what you want.You need Allegro (http://liballeg.org/) development libraries (the ".a" ones) to compile it statically. It is possible, but Allegro.pas expects it dynamically linked so you'll need to modify Allegro.pas to accomplish it. I never tried so I have no idea how hard it can be.I have the 'dev' libraries installed already and it doesn't work.
This will be my "beautiful" retro entry :)
https://imgur.com/a/SeVyt
Does the 'modern game' have to be a remake of an old game just with modern graphics etc or does it encompass any type of game? I've got an idea but it's not based on an old game AFAIK.
Atom or VS Code are really good, also your game is looking good =)
Atom or VS Code are really good, also your game is looking good =)
At the risk of going off-topic :) the symbol browsers for Pascal seem to be broken in all the editors (Atom, VS Code, Geany and gEdit) on my system - they display only half the procedures and functions in most source files. I guess they all rely on ctags or something but I don't know enough about that to fix it.
Yes, I've used it before for GUI apps. I've had some issues getting the latest version of fpc installed (the repo version is too old) and get the feeling that installing the sources and Lazarus now might break something!
Haha, great name, it looks fine and don't forget poor people with Windows later :)
Btw. my game is crashing on Linux even under WINE :)
I just wonder why it's crashing WINE :)Because Wine is really no panacea :) And personally some time ago I found that my distro repository had a very outdated version of Wine, so I got the freshest version from the WineHQ and it worked better. Compare the version you're using with the upstream.
Iteration isn't good way if you have 1000 bullets and 1000 entities so it's 1 000 000 collision checks every frame.
In my implementation it's just 1000 checks, it's something like spatial partition (https://conkerjo.wordpress.com/2009/06/13/spatial-hashing-implementation-for-fast-2d-collisions/).
Also I can get all objects on screen instead of iterate whole lists.
Isn't this repeated setlength too costly? There is a better solution?
The EntityManager would be faster if you used TfpList to hold pointers to all your entities, rather than using a dynamic array.
..
EntityManager is list of pointers with memory allocation for records, it's probably done in similar way as TfpList.
// Your code
ACCESS - TEST: [1000 items]
TPFList: 0,0186982405558806 ms
ACCESS - TEST: [1000000 items]
TPFList: 29,1471465876548 ms
// My code
ACCESS - TEST: [1000 items]
TPFList: 0,00572563366190435 ms
ACCESS - TEST: [1000000 items]
TPFList: 19,3333494243441 ms
Anyway, "for pi in pitemFPList do" instead of "pitemFPList.List[ i ]". Why use this slower way? It makes biggest difference in benchmark.
Some disappointed with SDL2. Rendering with SDL_RenderDrawPoints() is as slow as using SDL_RenderDrawPoint() (And I don't get this works properly http://forum.lazarus.freepascal.org/index.php/topic,40526.msg280031/topicseen.html#new ).
It gives me just 15 FPS in my Corei7 3.4GHz - RAM 8GB. :-[
Some disappointed with SDL2. Rendering with SDL_RenderDrawPoints() is as slow as using SDL_RenderDrawPoint() (And I don't get this works properly http://forum.lazarus.freepascal.org/index.php/topic,40526.msg280031/topicseen.html#new ).Use Allegro.pas. ;D
It gives me just 15 FPS in my Corei7 3.4GHz - RAM 8GB. :-[
Some disappointed with SDL2. Rendering with SDL_RenderDrawPoints() is as slow as using SDL_RenderDrawPoint() (And I don't get this works properly http://forum.lazarus.freepascal.org/index.php/topic,40526.msg280031/topicseen.html#new ).
It gives me just 15 FPS in my Corei7 3.4GHz - RAM 8GB. :-[
Is like drawing a single pixel?
And your application code is slower than drawing with TCanvas on a regular Form?That was the question I was doing too. I wanted to do a comparison, but after improving the performance of my program I forgot. I will try to compare just for information.
If not, at least is not that slow =)
Which one?
There is one global minor problem with all game jams, people are lazy download game files.
They prefer to run them via browser (Unity, html5, Java, Godot), which is logical :)
A downloader UI can do the trick, just download a small .exe (few kb) that gives you a nice downloader, that works also as menu to launch, for each project.
They called it "Resurrection Hack (https://tins.amarillion.org/resu18/rules/)". It is an Allegro jam, and you see it is quite improvised.Which one?
Yes, we want to know =)
A downloader UI can do the trick, just download a small .exe (few kb) that gives you a nice downloader, that works also as menu to launch, for each project.
Don't trust any downloader! Never :)
*.exe files are blocked by browsers, security programs + firewall in case of downloader. So user get 3x warning which increase paranoia :)
I dont like installers for small apps or games, just packages like rar or zip are fine.
Very interesting, thanks Lainz ! :)
Hello :)
I made a game for the contest: 'Fire Wire'.
It consists in finding the points of a drawing in the right order. The direction of the next point is indicated by a line on the mouse cursor.
It's a peaceful game: no kill, no violence, ideal for children. Actually there are 20 levels created with a level editor specially made for the game.
It use TOpenGLContext and BGRABitmap for graphics, and OpenAL for sound. If OpenAL is not installed on your system, there is no sound but game will work.
Compiled on Win10. Please can anyone compile and test it on Linux and Mac ?
Thanks in advance for testing it ! :)
Source : www.lulutech.fr/Logitheque/FireWire/FireWireGameSrc.7z (http://www.lulutech.fr/Logitheque/FireWire/FireWireGameSrc.7z)
Executable for Windows www.lulutech.fr/Logitheque/FireWire/FireWireGame_WinExe.7z (http://www.lulutech.fr/Logitheque/FireWire/FireWireGame_WinExe.7z)
Very artistic lainz :)
Just downloaded Lainz Wave Demo.
Tested on Windows 10, so much bright lights flickering like mad, be cautious if your sensitive to this, I suspect a bug, so a fix needed v quick......
good project Lainz, full colors !
Adding doublebuffered to oncreate event does solve the problem:)
I will finish my game to the deadline.
Btw. 20.4. starts Ludum Dare 41 - https://ldjam.com/
I made a game for the contest: 'Fire Wire'.
...
Compiled on Win10. Please can anyone compile and test it on Linux and Mac ?
I made a game for the contest: 'Fire Wire'.
...
Compiled on Win10. Please can anyone compile and test it on Linux and Mac ?
I can't compile it on Lazarus 1.8.0 64-bit Gtk2 Linux FPC 3.0.4. I got an compile time error:
OGLCScene.pas(31,3) Fatal: Cannot find UTF8Utils used by OGLCScene.
Where can I get UTF8Utils?
That shouldn't be the solution. I mean, AFAIK FPC is case insensitive when looking for units so it should find "utf8utils" despite the letter casing and the operating system. May be you configured the project in a way it is case sensitive? I'm not sure it is possible though.I made a game for the contest: 'Fire Wire'.
...
Compiled on Win10. Please can anyone compile and test it on Linux and Mac ?
I can't compile it on Lazarus 1.8.0 64-bit Gtk2 Linux FPC 3.0.4. I got an compile time error:
OGLCScene.pas(31,3) Fatal: Cannot find UTF8Utils used by OGLCScene.
Where can I get UTF8Utils?
Compiled on 1.8.2 Windows, and works fine.
Edit: That file comes with the game sources, units\UTF8utils.pas
But it's mixed case, maybe on Linux the IDE or Compiler can't find that.. Just try renaming it or changing the case in uses.
UTF8Utils <> UTF8utils
Adding doublebuffered to oncreate event does solve the problem:)
Yes, that happens on Windows, with themes not enabled, but on Windows 10 you can't disable themes, so what's the real problem? :'(
I mean, AFAIK FPC is case insensitive when looking for units so it should find "utf8utils" despite the letter casing and the operating system. May be you configured the project in a way it is case sensitive? I'm not sure it is possible though.
For me too, or use Paint instead of Invalidate in OnTimer-Event.What i do in nxPascal demos is initialize graphics in form's onPaint event directly, and then disable the onPaint from triggering again. Then you don't need code in onCreate or a separate timer.
My filenames are always in lowercase, my UNIT names are CamelCase though. And they work both Linux and Windows. That's why I asked. :oI mean, AFAIK FPC is case insensitive when looking for units so it should find "utf8utils" despite the letter casing and the operating system. May be you configured the project in a way it is case sensitive? I'm not sure it is possible though.
Linux is case sensitive, your suggestion that FPC should find the lower case sounds a solution. But it is not a good solution. I personally prefer CamelCase instead of lower case. For example:
sysexecutable.pas vs SysExecutable.pas
const {$IFDEF BGRABITMAP_RGBAPIXEL} DefaultFont: TGuiFont=( FontName:''; FontHeight:12; Style:[];FontColor:(red:255;green:255;blue:255;alpha:255); OutLineColor:(red:0;green:0;blue:0;alpha:0); OutLineWidth: 1.0; ShadowColor:(red:0;green:0;blue:0;alpha:0); ShadowOffsetX:0; ShadowOffsetY:0; ShadowRadius:0); {$ELSE} DefaultFont: TGuiFont=( FontName:''; FontHeight:12; Style:[];FontColor:(blue:255;green:255;red:255;alpha:255); OutLineColor:(blue:0;green:0;red:0;alpha:0); OutLineWidth: 1.0; ShadowColor:(blue:0;green:0;red:0;alpha:0); ShadowOffsetX:0; ShadowOffsetY:0; ShadowRadius:0); {$ENDIF}
232 Threads not supported
Thread management relies on a separate driver on some operating systems (notably, Unixes). The unit with this driver needs to be specified on the uses clause of the program, preferably as the first unit (cthreads on unix).
Not sure if i spent more time making or playing it, but here's first release anyway ::) Hope it compiles and stuff:
https://1drv.ms/u/s!AkA8eob3K73BhAP1e-HadvLsLmZF
I use 64-bit compiler, Win10 and Lazarus 1.6.2 (i know it's propably outdated).
Back on topic:
I want to participate, and I actually have two game ides for it, but I have to work in a game I did for a customer (professional, yay! ;)) so no sources can be published (yet, may be in some years), so I can't participate (see rules (https://forum.lazarus.freepascal.org/index.php/topic,39495.msg271236.html#msg271236)). May be I can after this game is finished, since the date is July 31.
Anyway I think I'll post updates here, can I?
Ok, that's enough incompatibility... Updated Lazarus and replaced file in OneDrive.
- It complained about LazFileUtils in files that had "uses FileUtils", which no longer exists.
- I set Target OS to just (Default), so i hope it checks your installation and chooses automatically, at least for me that works.
- Worth mentioning, some textures are 2k resolution, and ship has roughly 5000 vertices. It's a performance test at the moment too so i didn't want to scale down. I never dip below the 60 fps. Also the physics don't have actual engine, i just remembered how i did collisions in demo and it seems to still work. It pushes objects away from eachother in tiny steps, sometimes multiple times per object per frame.
Anyway, more games? :D
yes Circular, it is a font problem.
...
I updated the code in the previous link.
I hope... :D
Hello Lulu.Circular, it's a good idea ! fixed in the code.
About the font problem, I don't know if I have the latest version but for me it crashes because Font.Name = ''. I solved it by adding a check in GuiFont() and putting 'Arial' in this case.
About the red-blue swap, here is it can be fixed it in oglcTexture.inc (note also the use of LineOrder):
Code: Delphi [Select]
function TTextureManager.InitFromBGRABitmap(aIma: TBGRABitmap ): PTexture;
var dup:TBGRABitmap;
glFormat: GLenum;
begin
dup := aIma.Duplicate as TBGRABitmap;
if TBGRAPixel_RGBAOrder then
glFormat := GL_RGBA
else
glFormat := GL_BGRA;
if dup.LineOrder = riloTopToBottom then
dup.VerticalFlip;
...
By the way, nice OGLC library :)Thanks !
beign capables of learning and making choices
Here is my contribution to the contest :)Had a quick peek; seems some files are missing ::)
Had a quick peek; seems some files are missing ::)
Good, I can't beat the first level as always.. :D
Hello people!
I wanted to join the contest, but I will not be able to finish my project on time. And if a lot is done, there is still quite a lot to do. Therefore, so far I will not publish my project, but only describe what it was meant to be and what it is now, show some pictures and videos. I have been left with no more work for a month, so when I finish it, I will publish the project.
This project was initially meant to be just a simple, small windowed application, allowing to check a certain effect on retro 2D platform games. I'm talking about multi-layered levels where the hero can walk on every layer. Layers were to serve as a visual effect of depth (as a parallax scrolling), as well as a usable surface. This greatly expands the functionality of the levels, giving the opportunity to create not only large but also deep levels, after which movement is more difficult than after the one-layered (levels become a three-dimensional maze).
The parallax scrolling test and the visual effect of the transition between layers was finished long ago. Video presenting such functionality is available here: Deep Platformer – layers test (https://4programmers.net/Forum/Download/19440) (quality is not excellent—I had a problem with setting the recorder). But this effect could be used somewhere… So I decided to create a simple platformer using the above-described functionality (and written code of course).
Many times I saw newbies trying to create games without additional libraries (in a window environment), without hardware acceleration, so I decided that I would try to make the game only with the help of a standard form and basic bitmap class. The best it can be. I love retro games and consols, especially NES, so I decided to create this demo in a similar way as in the old days. No semi transparency, no floating point numbers to describe motion, game engine based on frame counting, not based on delta, etc. Going to be fun. I took TForm, TBitmap and wrote the whole code from scratch, each piece by myself. I did not design the code, I just opened the IDE and started writing.
I have determined that the game should contain:
- pixelated graphics (very low resolution),
- Limbo-style level design,
- simple animated intro, on the shape of NES games,
- simple menu, waiting for a key press and start the game,
- story consisting of short tutorial and several worlds,
- each world composed of title screen and several levels (each world in different background color),
- levels equipped with gateways to change the layer (to deeper or nearer),
- levels equipped with gateways to change the gravity direction (to up or down),
- hero as a small, animated square, able to walk and jump,
- moving fireflies to collect,
- animated outro and staff screen,
- fully functional debug mode, that allows to check the operation of each part of the game,
- easter eggs and a lot of references to old times,
- and more, more options.
The specifics of this project preclude calling it a full-fledged game, which is why I call it simply a technological demo. The lack of hardware acceleration is a big limitation, so this project will always be just a test. Therefore, the project code is not particularly universal or extensible.
Currently, the intro and main menu are ready, the logic associated with the hero and levels is also finished (hero control, fireflies movement, level and its content rendering, layer and gravity handling, collisions with the environment), as well as a fully functional debug mode, command line support and more. However, the story is not ready yet, neither the target worlds nor levels, nor the code responsible for traveling around them.
Currently, the project consists of 33 units, about 10.000 lines of code. The project also includes four console tools that allows to generate images of level layers, as well as binary files containing data about fonts, levels and title screens. There is still a bit of code to write, create binary files with title screens of the worlds and binaries with levels, fill some text files with information about this project.
Here is a recording containing a intro and menu: Deep Platformer – intro and main menu (https://4programmers.net/Forum/Download/19767) (menu level is not finished).
Few screenshots in the attachments.
Please submit your game even if time has ended, you put a lot of interest on it.
In fact the purpouse of the contest is not about the winner, but sharing code, ideas and our works to the other Pascal programmers.
The feedback is more important than the winner, I think.
One nice example is C-evo game which is pretty complex game which can be played for many hours. Yes, you can check source code how more complex games can be done even that the game is pretty old.
Any news about Game Contest 2018?
I missed this contest but I hope I can participate in the next contest. What would be the topic of Game Contest 2019? Text-mode (unit crt) games, educational games, Android games? Tell me please, so I can be well prepared earlier.
Hello,Then I'll not ask about 48/72 hours contests. ;D
I think 2-3 months is too short to imagine and make a game, or it will only be a copy of an existing one...
Gain more skills in game programming and create an original game are both important for me.