English Amiga Board


Go Back   English Amiga Board > Main > Retrogaming General Discussion

 
 
Thread Tools
Old 12 August 2020, 10:41   #121
DamienD
disengaged
DamienD's Avatar
 
Join Date: Aug 2005
Location: London / Sydney
Age: 43
Posts: 18,148
Quote:
Originally Posted by Brick Nash View Post
Just to say, I noticed that there was a couple of bugs in the demo from watching Superman's much appreciated playthrough. The flashing enemy is a mystery as it's fine on my PC, but the other bug was that the enemies will get trapped in their "punch" state until hit again (something that I was working on but never finished). If the player scrolls the screen past them while this happens the enemies won't re-spawn as the remaining enemy will be off screen still punching away. I've fixed this by using alain's new source, so they will break out of punching if the player is outside the attack range.
Could somebody please compile Brick Nash's latest version with this "trapped in their punch state until hit again"?

I'll create a new .ADF afterwards.

Quote:
Originally Posted by d4rk3lf View Post
I will join Flat Earth Society, if no one continue developing this.
Paperwork is now is the post
DamienD is online now  
Old 12 August 2020, 15:04   #122
Dan
Registered User
Dan's Avatar
 
Join Date: Nov 2004
Location: Germany
Posts: 527
Hi, here is it.
Attached Files
File Type: 7z StreetsOR-12082020.7z (35.4 KB, 33 views)
Dan is offline  
Old 12 August 2020, 15:18   #123
DamienD
disengaged
DamienD's Avatar
 
Join Date: Aug 2005
Location: London / Sydney
Age: 43
Posts: 18,148
Perfect, thanks Dan

I'll create a new .ADF once home from work today.
DamienD is online now  
Old 12 August 2020, 18:31   #124
DamienD
disengaged
DamienD's Avatar
 
Join Date: Aug 2005
Location: London / Sydney
Age: 43
Posts: 18,148
Quote:
Originally Posted by Dan View Post
Hi, here is it.
Heya Dan,

Hmmm, something is up with this new compiled file.

Firstly, comparison of file sizes between the old and new:
OLD = 175624

NEW = 127780
I'm using your same files / folders as located here, but with the new game EXE: http://eab.abime.net/showpost.php?p=...9&postcount=90

...but just before the games starts it crashes with:

DamienD is online now  
Old 12 August 2020, 19:13   #125
Dan
Registered User
Dan's Avatar
 
Join Date: Nov 2004
Location: Germany
Posts: 527
I took the Sourcecode from Brick Nash, and compiled it few times, but every time when i wanted to start the compiled file, it ended up in a Guru.

The guru happens because of some bank, which is saved with the sourcecode. (This is AmosPro bug)

So i loaded up the sourcecode, and removed almost all saved banks (part from one) from it, then compiled it.
This may explain the different filesize.

