18 November 2019, 17:58 | #1 |
Registered User
Join Date: Sep 2018
Location: Berlin / Deutschland
Posts: 18
|
Making games in C. graphics.library?
To my own shame I'm very new to the Amiga , so please forgive me if this maybe has an obvious answer.
I've seen from Compute's "Mapping the Amiga" and Sybex's "Amiga Programmer's Handbook" that the graphics.library provides functions for sprites, bobs, vsprites, etc. Is this the way to go for making games in C for the Amiga? Or are there other more recommendable options? SDL for example comes to my mind. Thanks a lot in advance. |
18 November 2019, 21:09 | #2 |
Zone Friend
Join Date: Mar 2004
Location: Middle Earth
Age: 40
Posts: 2,127
|
If you goto aminet.net and download RKMCompanion.lha on fredfish disk 344 for Kickstart 1.3 machines and Fredfish disks 741, 742 for kickstart 2+. They have C code for using the primitives functions (Sprites).
What Amiga are you programming for? |
18 November 2019, 21:24 | #3 |
This cat is no more
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,367
|
C is okay (get a good cross compiler like gcc or vbcc).
But don't try to create games with SDL. It will be slow as hell even on a 68060 because of damn c2p conversion. Use graphics library routines or direct hardware banging instead. I'm currently creating a C++ game using SDL interface but amiga hardware underneath (porting a SDL game I made 9 years ago). That could be a good compromise (the game isn't working yet but it's taking shape) |
18 November 2019, 21:26 | #4 | |
It's coming back!
Join Date: Jul 2018
Location: comp.sys.amiga
Posts: 762
|
Quote:
Mine is is the original Amiga hardware but I don't have the inclination to code everything in assembly, so I code against the hardware in C, replacing only the bits that matter with hand written assembly routines. In my opinion the operating system friendly side of Amiga game programming was never developed as much as it could be - there were excellent games and excellent applications, but they rarely met. |
|
19 November 2019, 09:21 | #5 |
Amiga user
Join Date: Nov 2008
Location: Sofia / Bulgaria
Posts: 472
|
I coded many games in C using the graphics library Sprites and BOBs. Almost all my Amiga games are running from Workbench and multitasking. With screenmode requester at the beginning, so even graphics cards users can play them. Most games on Amiga closed the Workbench and took complete control over the system for fluent animations and gameplay. If you have task in the background it is very hard to achieve smooth movements and gameplay. Any process can slow down the system and it gets noticeable. For example floppy insert/remove, hard disk loading, even screen savers and Internet. For machines with 68000 CPU having Workbench in the background means almost always slowdowns.
|
19 November 2019, 19:07 | #6 |
Registered User
Join Date: Sep 2018
Location: Berlin / Deutschland
Posts: 18
|
Thanks everybody for the great answers. Awesome forum!
I have an A1200 with 4MB Fast RAM. Right now I'm programming with SAS/C. It's a bit slow compiling, so probably I'll have to move to a cross-compiler as suggested by jotd. Only trouble is the room where I have the Amiga is kind of a retro room. No modern computers. I even listen music with a Technics tape deck :-D I have good experience with assembler in 8-bits (Z80 and 6510), so probably I'll end doing as deimos mentioned and having some pieces in ASM (once I learn a bit of M68k). I've downloaded the RKMCompanion that redblade mentioned. I already had the PDFs, so it will be a great companion indeed. Great tip, drHirudo. I'll check how to do it once I get further, if I see my game slowing down. |
19 November 2019, 19:20 | #7 |
Registered User
Join Date: Sep 2014
Location: Poland
Posts: 175
|
|
26 November 2019, 13:34 | #8 | ||
Registered User
Join Date: May 2006
Location: Spain
Age: 42
Posts: 76
|
Quote:
Quote:
I have found that some RKMCompanion examples are not very good, they run slow on my A500 and with flickering graphics. There are some examples more optimized, look on aminet, or github, there are some interesting examples: http://aminet.net/package/dev/src/ScrollingTrick https://github.com/astrofra/amiga-experiments https://github.com/alpine9000/EWGM This reading about graphics.library is also interesting: https://wiki.amigaos.net/wiki/Classi...ffered_Display Last edited by balrogsoft; 26 November 2019 at 14:31. |
||
26 November 2019, 19:29 | #9 | |
Zone Friend
Join Date: Mar 2004
Location: Middle Earth
Age: 40
Posts: 2,127
|
Quote:
|
|
26 November 2019, 20:36 | #10 |
Zone Friend
Join Date: May 2006
Location: France
Posts: 1,835
|
check this site also
http://www.pjhutchison.org/tutorial/amiga_c.html |
27 November 2019, 10:24 | #11 |
Registered User
Join Date: Jun 2008
Location: somewhere else
Posts: 524
|
|
28 November 2019, 21:26 | #12 |
Registered User
Join Date: Jun 2008
Location: somewhere else
Posts: 524
|
|
01 December 2019, 14:55 | #13 | |
Registered User
Join Date: May 2006
Location: Spain
Age: 42
Posts: 76
|
Quote:
I don't remember if it runs at 50 fps, anyway ScrollingTrick uses hardware directly for blitting, so it might not be the best example using graphics.library. There really aren't many examples in C, at least using system functions. The RKM examples use the ScrollVPort, RethinkDisplay functions, which are not very fast. ScrollVPort makes my code 25% slower even if there are not changes on the viewport. |
|
01 December 2019, 21:39 | #14 |
Zone Friend
Join Date: May 2006
Location: France
Posts: 1,835
|
@balrogsoft what is your youtube channel?
|
01 December 2019, 22:12 | #15 |
Registered User
Join Date: May 2006
Location: Spain
Age: 42
Posts: 76
|
My channel? I only have some old "Bit a bit" TV computer shows from spanish television. https://www.youtube.com/channel/UCYo...ayNoOcFNTyZ6aA |
02 December 2019, 20:54 | #16 | |
Zone Friend
Join Date: Mar 2004
Location: Middle Earth
Age: 40
Posts: 2,127
|
Quote:
|
|
02 December 2019, 21:28 | #17 |
Registered User
Join Date: May 2006
Location: Spain
Age: 42
Posts: 76
|
Ok, but the c2p gifs aren't gifs images, they are javascript effects running in realtime. I made them a lot of years ago, when canvas didn't exists in javascript standards.
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
graphics library v40.25 | Schlachtwerk | request.Apps | 0 | 14 February 2015 20:47 |
Some question about graphics.library lowlevels | Sonic | Coders. General | 3 | 28 July 2010 11:45 |
graphics.library private LVO's | AmiCoder | Coders. General | 12 | 30 December 2009 04:24 |
Can't open version 36 of graphics.library | Lambizkit | support.Apps | 1 | 07 November 2007 08:00 |
Making a shared library from a gcc .a library | JoJo | Coders. General | 1 | 10 March 2003 19:06 |
|
|