8-way scrolling system for prototyping games on STE

GFA, ASM, STOS, ...

Moderators: exxos, simonsunnyboy, Mug UK, Zorro 2, Moderator Team

User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3472
Joined: Sat Jun 30, 2012 9:33 am

Re: 8-way scrolling system for prototyping games on STE

Postby dml » Tue Oct 11, 2016 4:15 pm

Still not feeling well enough to work on the code tonight, but have added another 2 examples to the source repo after fixing comments & stuff.

These are simpler and easier to follow than the shmup demo. But if you diff the files you'll see how much they have in common... There are still some demos I haven't added yet but they need a bit of work first.

I might do a bit more on the wiki later if I'm feeling up to it.

User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3472
Joined: Sat Jun 30, 2012 9:33 am

Re: 8-way scrolling system for prototyping games on STE

Postby dml » Thu Oct 13, 2016 1:12 am

Have added a 4th code sample for the 'boss' AI demo linked here last week. It's not quite finished but 90% good enough (the boss won't die - i'll do that bit another time).

This example is a bit more complex than the others because a single AI is made up of several parts and switching behaviours. It's a good example though of some things you can do at 50hz on STE with a bit of practice using the entities.


There are a couple more demos which aren't ready to add yet - but I'm going to skip those for now and start making much simpler walkthrough-style samples to help any new users get familiar with the most common features. These won't be quite so game-oriented.

User avatar
TheNameOfTheGame
Atari God
Atari God
Posts: 1059
Joined: Mon Jul 23, 2012 8:57 pm
Location: Almost Heaven, West Virginia

Re: 8-way scrolling system for prototyping games on STE

Postby TheNameOfTheGame » Thu Oct 13, 2016 2:46 am

Boss demo wouldn't compile for me.

Code: Select all

$ make
cp ../../data/sounds/pasnar.wav sounds/pasnar.wav
cp: cannot create regular file 'sounds/pasnar.wav': No such file or directory
make: *** [Makefile:429: sounds/pasnar.wav] Error 1



EDIT: Had to manually make the "sounds" directory. Weird. But now it compiles.

EDIT2: Really looking forward to the boiler plate and simple code examples to start to wrap my head around the system. The current ones are pretty complicated for my small brain! :lol:

User avatar
LaceySnr
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 111
Joined: Wed Jun 26, 2013 5:00 am
Contact:

Re: 8-way scrolling system for prototyping games on STE

Postby LaceySnr » Thu Oct 13, 2016 3:17 am

I've been working on a simple 'move a sprite around a map' demo that will hopefully make for some useful reading. Need to strip it down a little more still!

User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3472
Joined: Sat Jun 30, 2012 9:33 am

Re: 8-way scrolling system for prototyping games on STE

Postby dml » Thu Oct 13, 2016 10:23 am

TheNameOfTheGame wrote:EDIT: Had to manually make the "sounds" directory. Weird. But now it compiles.


You're right - fixed!

TheNameOfTheGame wrote:EDIT2: Really looking forward to the boiler plate and simple code examples to start to wrap my head around the system. The current ones are pretty complicated for my small brain! :lol:


Having a bit of a rest/recovery now but this will come next! Have been considering a build-up tutorial, connecting a wiki walkthrough with a series of small samples.


I had more code planned but I think I may draw a line under this version and call it perhaps 'beta' and let it settle down a bit - just tweaks and fixes. The other stuff will have to follow for a v1.0 release some other time.

User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3472
Joined: Sat Jun 30, 2012 9:33 am

Re: 8-way scrolling system for prototyping games on STE

Postby dml » Thu Oct 13, 2016 3:53 pm

LaceySnr wrote:I've been working on a simple 'move a sprite around a map' demo that will hopefully make for some useful reading. Need to strip it down a little more still!


It'll be great to have a new example from a different perspective! Looking forward to it.

User avatar
TheNameOfTheGame
Atari God
Atari God
Posts: 1059
Joined: Mon Jul 23, 2012 8:57 pm
Location: Almost Heaven, West Virginia

Re: 8-way scrolling system for prototyping games on STE

Postby TheNameOfTheGame » Thu Oct 13, 2016 6:33 pm

LaceySnr wrote:I've been working on a simple 'move a sprite around a map' demo that will hopefully make for some useful reading. Need to strip it down a little more still!


Looking forward to it!

User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3472
Joined: Sat Jun 30, 2012 9:33 am

Re: 8-way scrolling system for prototyping games on STE

Postby dml » Fri Oct 14, 2016 5:39 pm

Some recent changes:

agtcut v0.32:
- added --sprguide option to guide cutting jobs with a simple script. useful when sprites are not neatly arranged as a row, column or grid. supports flipping flags useful when cutting flipped sprites from the same source graphic.
- added --visual option to emit the cut sprites as a tall .tga film-strip for previewing. shortcuts the need to load sprites into the engine to check they were cut correctly and look ok.
- added --quickcut mode to speed up cutting of the most optimised sprite format (.emx), for quicker test/debug. remove this option for properly optimised sprites.
- semi-recently fixed problems when reducing sprites or tilemaps to a prepared 16colour palette (e.g. using .PI1 or 4/8bit, .BMP, PNG as the palette file) - colour reduction was happening *before* key colour checking, causing transparent bits to change index, go solid or dithered and difficult to deal with using --keycol alone.
- semi-recently fixed a bug affecting palettised .bmp files sometimes being imported upside down and producing nonsense tile libraries as a result.

