Space99 - Development Forum

Want to talks about games you like, would like to see developed on the Oric, it's here.
jumpjack
1st Star Corporal
Posts: 10
Joined: Tue Nov 08, 2022 9:42 am

Re: Space99 - Development Forum

Post by jumpjack »

Hi guys.
In case anybody is still tuned on the thread, I inform you that I copied the source code to github, because the original repository is no more accessible, just like its dedicated page, which is no more http://space1999.defence-force.org/ as stated in reference thread but https://www.defence-force.org/index.php ... =space1999

I copied the source code there and I also forked a repo of an isometric game ("urban survivor") engine for javascript, because I would like to port the game to HTML5/javascript; in case I will succeed, it will be stored here:

https://github.com/jumpjack/Space1999Adventure

I am currently working to a converter to port the game map to the format of Tiled.

There is also a Javascript port of Oricutron emulator, but:
- I am still figuring out how to load English version of space1999 in it (French version is here)
- I would like to make the game map in Tiled format so the game can be ported to any platform by any volunteer...

To play S1999 in the HTML oricutron emulator I suggest to remap keys:
- right click on the game screen once loaded
- select "keyboard options" and "define mapping"
- click on "M" (move forward), then press the key you want to use (W, or UP, or whatelse)
- click on "X" (right), then press S or RIGHT ARROW
- click on "Z" (left), then press A or LEFT ARROW
- click on "B" (backward) and press S or DOWN ARROW

Back to porting: as of now I figured out this:

- The names of the rooms are listed in "\Space 1999\Sources\game source\world\space1999.txt.lab"
- Eeach room is composed of "tiles" as described in file "\Space 1999\Sources\game source\world\space1999.txt"
- The names of each tile used to build each room are listed in "\Space 1999\Sources\game source\world\tileset.txt"

What I can't find yet is the overall map, i.e. how the rooms are connected each other. Any help about this?
User avatar
Dbug
Site Admin
Posts: 4444
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Re: Space99 - Development Forum

Post by Dbug »

I don't think having a copy is a problem (should ask Chema I guess), but making a copy because "the original repository is not accessible" is not a good reason: "miniserve" is dead, it was my old server, and what is now on OSDN.net is the 100% unmodified content of the old SVN server on the day it was disabled.

As you mentioned, https://defence-force.org/index.php?pag ... =space1999 works fine, it's just that http://space1999.defence-force.org does not work anymore since I moved the defence force servers to a different host, and it's hard to find all the old links to fix them.

Now, regarding https://github.com/jumpjack/Space1999Adventure:

1. There are no "Windows executables", it's an Oric game, you may run it on Windows using an emulator, but the game itself is not a Windows game, so probably should fix that as well.

3. I think you should remove the "Source on archive.org" link because it has no historical relevance, other than confusing search engines.

The game was actually started in 2004, 2006 is only when the discussion started on the forum, and technically I was also involved since I made the intro sequence for the game as well as the trailer "demo" :D

One thing I'm wondering about, is if you are actually allowed to add a LICENSE.md with the apache licence on a fork of a codebase, I'm no licence expert, so no idea.
User avatar
Chema
Game master
Posts: 3014
Joined: Tue Jan 17, 2006 10:55 am
Location: Gijón, SPAIN
Contact:

Re: Space99 - Development Forum

Post by Chema »

Nice you are interested in porting this... it was my first game for the oric, written so many years ago when I promised Fabrice Frances I'd learn asm :D

It started as an isometric engine you could use from C (Thus the name NOSIE - Novel Oric Isometric Engine). When developing I quickly noticed I had some bunch of high-level functionalties and decided to add yet another layer to make it easier to use from C, thus WHITE (World-handling and interaction with the environment). At some point I ended up even translating the remaining C code to asm.

Not only it was my first project and I was learning, so there are many things that could be done better in another way, but the code is also a bit of a mess, and thinking for using it from C did not help either.

So basically you are brave :)

I had the temptation to port this to other machines (I have one in mind), but did not have the time yet. BTW, are you thinking on keeping the original graphics or adapting them? (the original are based on the Oric 6-bit per byte, so multiples of 6 horizontally, instead of the usual 8).

Regarding your question I used the naive approach of keeping the map in a 16x16 grid and the destination room is (by default) is calculated in that grid (west/east is room id +1/-1, north/south is room id -16/+16). The routine is is white.s:

