English Amiga Board


Go Back   English Amiga Board > Coders > Coders. General > Coders. Releases

 
 
Thread Tools
Old 29 May 2014, 21:27   #1
balrogsoft
Registered User
 
Join Date: May 2006
Location: Spain
Age: 36
Posts: 42
Need testers for my game engine.

Hello.

I'm working on a system friendly game engine for Amiga coded in C, so don't expect to run it on low end Amigas, some acceleration will be need. The engine also works as an abstraction layer between the system and the game, so it could be ported later to other systems, like Android or iPhone, one source code, multiple platforms supported. On the Amiga side, i have special attention to make it working from AmigaOS 2.0 to the new gen system like MorphOS, the same executable runs fine on all systems. I need to test it on any classic Amiga, and AmigaOS 4 systems, or MorphOS systems. I have tested it succesfully on my MacMini with MorphOS 3.5, EUAE with different configurations, ECS with KS 2.0, ECS with KS 3.1, AGA with KS 3.1, and my Amiga 600 with ACA 630@25mhz, and it works perfectly with the same executable.

The source code will be published soon, but I want to make some testings before publish it, it will help any coder to make games for Amiga, and future portings of this engine to commercial platforms maybe helps to brings some games to our favourite platform.

The engine have this structure:

FrameBuffer - Initialize screen, and manage screen colors and double buffer.
Bitmap - Load iff bitmaps, create bitmaps, generating bitmap masks.
GraphicContext - Performs graphical operations on bitmap or frame buffer, gfx primitives, chunky 2 planar, blitting, ...
InputDevice - Handle input devices, only keyboard is supported at the moment.
Music - Play Protracker mods using ptreplay.library and ptplay.library
Sprite - Software sprites rendering, handle sprites sheets, generate sprites masks, ...

I have two example of my engine, a vertical scroller with a sprite, and a chunky 2 planar example, they don't require AGA chipset, only ECS. Chunky 2 planar uses WritePixelArray8() for systems with gfx cards, and for native chipsets it uses Kalms c2p code.

To have music working you will need these libraries:

PTPlayLibrary.lha for 68k and MOS

ptreplay66 for 68k OR
ptreplay_ahi


If you could try it, reporting how they worked, and what is your system specs, It will help me a lot.

You can download the examples here:
RGE_Examples.lha

Thanks in advance.
balrogsoft is offline  
AdSense AdSense  
Old 29 May 2014, 22:59   #2
tolkien
AmigaMan

tolkien's Avatar
 