demos:
- isoscroll demo now has animated people running around in isometric 3D space. it uses a --sprguide script for cutting, as an example.
- bosscore improved with fancy AI behaviour (mentioned this already)

changes available on BitBucket. the new agtcut build is on the d/l area also.

providing nothing else needs fixed, i'll be working on tutorials as time allows (and updating the examples).

User avatar
TheNameOfTheGame
Atari God
Atari God
Posts: 1059
Joined: Mon Jul 23, 2012 8:57 pm
Location: Almost Heaven, West Virginia

Re: 8-way scrolling system for prototyping games on STE

Postby TheNameOfTheGame » Fri Oct 14, 2016 6:10 pm

Thanks for adding that. The tga preview is nice also.

Gotta check this iso demo out. It was super cool with the skeletons and now it's going to be even more crazy!

User avatar
TheNameOfTheGame
Atari God
Atari God
Posts: 1059
Joined: Mon Jul 23, 2012 8:57 pm
Location: Almost Heaven, West Virginia

Re: 8-way scrolling system for prototyping games on STE

Postby TheNameOfTheGame » Fri Oct 14, 2016 6:15 pm

Getting an error on the villager.sgd file. Says it's missing.

Code: Select all

processing sprite guide file: villager.sgd
error: unable to locate or read specified spriteguide file!

User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3472
Joined: Sat Jun 30, 2012 9:33 am

Re: 8-way scrolling system for prototyping games on STE

Postby dml » Fri Oct 14, 2016 6:17 pm

TheNameOfTheGame wrote:Getting an error on the villager.sgd file. Says it's missing.

Code: Select all

processing sprite guide file: villager.sgd
error: unable to locate or read specified spriteguide file!


oops - will check it and add...

[EDIT]
right again ....fixed!

User avatar
TheNameOfTheGame
Atari God
Atari God
Posts: 1059
Joined: Mon Jul 23, 2012 8:57 pm
Location: Almost Heaven, West Virginia

Re: 8-way scrolling system for prototyping games on STE

Postby TheNameOfTheGame » Fri Oct 14, 2016 6:30 pm

I ran the old bosscore fine, but the new one freezes steem when I press the LShift key to fire. Some random lines appear on-screen also.

Tried both US and GB 1.62 TOS.

Image

User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3472
Joined: Sat Jun 30, 2012 9:33 am

Re: 8-way scrolling system for prototyping games on STE

Postby dml » Fri Oct 14, 2016 6:49 pm

TheNameOfTheGame wrote:I ran the old bosscore fine, but the new one freezes steem when I press the LShift key to fire. Some random lines appear on-screen also.

Tried both US and GB 1.62 TOS.

Image


Ok cheers, maybe I have missed another file. I'll look into it.

User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3472
Joined: Sat Jun 30, 2012 9:33 am

Re: 8-way scrolling system for prototyping games on STE

Postby dml » Fri Oct 14, 2016 7:05 pm

dml wrote:
TheNameOfTheGame wrote:I ran the old bosscore fine, but the new one freezes steem when I press the LShift key to fire. Some random lines appear on-screen also.


Same happens here when I purge the repo of data and rebuild. It seems agtcut crashed building bullet.emx (and sprite safety checks are off in the build, so it doesn't give an error signal at runtime). Probably related to recent changes.

I'll debug and check in a fix soon.

User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3472
Joined: Sat Jun 30, 2012 9:33 am

Re: 8-way scrolling system for prototyping games on STE

Postby dml » Fri Oct 14, 2016 8:42 pm

It might be a fiddly debug, involving the sprite code generator and one specific sprite. And it only crashes in release builds :-/

Meantime I have added the missing bullet.emx file to the repo which should be enough to run the demo.

Here's a recent build of the demo as .MSA for anyone who can't build the code themselves.

https://dl.dropboxusercontent.com/u/129 ... sscore.msa

User avatar
metalages
Atari freak
Atari freak
Posts: 50
Joined: Thu Jun 06, 2013 5:14 pm
Location: France
Contact:

Re: 8-way scrolling system for prototyping games on STE

Postby metalages » Fri Oct 14, 2016 8:48 pm

yey Xenon boss :)


User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3472
Joined: Sat Jun 30, 2012 9:33 am

Re: 8-way scrolling system for prototyping games on STE

Postby dml » Fri Oct 14, 2016 10:41 pm

Ok found the bug in agtcut responsible for bullet.emx crash, fixed it. Don't have much time to mess about with versioning & changenotes so I just updated v0.32 in the repo and the d/l zip.

User avatar
TheNameOfTheGame
Atari God
Atari God
Posts: 1059
Joined: Mon Jul 23, 2012 8:57 pm
Location: Almost Heaven, West Virginia

Re: 8-way scrolling system for prototyping games on STE

Postby TheNameOfTheGame » Fri Oct 14, 2016 11:08 pm