Code: Select all

check_room_change
.(
	; But if it is the player-controlled character,
	; then we have to change room... if necessary
	
	asl
	asl
	tax 	; Get the index again

	lda _characters,x	; Get i
	cmp #BORDERLOW
	bcs no_west

	; Exited room by the west side... load room id-1
	lda #(BORDERHIGH-1)
	sta _characters,x
	dec _current_room
	lda _current_room
	sta _moving_chars,x
	jmp change_room

no_west
	cmp #BORDERHIGH
	bcc no_east
	
	; Exited room by east side... load room id+1
	lda #(BORDERLOW+1)
	sta _characters,x
	inc _current_room
	lda _current_room
	sta _moving_chars,x
	jmp change_room
no_east
	
	; Check j coordinate

	inx
	lda _characters,x	; Get j
	cmp #BORDERLOW
	bcs no_north

	; Exited room by the north side... load room id-16
	lda #(BORDERHIGH-1)
	sta _characters,x
	lda _current_room
	sec
	sbc #16
	sta _current_room
	dex
	sta _moving_chars,x
	jmp change_room

no_north
	cmp #(BORDERHIGH)
	bcc no_south
	
	; Exited room by south side... load room id+16
	lda #(BORDERLOW+1)
	sta _characters,x
	lda _current_room
	clc
	adc #16
	sta _current_room
	dex
	sta _moving_chars,x
	jmp change_room

change_room
	ldy #0
	sta (sp),y
	iny
	lda #0
	sta (sp),y

	jmp _white_load_room ; This is jsr/rts

no_south
	; No need to change room
    rts

.)
Lifts are implemented using a WHITE hook function, but you'll surely do it in a simpler manner.

Good luck!!!
jumpjack
1st Star Corporal
Posts: 10
Joined: Tue Nov 08, 2022 9:42 am

Re: Space99 - Development Forum

Post by jumpjack »

Thanks for replies.
I removed link to archive.org.
I fixed link to "executables": actually I confused link to oricutron executable bundled with the .dsk file, and zip archive containing the dsk file, maps anmd manual.
About licence, I am not an expert too.... :roll:
About the porting: in a first instance I will import graphics as they are (if I will ever succeed with the porting...); than I'll see if I can find volunteers for colouring the game... or for adding new levels!


Some more questions:
1) Where do I find info about wcmap.exe and wcgraph.exe used to compile the game? Or are these te executables of WHITE and NOISE? If not... where can I find such executables? I was only able to find sources.
2) About tiles: I see some tiles are 12 pixel large, others 24; this confuses Tiled map engine, which cannot properly flip them horizontally; how do you manage this in your source? To port to TIled, I think I'll have to resize all 12px tiles.

Note: I never coded an isometric game, so I am using yours to study this world. :-)
User avatar
Chema
Game master
Posts: 3014
Joined: Tue Jan 17, 2006 10:55 am
Location: Gijón, SPAIN
Contact:

Re: Space99 - Development Forum

Post by Chema »

jumpjack wrote: Thu Nov 10, 2022 2:08 pm Some more questions:
1) Where do I find info about wcmap.exe and wcgraph.exe used to compile the game? Or are these te executables of WHITE and NOISE? If not... where can I find such executables? I was only able to find sources.
They are in the repository https://osdn.net/projects/oricsdk/scm/s ... rce/tools/

Trying to clarify again: NOISE and WHITE are the names of the Oric engines (lower level = NOISE, higher level = WHITE), not external tools at all. NOISE handles all the rendering, moves a sprite and checks for collisions (returning a list of collisions). WHITE handles all the higher level functions, making it easier for a programmer to use NOISE. It handles the definition of fixed and movable objects, animates them, renders a room from a given room definition, changes rooms when needed, makes non controlled characters move, etc. It also offers some more advanced functions, such as callbacks for some events, hooks to allow a programmer to make his code be called when something happens (a new room is loaded, for instance), etc.

But all that is coded in asm for the Oric, and included in the NOISE and WHITE folders.

wcmap is used to get a map definition generated by my map editor (made in visual basic 6.0 back then) and compile it to a compact format that fits in the Oric memory. wcgraph is a tool to get the graphics and corresponding masks and compile them to a format directly usable in the game (arrays of numbers in asm source, that is).