Anyway, i saved the sourcecode as ascii file, loaded it up in windows, and removed all of the unneeded files. (i hope i haven't missed anything, the intro and the game are starting)
The result is uploaded in the leveldata.zip
Attached Files
File Type: zip Leveldata.zip (146.7 KB, 22 views)

Last edited by Dan; 12 August 2020 at 19:21.
Dan is offline  
Old 12 August 2020, 19:21   #126
DamienD
disengaged
DamienD's Avatar
 
Join Date: Aug 2005
Location: London / Sydney
Age: 43
Posts: 18,148
Quote:
Originally Posted by Dan View Post
I took the Sourcecode from Brick Nash, and compiled it few times, but every time when i wanted to start the compiled file, it ended up in a Guru.

The guru happens because of some bank, which is saved with the sourcecode. (This is AmosPro bug)

So i loaded up the sourcecode, and removed almost all saved banks (part from one) from it, then compiled it.
This may explain the different filesize.

Anyway, i saved the sourcecode as ascii file, loaded it up in windows, and removed all of the unneeded files.
The result is uploaded in the leveldata.zip
Ok, so use this "leveldata.zip" plus your new game EXE hey?
DamienD is online now  
Old 12 August 2020, 19:22   #127
Dan
Registered User
Dan's Avatar
 
Join Date: Nov 2004
Location: Germany
Posts: 527
Yes.
Dan is offline  
Old 12 August 2020, 20:00   #128
DamienD
disengaged
DamienD's Avatar
 
Join Date: Aug 2005
Location: London / Sydney
Age: 43
Posts: 18,148
Thanks Dan; all working now

I think I know why the size difference in the old vs new game EXE.

I now needed to include the "amos.library"; previously it must have been compiled within.

New file in The Zone!
DamienD is online now  
Old 12 August 2020, 20:42   #129
Dan
Registered User
Dan's Avatar
 
Join Date: Nov 2004
Location: Germany
Posts: 527
Quote:
Originally Posted by DamienD View Post
I think I know why the size difference in the old vs new game EXE.

I now needed to include the "amos.library"; previously it must have been compiled within.
Hmm that's strange, the compiler shell is set up to include the amos.library ...

This was compiled with amos for windows version converted to kick/wb1.3 ...

Anyway, i'm glad that it is working now.


Edit: Ok i think i know what happened. I haven't started the Amos for windows (kick1.3) from it's configuration, but started my Amiga HD config, which had the Amos4Win hd assigned.
Then i started Amos4win from there.
And this loaded the config which does not add the Amos.library.

Last edited by Dan; 12 August 2020 at 21:02.
Dan is offline  
Old 15 August 2020, 21:10   #130
Dan
Registered User
Dan's Avatar
 
Join Date: Nov 2004
Location: Germany
Posts: 527
Hi,

Today i thoght to test the Amos tome map, provided with the sourcecode.

Practically, to program this correctly is different than in the theory.

I'v used the available code from the tome4 examples, the MapHandle.amos, and replaced the icons and the map data with the sora's level 1.

So far, so good.

Then, i thought, lets see how this will work with some bobs.
I made a 4 bob image bank, and then the troubles started.

The main question was, how to place the bobs, so that the flickering stops.

after few hours of trying, this is the best result which i have achieved with it.

Attached is an ADF with 2 executable files.

The MapHandle displays a scrollable level. Use the Joypad to scroll left and right.
Use up and down on the Joypad to adjust the speed of the scrolling.

The MapHandleBobTest has 3 figures (each made of 4 bobs) moving around.
Use the Joypad just like in the 1st demo.

Maybe someone more experienced with Amos programming knows how to achieve better results.

Both sourcecodes are included. They only need the tome4 extension (so far i know).



Edit: Looks like a better result can be achieved, updated adf will be uploaded soon in the next post.

Last edited by Dan; 16 August 2020 at 09:50.
Dan is offline  
Old 15 August 2020, 21:25   #131
Samurai_Crow
Total Chaos forever!

Samurai_Crow's Avatar
 
Join Date: Aug 2007
Location: Ft. Collins, CO USA
Age: 45
Posts: 1,512
Send a message via Yahoo to Samurai_Crow
Tome is a bad choice for realtime scrolling. It has a good editor but the extension needs a total rewrite.
Samurai_Crow is offline  
Old 16 August 2020, 10:15   #132
Dan
Registered User
Dan's Avatar
 
Join Date: Nov 2004
Location: Germany
Posts: 527
Today i have made few more testings with the Tome extension.
I studied the source code of other tome example demos a bit more.

I wondered how did they managed to make the scrolling flawless ?

And so i changed the previous (now deleted) sourcecode to match that of the sample game (well, the placement and the right bob commands).

And now it works very well. See it in the attached file.

The question now is, will it work that well in the SORA demo ?
Attached Files
File Type: 7z MapTest.7z (63.3 KB, 23 views)

Last edited by Dan; 16 August 2020 at 10:27.
Dan is offline  
Old 16 August 2020, 23:28   #133
Retro1234
Boo

Retro1234's Avatar
 
Join Date: Jun 2006
Location: 5150
Posts: 4,666
Quote:
Originally Posted by Dan View Post
I took the Sourcecode from Brick Nash, and compiled it few times, but every time when i wanted to start the compiled file, it ended up in a Guru.

The guru happens because of some bank, which is saved with the sourcecode. (This is AmosPro bug)

So i loaded up the sourcecode, and removed almost all saved banks (part from one) from it, then compiled it.
This may explain the different filesize.

Anyway, i saved the sourcecode as ascii file, loaded it up in windows, and removed all of the unneeded files. (i hope i haven't missed anything, the intro and the game are starting)
The result is uploaded in the leveldata.zip
this bug means it will only compile and work on 68020+

a quick way around is go into direct mode and type Erase all then save this must be done before any apk files are loaded or created etc(if you run the program then press Ctrl-C straight away erase all - save)

a better way of scrolling is just create your map in Tome if you want, MrAmos did a better map editor then just use Peek or Deek to read the map and Screen Offset to hardware scroll instead of those tome Software scrolling commands.

also replace the main hero with a sprite instead of a bob - unfortunately this may need to be split into 2 but with give a great speed increase I.e sprites have virtually no impact on speed unlike Bobs - so you basically get one character on screen for free.

Last edited by Retro1234; 16 August 2020 at 23:34.
Retro1234 is offline  
Old 16 August 2020, 23:46   #134
Samurai_Crow
Total Chaos forever!

Samurai_Crow's Avatar
 
Join Date: Aug 2007
Location: Ft. Collins, CO USA
Age: 45
Posts: 1,512
Send a message via Yahoo to Samurai_Crow
But sprites are NOT free! They overlap bobs that are supposed to be in front of them meaning ALL the characters have to be sprites or ALL have to be bobs! You can't mix and match in this kind of game.
Samurai_Crow is offline  
Old 17 August 2020, 00:00   #135
Retro1234
Boo

Retro1234's Avatar
 
Join Date: Jun 2006
Location: 5150
Posts: 4,666
I meant speed wise, he doesn't have a priority system?

but I just thought of another thing sprites will scroll with the screen when hardware scrolling so you would have to move them manually alot but it won't matter because there so fast etc.

but yeah I forgot someone pointed out the sprite priority thing earlier there are ways round it but are a bit long and limiting but yeah sprites are Fast! bobs are slow!
Retro1234 is offline  
Old 17 August 2020, 00:09   #136
Samurai_Crow
Total Chaos forever!

Samurai_Crow's Avatar
 
Join Date: Aug 2007
Location: Ft. Collins, CO USA
Age: 45
Posts: 1,512
Send a message via Yahoo to Samurai_Crow
@Retro1234
The speed limit of the CPU is going to limit the frame rate more than the blitter. As long as you scroll smoothely it won't be as noticable if bobs render at 25 FPS.
Samurai_Crow is offline  
Old 26 August 2020, 18:35   #137
Dan
Registered User
Dan's Avatar
 
Join Date: Nov 2004
Location: Germany
Posts: 527
Hi,
Last week i have started to program a simple map displayer code for the tome maps.

Today i took a bit of time to write a scrolling routine.

I thought, if i try to program this in Amos, it would take ages to debug and to do it right.

So here it is, attached are 2 programs for the PC.

The ScrollingTheroy.exe demonstrates how the scrolling is builded up. It uses simple squares with numbers to do this.

The SoraLVL-Theory.exe uses the map data and the 'icons' to build up the level.

There are 2 demonstrations here. One is simple map scrolling, by displaying the 20x13 map data on screen.
The other is made with the ScrollingTheory code. The space key makes it scroll until the level end.

Start the SoraLVL-Theory with debug parameter to see how the tiles are drawn.

Soon ill try to code this in Amos Pro. Unless someone else likes to do it.

Here is the BlitzBasic (PC) code of it:
Code:
If CommandLine$()="debug"
	debug=1
Else
	Debug=0
EndIf
If debug=1 Then
	Screen (672,208,1)
Else
	Screen (320,208,2)
EndIf
Local imgScreen0
Local tiles=LoadImage("L116x16_Tiles.png")
Dim imgTile(240)
Grab=CreateImage(16,16)
;20*12
SetBuffer ImageBuffer(tiles)
z=0
For y=0 To 11
	For x=0 To 19
		GrabImage grab,x*16,y*16
		imgTile(z)=CopyImage(grab)
		z=z+1
	Next
Next
FreeImage Grab

SetBuffer BackBuffer()

oFile=ReadFile ("L1_16x16_TOP.map")
a=  ReadByte(oFile)
a1= ReadByte(oFile)
w= hex2dec(Right$(Hex$(a),2) +  Right$(Hex$(a1),2))-1
a=  ReadByte(oFile)
a1= ReadByte(oFile)
h= hex2dec(Right$(Hex$(a),2) +  Right$(Hex$(a1),2))-1
Print h
Print w

Dim Map(w,h)

For y=0 To h
	For x=0 To w
		Map(x,y)=ReadByte(oFile)
	Next
Next
CloseFile oFile
st=0
mapw=320/16
SetBuffer BackBuffer()

;AppTitle "Map drawing 20x12 - Arrow Left and Right to move, esc for next test"
;Repeat
;	Cls
;	For y=0 To 12
;		For x=0 To mapw
;			DrawBlock imgTile(Map(x+st,y)),x*16,(y*16)
;		Next
;	Next
;	If KeyDown(205) Then st=st+1 
;	If KeyDown(203) Then st=st-1
;	
;	If st<0 Then st=0
;	If st=>(w-mapw) Then st=w-mapw
;	Flip
;	Delay (25)
;Until KeyDown(1)
;While KeyDown(1)
;Flip()
;Delay 1
;Wend
;FlushKeys()
;Delay 500

Global wMap=21
imgScreen0=CreateImage((42)*16,208)

;Pre-render the first part of the screen
SetBuffer ImageBuffer(imgScreen0)

For y=0 To 12
	For x=0 To wMap
		DrawBlock imgTile(Map(x,y)),x*16,(y*16)
	Next
Next

;Variable assignment
st=0
Local drawt=0
Local LeadPos=21
Local LeadPosY=0
Local LeadNR=21
Local TrailPos=-1
Local oldtbpos

Repeat
	AppTitle ("(In)finite Scroll " +pos + " / "+bpos+" / "+LeadNR+"  Hold space to advance, esc to end")
	SetBuffer ImageBuffer(imgScreen0)				;Simulating a Screen using an image
	bpos=pos/16
	
	If KeyDown(57) Then 
	pos=pos+1
	If LeadNR=192 And pos>288 Then pos=288
	EndIf
	
	If bpos>21 Then bpos=0 : drawt=0 : LeadPos=21 : TrailPos=-1 : pos=0
	
	If LeadNR<192 Then
		If bpos+21=LeadPos And drawt=0 And oldtbpos<>LeadPos Then drawt=1 :  LeadPosY=0 : oldtbpos=LeadPos 
		If drawt=1 And LeadPosY<13 Then 
			If LeadPos<=41 Then DrawBlock imgTile(Map(LeadNR,LeadPosY)),LeadPos*16,(LeadPosY*16)
			If TrailPos=>0 And TrailPos<21 And bpos>0 				;Trailing squares are enabled to draw
				DrawBlock imgTile(Map(LeadNR,LeadPosY)),TrailPos*16,(LeadPosY*16)
			EndIf
			LeadPosY=LeadPosY+1
			If LeadPosY=13 Then drawt=0 : LeadPos=LeadPos+1 : LeadNR=LeadNR+1 : TrailPos=TrailPos+1
		EndIf
	EndIf	
	
	SetBuffer BackBuffer()
	Cls
	If debug=0 Then
		DrawBlock imgScreen0,0-(pos),0
	Else
		DrawBlock imgScreen0,0,0
	EndIf
	Delay 1
	Flip(1)
    
Until KeyDown(1)



Function Screen(x,y,zoom#=1)
	If x<64 Then x=64
	If y<64 Then y=64
    bits=32
	Graphics x*zoom,y*zoom,bits,2
	Graphics x,y,bits,3
End Function

Function hex2dec%(hex_number$)
; Converts the supplied hex number into a decimal number
; If hex_number isn't a valid hex number, then returns -1
; written by Matt Burns (Blu_Matt / matt at blis co uk)
	Local the_hex$=Upper(Trim(hex_number$))		; the hex number
	Local base_power%=0							; the current base power
	Local base%=16								; the base to convert from
	Local the_dec%=0							; the decimal representation
	Local chars%=0
	Local hex_length%=Len(the_hex$)				; current length of the hex
	If Left(the_hex$,1)="$" Then 				; removes any leading "$"
		the_hex$=Right(the_hex$,hex_length%-1)
	EndIf
	hex_length%=Len(the_hex$)					; current length of the hex
	Local chars_left%=hex_length%				; current number of chars left
	Local hex_left$=the_hex$					; current hex left
	Repeat
		current_hex$=Right(hex_left$,1) 		; gets the current hex char
		If ((Asc(current_hex$)>=Asc("0")) And (Asc(current_hex$)<=Asc("9"))) Then
			hex_dec%=current_hex$				; digit 0-9
		ElseIf ((Asc(current_hex$)>=Asc("A")) And (Asc(current_hex$)<=Asc("F"))) Then
			hex_dec%=Asc(current_hex$)-55		; char A-F
		Else
			Return -1 							; found an illegal character, aborting...
		EndIf
		the_dec%=the_dec%+((base%^base_power%)*hex_dec%)	; add the local hex digit to the total
		base_power%=base_power%+1				; increase the base power
		chars_left%=chars_left%-1				; reduce the number of chars left
		hex_left$=Left(hex_left$,chars_left%)	; sets the remainder
	Until chars_left%=0
	Return the_dec%								; return the result
End Function
 
;~C#Blitz3D
Attached Files
File Type: 7z ScrollTheory.7z (501.9 KB, 13 views)

Last edited by Dan; 26 August 2020 at 21:48.
Dan is offline  
Old 27 August 2020, 16:17   #138
Retro1234
Boo

Retro1234's Avatar
 
Join Date: Jun 2006
Location: 5150
Posts: 4,666
basically all the Map editors from that era normally used the same or similar layout Tame and Tume used for commercial games.

You can even Cut the Map of a Commercial game into black file and then edit it with Tome or one of the other map editors etc.

Tome was just the Amos version of any map editor the extra Amos commands that came with Tome weren't very good and you can scroll faster without them.

this link is the basics of how to do endless scrolling

http://eab.abime.net/showthread.php?t=81634

simply when you scroll past the end of the screen I.e X 1024 the screen wraps back around to the beginning and you start pasting tiles at location 0,0+1 again
but you have to move down Y 1 pixel.

idrougge also wrote another of a scrolling technique this of-course can work horizontally http://eab.abime.net/showthread.php?t=80646

good luck

at a quick guess looking at your code and iirc the oFile=ReadFile would be Bload and the to read the data is command Deek you don't need to load it into a Dim variable because it's already in memory with Bload .

Last edited by Retro1234; 27 August 2020 at 16:24.
Retro1234 is offline  
Old 27 August 2020, 21:18   #139
Dan
Registered User
Dan's Avatar
 
Join Date: Nov 2004
Location: Germany
Posts: 527
Hi,
today i took the MapTest from one of the previous posts, and removed all of the tome commands from it, and added the Scroll test code from my last post.

The attached file is the result.

Press space to move the level. The sourcecode is attached too.
The bobs are now repositioned to stay on the screen, there are 12 of them (4 per char)
Attached Files
File Type: 7z scrolltest.7z (50.4 KB, 10 views)
Dan is offline  
Old 28 August 2020, 12:50   #140
Dan
Registered User
Dan's Avatar
 
Join Date: Nov 2004
Location: Germany
Posts: 527
Yes, today i thought, i'v done the previous test, lets try it with the full (demo) game.

This is a quick hack, with the new scroller code.

You can scroll a bit, and see the how it would look like, but ultimately the main character will disappear from the screen.

Included are 3 tests, all are the same just the Autoback setting is different.
Therefore to start the games either start them with their icon or from the CLI, type:
Autoback0, Autoback1 or Autoback2

each has its own advantage/disadvantages/bugs.

All 3 games will end in a Guru if you press the ctrl c button, this must be due to some Amos4win extension (i guess).
Attached Files
File Type: 7z FullHackTest.7z (423.6 KB, 11 views)
Dan is offline  
 


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Streets of Rage 2 with Blitz Master484 Coders. Blitz Basic 48 19 April 2020 12:33
Streets of Rage I vs II vs III - Which is Best? ZEUSDAZ Retrogaming General Discussion 16 15 August 2019 23:53
Final Fight vs Streets Of Rage 2 (Which Is Best?) ZEUSDAZ Retrogaming General Discussion 32 15 February 2017 20:30
Streets of Rage Remake Retro-Nerd Retrogaming General Discussion 10 21 April 2011 23:30
Streets of Rage for Amiga The Master Retrogaming General Discussion 6 17 August 2006 12:26

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 17:01.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.
Page generated in 0.11105 seconds with 16 queries