dml wrote:Ok found the bug in agtcut responsible for bullet.emx crash, fixed it. Don't have much time to mess about with versioning & changenotes so I just updated v0.32 in the repo and the d/l zip.


Yes, thanks, working now. :D

User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3472
Joined: Sat Jun 30, 2012 9:33 am

Re: 8-way scrolling system for prototyping games on STE

Postby dml » Sat Oct 15, 2016 11:28 pm

Have added first 2 tutorial steps to the wiki page. The source for these is already in the repo.

These are admittedly a bit dry and overworked for anyone wanting to get straight into the interesting bits - but I think its still worth scanning them before I start on the later ones. For non-C programmers its probably not comprehensive enough to absorb everything but I expect much can be picked up from the text and code comments as it is.

I can say things will get fairly interesting towards the end of the series though ;-)

I'll continue adding one tutorial at a time as I get the opportunity.

User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3472
Joined: Sat Jun 30, 2012 9:33 am

Re: 8-way scrolling system for prototyping games on STE

Postby dml » Sun Oct 16, 2016 9:27 pm

Have added the 3rd tutorial to the wiki - the matching code is a bit behind but will follow soon.

User avatar
TheNameOfTheGame
Atari God
Atari God
Posts: 1059
Joined: Mon Jul 23, 2012 8:57 pm
Location: Almost Heaven, West Virginia

Re: 8-way scrolling system for prototyping games on STE

Postby TheNameOfTheGame » Mon Oct 17, 2016 12:48 am

Thanks, read the Makefile one today. These will be very helpful. :cheers:

User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3472
Joined: Sat Jun 30, 2012 9:33 am

Re: 8-way scrolling system for prototyping games on STE

Postby dml » Mon Oct 17, 2016 3:24 pm

TheNameOfTheGame wrote:Thanks, read the Makefile one today. These will be very helpful. :cheers:


:cheers:

I have finished edits (for now) to tutorial 2, and pushed out last night's work on the tutor2 code.

Tutorial 3 will follow when I find some more time - probably 2-3 evenings' work including the wiki part.


BTW the early tutorials are a lot of text, for not much 'demo' but there's quite a bit of ramp-up to do with familiarity with concepts and identifying / configuring things. The later ones will assume that's all covered and will begin to focus more on doing things, assuming more and more knowledge of what various bits do....

User avatar
TheNameOfTheGame
Atari God
Atari God
Posts: 1059
Joined: Mon Jul 23, 2012 8:57 pm
Location: Almost Heaven, West Virginia

Re: 8-way scrolling system for prototyping games on STE

Postby TheNameOfTheGame » Tue Oct 18, 2016 12:02 am

dml wrote:
TheNameOfTheGame wrote:Thanks, read the Makefile one today. These will be very helpful. :cheers:


:cheers:

I have finished edits (for now) to tutorial 2, and pushed out last night's work on the tutor2 code.

Tutorial 3 will follow when I find some more time - probably 2-3 evenings' work including the wiki part.


BTW the early tutorials are a lot of text, for not much 'demo' but there's quite a bit of ramp-up to do with familiarity with concepts and identifying / configuring things. The later ones will assume that's all covered and will begin to focus more on doing things, assuming more and more knowledge of what various bits do....


Trying to go through the tuts code currently.

tutor0 makes a bunch of lines on-screen. Is that what it is supposed to do?

Image

and at exit it 3 bombs. On Steem 3.8.2.

tutor1 won't build on my system. Stops with:

Code: Select all

cp tutor1.sym /cygdrive/d/projects/local/hatari19/.
cp: cannot create regular file '/cygdrive/d/projects/local/hatari19/.': No such file or directory
make: *** [Makefile:236: tutor1.tos] Error 1
rm tutor1.o ../../rmac/mStartupAsmCpp.o ../../agtsys/mStartup.o


Thanks for all you help and work. This is a great project!

P.S. Is there supposed to be a tutor2 up now? I don't see it in the source directory.

User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3472
Joined: Sat Jun 30, 2012 9:33 am

Re: 8-way scrolling system for prototyping games on STE

Postby dml » Tue Oct 18, 2016 12:22 am

Hi!

TheNameOfTheGame wrote:Trying to go through the tuts code currently.
tutor0 makes a bunch of lines on-screen. Is that what it is supposed to do?


Yes, that's all that one does. It's just a starting point for the other tutorial steps so not much to it. Just flashy colours.

TheNameOfTheGame wrote:and at exit it 3 bombs. On Steem 3.8.2.


I fixed an exit bug tonight, although im not sure if its the same. Will check it out (using 3.8.0 / TOS 1.6.2 currently)

TheNameOfTheGame wrote:tutor1 won't build on my system. Stops with:


That's due a switch in the makefile, for my own hatari testing dir. I'll fix it next - it should be off.


tutor2 - I was kinda tired earlier and pushed it to the wrong repo URL :-/ it'll be up in a few minutes.

I'm working on tutor3, which adds sprites (but no entities yet - just straight draw calls).


Social Media

     

Return to “Coding”

Who is online

Users browsing this forum: No registered users and 1 guest