txtcomp is a tool to compress the texts given as strings in asm format using a routine I developed back then.
jumpjack wrote: 2) About tiles: I see some tiles are 12 pixel large, others 24; this confuses Tiled map engine, which cannot properly flip them horizontally; how do you manage this in your source? To port to TIled, I think I'll have to resize all 12px tiles.
I think what we called "flats", that is walls, are just 12 pixel wide to save memory, as the rest would be always invisible. I think you can easily extend them to 24 keeping the part that is never visible as background.
jumpjack wrote: Note: I never coded an isometric game, so I am using yours to study this world. :-)
You are brave indeed!
jumpjack
1st Star Corporal
Posts: 10
Joined: Tue Nov 08, 2022 9:42 am

Re: Space99 - Development Forum

Post by jumpjack »

My converter to Tiled format successfully obtained the map of level 0! :-)

Image
https://github.com/jumpjack/Space1999Ad ... l0-v01.png

Now I have "just" to figure out how you and Tiled manage collisions and sprites... :shock: (and also to manage other levels, and objects, and achievements,...)

The map is here, in Tiled JSON format (TMJ), based on this tileset, which uses these images. Tiles are single PNG images with transparency rather than 2 BMP files (one for image and one for transparency mask).
Apparently 4 tiles images are present but never used (or probably they are "special" such as TRANSP_WALL..):
LIFT1
SURGERY_DOOR1
COR_DOOR1
PASSCODE
Last edited by jumpjack on Fri Jan 13, 2023 4:59 pm, edited 2 times in total.
User avatar
Chema
Game master
Posts: 3014
Joined: Tue Jan 17, 2006 10:55 am
Location: Gijón, SPAIN
Contact:

Re: Space99 - Development Forum

Post by Chema »

This is looking fantastic!!!

The graphics you mention are for animation of doors when opening and for the pyramid that represents a passcode you can get. Other objects are sprites, if I recall correctly, not as tiles.

The special tiles that are invisible, but treated as obstacles, are there to prevent the character from walking off limits. I think... it's been a very long time...
jumpjack
1st Star Corporal
Posts: 10
Joined: Tue Nov 08, 2022 9:42 am

Re: Space99 - Development Forum

Post by jumpjack »

I am really in trouble putting this map into any javascript isometric game engine. :-( I found half a dozen of them, but 90% of them are outdated and discontinued; I'm trying with Phaser3 and MelonJS, but with no success as of now. :-(
But in the meantime I successfully implemented a page which allows loading S1999 disk, or any other disk, into OricutronJS emulator:
https://jumpjack.github.io/oricutronJS/
User avatar
Chema
Game master
Posts: 3014
Joined: Tue Jan 17, 2006 10:55 am
Location: Gijón, SPAIN
Contact:

Re: Space99 - Development Forum

Post by Chema »

Great for the disk loading part!!

I know nothing about js isometric engines, sorry. I hope you finally find a suitable one.
jumpjack
1st Star Corporal
Posts: 10
Joined: Tue Nov 08, 2022 9:42 am

Re: Space99 - Development Forum

Post by jumpjack »

Dbug wrote: Thu Nov 10, 2022 10:53 am The game was actually started in 2004, 2006 is only when the discussion started on the forum, and technically I was also involved since I made the intro sequence for the game as well as the trailer "demo" :D
Added to credits. :wink:

@Chema, do you remember which method you used for depth sorting?

In the meantime I fixed some bugs in my port of OricutronJS, now it should work on any browser, allowing loading any .dsk file from local PC. New link:
https://jumpjack.github.io/oricutronJS/oricutron.html
jumpjack
1st Star Corporal
Posts: 10
Joined: Tue Nov 08, 2022 9:42 am

Re: Space99 - Development Forum

Post by jumpjack »

I switched to Adventure Game Studio.

As of now, you can only play with... an alien walking around Alpha control room! ;-)

https://jumpjack.github.io/Space1999Adv ... AGSdebug2/

You should be able to load the game source inside AGS (v. 3.6.0 RC4) by downloading this file (but I'm not sure, I'm quite a newbie in AGS, and Web support is a recently added feature).

I am currently figuring out how to implement objects.

Ah yes, I added some colors. :-)
User avatar
Chema
Game master
Posts: 3014
Joined: Tue Jan 17, 2006 10:55 am
Location: Gijón, SPAIN
Contact:

Re: Space99 - Development Forum

Post by Chema »

Really nice!!!
Post Reply