Join Date: Oct 2012
Location: Castro Urdiales/Spain
Posts: 471
Balrog, I`ll try It tomorrow in my A1200 060.
My Morphos machines are dead so no help there.

Bien tio, mola verte en accion!
tolkien is offline  
Old 31 May 2014, 00:40   #3
Franchute13
Registered User
Franchute13's Avatar
 
Join Date: Feb 2013
Location: Argentina
Posts: 235
Hello.
My system is: Amiga 1200, 3.0 ROM, 8MB fast.
results:

EngineScroll
Pal and Ntsc Res Low functioning properly.
Low Res Laced, in the bottom of the screen flashes.

Engine C2p works correctly in all modes
Franchute13 is offline  
Old 31 May 2014, 10:44   #4
tolkien
AmigaMan

tolkien's Avatar
 
Join Date: Oct 2012
Location: Castro Urdiales/Spain
Posts: 471
In my A1200 060 rom 3.1 the Scroller has flashing/corrupted graphics at the bottom of the screen every X seconds in LowRes PAL.
In NTSC seems ok but I guess It´s because the bad gfx are in a no visible area of the screen.
In laced modes as franchute said there are bad gfx all around.
Sound is ok.

The cp2 engine seems ok in all modes.
tolkien is offline  
Old 31 May 2014, 12:32   #5
daxb
Registered User
 
Join Date: Oct 2009
Location: Germany
Posts: 1,974
When I start EngineC2P then a empty screenmode requester appears. After click on OK this error message: Can't initialize inputdevice.

When I start EngineScroller then a empty screenmode requester appears. After click on OK this error message:
Can't initialize framebuffer.

System: A1200 040 AGA OS3.1
daxb is online now  
Old 01 June 2014, 12:15   #6
balrogsoft
Registered User
 
Join Date: May 2006
Location: Spain
Age: 36
Posts: 42
Hello.

Thanks you for test my game engine, although I didn't found any problem, it's clear now that more working is needed on my code, I will check where is the problem, thanks you again, your information will help me to solve these problems.

Quote:
Originally Posted by daxb View Post
When I start EngineC2P then a empty screenmode requester appears. After click on OK this error message: Can't initialize inputdevice.
It shows a inputdevice fail, but I'm pretty sure that is a framebuffer fail, these error messages aren't handled properly on this example.

To initialize the framebuffer, the screen size are passed to framebuffer, then it open an ASL screen requester showing any screen mode that fits in width and less than 8 bits depth so it should show any screen of 320 width pixels with 256 colors or less. Any screen with more colors won't be showed on the screen requester.

If this requirements fails, it won't show any screen mode, but it's very strange, it should show at least a lowres PAL or NTSC mode.
balrogsoft is offline  
Old 14 June 2014, 12:22   #7
balrogsoft
Registered User
 
Join Date: May 2006
Location: Spain
Age: 36
Posts: 42
Hello.

I just updated my engine, I have used a different aproach to handle screens, now it uses BestModeID function to find a compatible screen mode, and only uses ASL requester if BestModeID returns an invalid mode.

A new demo to test chunky modes was added, it's a small raycasting engine, it uses EHB mode and dithering to add some shadows to the rendering. I got 8-12 fps on my Amiga 600 with ACA 630@25mhz.

RGE_Examplesv2
balrogsoft is offline  
Old 14 June 2014, 13:29   #8
daxb
Registered User
 
Join Date: Oct 2009
Location: Germany
Posts: 1,974
The demos are start without error message or requester. EngineRaycasting gives 17-26 FPS on 1240/40. EngineScroller works fine except sometimes (maybe regular) the upper "line" is drawn at the bottom "line" too. I guess also regular the bottom "line" gives gfx flicker sometimes.
daxb is online now  
Old 14 June 2014, 20:58   #9
balrogsoft
Registered User
 
Join Date: May 2006
Location: Spain
Age: 36
Posts: 42
Quote:
Originally Posted by daxb View Post
The demos are start without error message or requester. EngineRaycasting gives 17-26 FPS on 1240/40.
Nice, it works as expected. The screen requester only is shown if BestModeID returns an invalid id.

Quote:
Originally Posted by daxb View Post
EngineScroller works fine except sometimes (maybe regular) the upper "line" is drawn at the bottom "line" too. I guess also regular the bottom "line" gives gfx flicker sometimes.
This example is a little more tricky, both examples uses the ScrollVPort trick to make double buffering and these buffers are doubled in height in scroller example to get the scroll working at decent speed. I will check again on EUAE with different configurations.

But it seems that this version works better, I will start porting to Android very soon.

Thanks you for your report!
balrogsoft is offline  
Old 14 June 2014, 21:54   #10
Cowcat
Registered User
 
Join Date: Apr 2013
Location: Mallorca
Posts: 406
Hola !

Testing on A1200 with BVision. Those programs from first pack seem to work ok, besides little flickers here and there as comented before (only tested for gfx cards), but did notice that chip memory didn't fully recover. Found that if you don't use ptreplay library (lazy of me), some graphic issues with mouse pointer sprite appear after running programs from Example 2 pack.

Still have to test with TV set
Cowcat is offline  
Old 15 June 2014, 13:01   #11
tolkien
AmigaMan

tolkien's Avatar
 
Join Date: Oct 2012
Location: Castro Urdiales/Spain
Posts: 471
Hola.

The RayCasting engine works fine. It runs at 25/35 fps in my A1200 060.

The scroll engine has the same gfx glitches at the bottom of the screen.
tolkien is offline  
Old 16 June 2014, 23:54   #12
balrogsoft
Registered User
 
Join Date: May 2006
Location: Spain
Age: 36
Posts: 42
Thanks you guys for your reports. I have fixed all memory leaks on Raycasting engine, now this project compiles with vbcc also (the vbcc version seem to work slighty faster than sasc), and I have added another solution for double buffering which uses ks 3.0+ (using ChangeScreenBuffer function).

I didn't found the reason of graphic glitches at the bottom of screen on scroller example, but I found other screen glitches, these glitches are fixed now.

I will continue working on scroller to fix the glitches.
balrogsoft is offline  
Old 22 June 2014, 18:25   #13
Michael
A1260T/PPC/BV/SCSI/NET

Michael's Avatar
 
Join Date: Jan 2013
Location: Moscow / Russia
Posts: 641
First of all, a very nice engine, can't wait to see the source ;-)

Personally, for me the 1st stroller worked best and allowed to choose any screenmode I like.

Perfect under CGX 320x200@100Hz, 320x240@100Hz, 320x256@100Hz
Only problem if ship is at bottom line, then it drops a frame (flickers) once every second.
Works ok in PAL too, but a bit slower compared to CGX. Also the bottom screen 16pxls get trashed every full screen scroll!

Pal 320x512 fails, and CGX 320x512 gave a double screen copy type thing.

The updated version 2 fails to start under my system, looks like it's opening a DBLPAL screen, and I can't test that at the moment. And I can't get it to work normal PAL or CGX without a requester.
Running it without startup works in PAL, there is a green ~4pxl line poping up at the bottom every now and then.

C2P example works ok under CGX, the colours are supposed to be odd?
Does not run in PAL with a loaded system, but works ok without startup.

Wolf engine, works only without startup in PAL, otherwise nothing. Give us requester!!!
Almost constant 51 FPS! (in PAL?) drops down to 26 if you are against the wall. (unexpected! usually it should max out and not slow down)

One more peculiar thing with scroller. When running it with no startup and software flicker fixer/cgx promoter you get to see all details how the engine does it's tricks ;-)
You get to see two screens that scroll and change between each other and how the tiles are copied at the top row, why you are not printing them in a row but place the tiles with gfx first and the fill the gaps with the blank one ?
Anyways, this was fun, and the first time I saw a scrolling engine like that, I guess you have done it very system friendly way.
Michael is offline  
Old 22 June 2014, 22:23   #14
Reynolds
Alien Breeder
Reynolds's Avatar
 
Join Date: Dec 2007
Location: Szigetszentmiklos / Hungary
Age: 40
Posts: 545
I'm sooooo lazy now to dl and test, could you please post some screenshots?
Reynolds is offline  
Old 23 June 2014, 01:10   #15
balrogsoft
Registered User
 
Join Date: May 2006
Location: Spain
Age: 36
Posts: 42
Quote:
Originally Posted by Michael View Post
First of all, a very nice engine, can't wait to see the source ;-)
Thanks you, the source will be available very soon, at least the Amiga version, It will take some time make an Android version.

Quote:
Originally Posted by Michael View Post
Personally, for me the 1st stroller worked best and allowed to choose any screenmode I like.

Perfect under CGX 320x200@100Hz, 320x240@100Hz, 320x256@100Hz
Only problem if ship is at bottom line, then it drops a frame (flickers) once every second.
Works ok in PAL too, but a bit slower compared to CGX. Also the bottom screen 16pxls get trashed every full screen scroll!

Pal 320x512 fails, and CGX 320x512 gave a double screen copy type thing.

The updated version 2 fails to start under my system, looks like it's opening a DBLPAL screen, and I can't test that at the moment. And I can't get it to work normal PAL or CGX without a requester.
Running it without startup works in PAL, there is a green ~4pxl line poping up at the bottom every now and then.
The problem at the bottom of screen in scroller example was fixed. And the code to handle screens is working better on actual version, not published yet. I will add a icon params to show an ASLscreen requester for special cases where BestModeId fails. The scroller example wasn't designed to use interlaced modes.


Quote:
Originally Posted by Michael View Post
C2P example works ok under CGX, the colours are supposed to be odd?
Does not run in PAL with a loaded system, but works ok without startup.

Wolf engine, works only without startup in PAL, otherwise nothing. Give us requester!!!
Almost constant 51 FPS! (in PAL?) drops down to 26 if you are against the wall. (unexpected! usually it should max out and not slow down)
I have optimized the code a lot, now frame rate isn't so bad near the walls, and now it draws floor and ceiling, It's working very nice to be pure C code.

Quote:
Originally Posted by Michael View Post
One more peculiar thing with scroller. When running it with no startup and software flicker fixer/cgx promoter you get to see all details how the engine does it's tricks ;-)
Now for systems with AOS3.0+ the engine uses a different system for double buffering, and should work with flicker fixer or with cgx promoter. But you can force the scrollvport solution for double buffering in code. The scroller trick is need to got it working properly on accelerated systems like my A600 with ACA630@25mhz, other ways to do a system friendly scroller are to slow on my A600, this trick made the work.

Quote:
Originally Posted by Michael View Post
You get to see two screens that scroll and change between each other and how the tiles are copied at the top row, why you are not printing them in a row but place the tiles with gfx first and the fill the gaps with the blank one ?
Anyways, this was fun, and the first time I saw a scrolling engine like that, I guess you have done it very system friendly way.
Filling a complete row uses too much time and are noticeable making the scroller less smooth.

The trick works in this way, forget the double buffering it doesn't affect to this scroller trick, you use a screen at least twice height plus 3-4 rows of tiles, the screen height is 256*2+64=576, all the screen is drawed with the tilemap.

The scroll starts at bottom of screen, and scroll position decreases every frame up to the top of screen, meanwhile every frame the tilemap is drawed on top of viewport to show the current map, and at the bottom of viewport the example draws a exact copy of the map at top position, so when we have not more screen to scroll, a exact copy exist to continue scroll at the bottom. Sorry for my bad english, I can't explain better.

Maybe this graphic helps to understand the trick:




Quote:
Originally Posted by Reynolds View Post
I'm sooooo lazy now to dl and test, could you please post some screenshots?
Sure, here are some pics of current version, not published yet:



This is the new version of raycasting example, with floor and ceiling, the first and second screenshot shows differences of drawing with my shade algorithm for EHB modes.


Last edited by balrogsoft; 23 June 2014 at 11:23.
balrogsoft is offline  
Old 23 June 2014, 16:14   #16
Michael
A1260T/PPC/BV/SCSI/NET

Michael's Avatar
 
Join Date: Jan 2013
Location: Moscow / Russia
Posts: 641
Very nicely explained. And the method is the correct old school one.
One thing I was wondering was why the tiles are not printer in a row, but rather in an odd sequence starting from middle and then finishing at middle part.

Forgetting the above... Have you tried the half pixel scroll on PAL? (hint: screen view position shifting) This technique allows quarter pixel horizontal scrolling. Will the engine implement 8 directional scrolling ? That would be really cool. I guess if the virtual screen is 2x wider + a few blocks with a really tricky algorithm it is possible to do exactly the same trick.

Another cool feature would be variable scroll speed, eg for Super Cars style games.
Michael is offline  
Old 23 June 2014, 20:17   #17
balrogsoft
Registered User
 
Join Date: May 2006
Location: Spain
Age: 36
Posts: 42
Quote:
Originally Posted by Michael View Post
Very nicely explained. And the method is the correct old school one.
One thing I was wondering was why the tiles are not printer in a row, but rather in an odd sequence starting from middle and then finishing at middle part.

Forgetting the above... Have you tried the half pixel scroll on PAL? (hint: screen view position shifting) This technique allows quarter pixel horizontal scrolling. Will the engine implement 8 directional scrolling ? That would be really cool. I guess if the virtual screen is 2x wider + a few blocks with a really tricky algorithm it is possible to do exactly the same trick.

Another cool feature would be variable scroll speed, eg for Super Cars style games.
The main purpose of this engine is provide basic elements to develop a game, tilemaps isn't in the to do list, blitting functions are provided to implement it yourself. The examples are only examples to show that it's possible to create system friendly games that runs on classic Amiga and new gen systems like MorphOS. It isn't a game engine for novice coders, the API is very simple, but it requires knowledge about programming to get all the potential of this engine, which is basically an abstraction layer between the system and the game.

An 8way scroller is possible but it will require an accelerated machine, probably my A600 with ACA630@25mhz won't be enough. A problem with horizontal scroll on MorphOS is that ScrollVPort only works every 8 pixels, horizontal scrolling isn't smooth on MorphOS using this function. Just curiosity, how works the half pixel scroll exactly?

I don't have enough time to develop things like a TileMap API for this engine, maybe someone can add this after publish my code.

I'm working on a more advance 2D game engine for my commercial games (with Box2D integrated on sprites and tilemaps), but it requires a new gen machine, this engine and my game prototype is working on Windows, Linux, Android, and MorphOS, but it's closed source.

Last edited by balrogsoft; 23 June 2014 at 22:59.
balrogsoft is offline  
Old 24 June 2014, 20:45   #18
Michael
A1260T/PPC/BV/SCSI/NET

Michael's Avatar
 
Join Date: Jan 2013
Location: Moscow / Russia
Posts: 641
Since we use a lowres screen for the game and the hardware allows hires that's where the half pixel is hiding. We can offset the screen hardware position by 1 scan line (2 lines make 1 lowres pixel)
And for horizontal scrolling it's even better, we get 1/4 pixel possibility.
T-Zero uses this technology. But it might not be possible the system friendly way.
Michael is offline  
Old 28 February 2018, 10:43   #19
balrogsoft
Registered User
 
Join Date: May 2006
Location: Spain
Age: 36
Posts: 42
Amiga Game Engine first version released

Hello.

After a few months without progress in this project because I was busy with other hobbies, I learned to paint in watercolor and I took some practice time, I am working again on my Amiga projects.

Finally, the project has a minimum development to share the code, is compatible with the system and includes support for the classic Amiga and MorphOS (AmigaOS 4 is not tested, I do not have any AmigaOS 4 machine), from older systems, below V38 and above, a different approach is used to implement double buffer screens and make it work from older Amiga systems to MorphOS.

Here is the code:

https://github.com/balrogsoft/amiga-game-engine
balrogsoft is offline  
AdSense AdSense  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Reality Game Engine Solid Snake request.Apps 7 22 August 2015 00:47
Reality Game Engine up in the zone :) ElectroBlaster request.Apps 5 12 September 2011 14:57
Game Engine? amigang request.Apps 1 14 October 2010 14:49
Game Engine v1.06 BinoX request.Apps 0 10 August 2007 19:51
Reality Game Engine :) ElectroBlaster request.Apps 4 05 October 2006 10:38

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 20:09.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2018, vBulletin Solutions Inc.
Page generated in 0.10845 seconds with 15 queries