Space99 - Development Forum

Want to talks about games you like, would like to see developed on the Oric, it's here.
User avatar
Dbug
Site Admin
Posts: 4461
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Post by Dbug »

Twilighte wrote:ok, have only now begun to design the map, which was a bit of a pain because space99 is circular, so more than 4 rooms are accessable from the Main mission control tower.
Hum, and why not use 4 different screens for the main mission control tower, with for exemple in one corner of each screen something that looks like a quadrant of some central computer/desk thing ?

This way you can have way more entrances, and it look like a very large room :)
User avatar
Twilighte
Game master
Posts: 819
Joined: Sat Jan 07, 2006 12:07 am
Location: Luton, UK
Contact:

Post by Twilighte »

Hum, and why not use 4 different screens for the main mission control tower, with for exemple in one corner of each screen something that looks like a quadrant of some central computer/desk thing ?
That sounds better, amended below...

Code: Select all

      CC    16 17 18 25 HH HH AA
      HH HH 07 08 08 08
   15 06 06 07 08 02 23 09
   15 12 00 01 01 HH HH 09
   14 14 14 01 01 03 03 10
   HH HH 21 05 04 04 24 10
BB HH 20 20 22 11 11 11 10
   HH       13 13 19 19
   EE                HH
                     DD

AA Launch pad 3
BB Launch pad 1
CC Launch pad 2
DD Launch pad 4
EE Launch pad 5
HH Travel Tube
00 Main mission computer Annex
01 Main mission Command Tower
02 Weapons Store
03 Chemical Labs
04 Weapons Section
05 Computer Section
06 Medical Center
07 Astrophysics Labs
08 Technical Section
09 Technical Experimentations Labs
10 Geological Labs
11 Accomodation Unit
12 Fuel Storage (Non-Flammable)
13 Nuclear generating facility 3
14 Recreation and dining complex
15 Hydroponics Farms
16 Nuclear generating facility 1
17 Life Support Equipment Stores
18 Life Support systems building
19 Observatory
20 Maintenance building
21 Nuclear generating facility
22 Deep space tracking station
23 Chemical stores
24 Technical stores
25 Alien Life experimentation Unit
User avatar
Chema
Game master
Posts: 3020
Joined: Tue Jan 17, 2006 10:55 am
Location: Gijón, SPAIN
Contact:

Post by Chema »

Twilighte wrote:
Hum, and why not use 4 different screens for the main mission control tower, with for exemple in one corner of each screen something that looks like a quadrant of some central computer/desk thing ?
That sounds better, amended below...
Back from my (short) vacations... and ready to continue with this...

You have indeed made a great progress! I only gave out this version to you so you could experiment a bit with tiles, not to map all Alpha complex!

Could you send me the tile files and the generated saved map so I can have a look?

I will inmediately start working on the list of points you stated in your previous post, to make the editor more usable... It is (nearly) my first VB project, so I am not used to this programming environment. For example I wanted to use the mouse wheel to loop through available levels, but found no way to do it with vb6.

And about the ALT+Tab thingy... I have no idea, but will have a look.

I also took some time to think a bit about the engine and I came up with an idea that coud be interesting.

The biggest problem is extending WHITE capabilities, with things as add-ons in the map format or special behaviours (like alternative colors for rooms in special game circumstances or exits that do not move you to the adjacent room -- I have something evil in mind for this), and I think the answer could be: Hook functions.

At some game points there could be hook points, that will convert into calling a user defined routine.

The easiest way I thought of is just inserting 3 nop Opcodes at those points and having two functions:

Code: Select all

 
white_install_hook(void funct(void), char hook_id)
white_uninstall_hook(char hook_id)
That will modify code so that those 3 nop's are converted in to a jsr _funct.

Hook ids could be a table with all those hook points in the code, and user should have access to some global variables.

This way the user can install a hook at runtime, for example just after the room ID, size, type... are loaded and act accordingly (for example setting ink color to red despite the room color when in emergency), or just before the next room is loaded and modify the destination.

When a hook is not used (or uninstalled) it only takes an overhead of 3 bytes and 3 cycles.. Maybe you have a better suggestion? What do you think?

Regards,
User avatar
Chema
Game master
Posts: 3020
Joined: Tue Jan 17, 2006 10:55 am
Location: Gijón, SPAIN
Contact:

Post by Chema »

BTW...

Made a couple of things on the editor...

1) Fixed the ALT+TAB thing
2) Highlight the tile at which a flat is to be put, and add a kind of shadow for when it is on higher layers. Graphics are still horrible, but they work!

Onto the list of flats and the arrow keys now...

Any more things needed? :)
User avatar
Chema
Game master
Posts: 3020
Joined: Tue Jan 17, 2006 10:55 am
Location: Gijón, SPAIN
Contact:

Post by Chema »

Ok, finished the small command line program that takes the tileset definition file used by the editor and uses PictConv to generate a .s and .h files as needed by WHITE.

This should save hours for testing graphics...

Should move now onto modifying the mapload function and the utility that takes the world map generated by the editor and creates a .s file with the new format that is to be used in WHITE.

BTW Twilighte, a couple of things now that you are onto designing the map:

1/ Remember that WHITE checks if the current character reaches the border of a room to automatically change to the destination, so doors SHOULD be made of at least one empty tile.

A closed door may have the actual door drawn in that tile, making it impossible to walk through, unless it is opened (the tile is removed and changed to 0, maybe with some animation).

2/ In a (near) future I will implement different room sizes (10x10, 10x5, 5x10 and 5x5) so WHITE will decide that the character has reached a border at different coordinates depending on this size. It should be easy to create corridors and small rooms with this technique.

3/ Alpha station has many different levels. We can implement this with lifts (or elevators). A closed cabin or a closed door in a room border could do, as it would be easy to change to other world map sections when the user interacts (open) those doors. It would be easier if they are cabins instead of doors in the border walls, but I could manage to make it work in both cases with the hook functions idea.

Best regards,
User avatar
Chema
Game master
Posts: 3020
Joined: Tue Jan 17, 2006 10:55 am
Location: Gijón, SPAIN
Contact:

Post by Chema »

One note more...

In addition to the recent small modifications, I have changed the map format used by the editor, mainly so it saves tile names (those on the tile list) instead of codes. That would help generating more readable data for WHITE (using #defines for tiles instead of raw data in the .s files).

I have uploaded the new executable as well as the example world map with this new format in a single zip file (weditor02.zip). You should only need to substitute the editor.exe.

Any bugs, please let me know.

Ah! and if you need me to convert any map you had with the old format, I can do so easily. Send me the file.

Cheers.
User avatar
Chema
Game master
Posts: 3020
Joined: Tue Jan 17, 2006 10:55 am
Location: Gijón, SPAIN
Contact:

Post by Chema »

Greetings again,

Even at the risk of becoming harassing a small update :)

The tileset "compiler" is ready and working, even if I have not tested it into white yet. It converts all the pictures in the set and creates all the necessary data to use them directly in white in a .s file and a set of #defines for easy handling of tile codes.

The room "compiler" is at 80% (more or less). It only lacks the output data generation (the .s file), but it calculates the base tiles for all 4 walls and all the internal data needed for output generation correctly (it seems).

I would like to test how it "compresses" some rooms and some other tests to avoid bugs.

Twilighte, please, as soon as you have one or two rooms designed (or some initial test design), please upload the tileset and the map file so I can make some tests before start generating code and rewriting the mapload function.

My schedule:

- Finish the room compiler and the mapload function and test everything in WHITE.
- Perform some testing and implementation of the hook function idea.
- See if some optimizations I have in mind are feasible.

Next week, more news... even if I foresee very little spare time for the following weeks...

Regards,
User avatar
Twilighte
Game master
Posts: 819
Joined: Sat Jan 07, 2006 12:07 am
Location: Luton, UK
Contact:

Post by Twilighte »

Hi Chema, apologies for not responding before, i have been busy with various other projects, such as...
1) Found a way to convert thousands of Spectrum tunes to the Oric and have been writing an encoder and player for it.
2) Have been inundated with work related stuff and felt like just wanting to be a couch potato every night :(
3) Have been busy researching the new discovery of the fabled Oric CP/M board that Peter Halford worked on in the last years of Oric (1985), please see the Oric the story so far for glimpses about this.

I will try and get some rooms sorted this weekend. it would be cool if it were possible to place larger objects on the editor, even if they are dimensioned as multiples of the single block and the compiler just splits the graphics at compiler time.

btw, where do i get the next version of White from?
User avatar
Chema
Game master
Posts: 3020
Joined: Tue Jan 17, 2006 10:55 am
Location: Gijón, SPAIN
Contact:

Post by Chema »

Twilighte wrote:Hi Chema, apologies for not responding before, i have been busy with various other projects, such as...
1) Found a way to convert thousands of Spectrum tunes to the Oric and have been writing an encoder and player for it.
2) Have been inundated with work related stuff and felt like just wanting to be a couch potato every night :(
3) Have been busy researching the new discovery of the fabled Oric CP/M board that Peter Halford worked on in the last years of Oric (1985), please see the Oric the story so far for glimpses about this.

I will try and get some rooms sorted this weekend. it would be cool if it were possible to place larger objects on the editor, even if they are dimensioned as multiples of the single block and the compiler just splits the graphics at compiler time.

Don't worry :) I guessed you were busy. The same happens to me from time to time...

You have a couple of interesting projects... I can't wait to have a look at them :)

About the larger objects, I have thought about that idea during my vacations, something easy like a macro, so you can place objects composed by several different tiles, but

a/ the user interface for defining such those objects has to be developed, and I don't know if it would be better to concentrate efforts on other areas for the time being. Mmmm maybe it could be easy to define them with a text file and directly use them in the editor... don't know.

b/ would it be really useful? I mean, would such compound of objects repeat enough times as to worth the effort of including this feature? It is you who is working in the graphic design, but I thought most objects would be just a tile width and depth, and if they can be higher with no problem (such as flats).

I suppose things like the command desk or the table with seats at Main Mission are examples of larger objects, but the do not repeat much. Most of those tables could be made up of the same basic tiles (corners, lamps, main tables, chairs,...) easily. Ok, I know there can be round tables that will be made up of several tiles...

Other things like beds could be made of 2 tile objects and communication posts (those columns all around Alpha), Earth globes, chairs, and most objects can be done with 1 tile.

In case big objects repeat quite often, it could be interesting to take benefit of it for compressing the room data even more, maybe with a compound objects section where you specify that a round table of 2x2 tiles is placed at a certain location instead of specifiying every block separately.

Anyway, if you can manage to start designing without this feature, please do so and we can study the issue after I finish some other details...
Twilighte wrote: btw, where do i get the next version of White from?
There is no "next version" of WHITE yet, really... I have a development version I am working with, but won't be finished until I can integrate the room data. That is why I need some examples of rooms and tiles, so I can be sure it is working and you can easily test them.

As soon as this is done, I will provide you with a version so you can test in an Oric your designs, consisting on a character that you can move around rooms.

Oh, if you mean the latest version of the editor (WHITE is the library for using the engine within a C -or asm- program in an Oric), it is here:

http://www.defence-force.org/ftp/forum/ ... itor02.zip

Regards,
User avatar
Twilighte
Game master
Posts: 819
Joined: Sat Jan 07, 2006 12:07 am
Location: Luton, UK
Contact:

Post by Twilighte »

Woh, just tried latest version of editor, and realise this is way more cool now. I can see where to plot things with the help of the "Snap Cursor" which also reflects correctly for each height or layer.
I can see now the reason for limiting object sizes.

I notice their is a Chars Tab but no idea why?

I need to get some more graphics done, especially objects like the Tables and chairs.
I also want to have a semi-transparent window section for research labs where the top half is a pain of glass and the bottom half is a solid wall.

Apologies for delay. i'll work on some screens tonight...

Ok, i have a single screen done...

http://www.defence-force.org/ftp/forum/ ... 999Map.zip

However i find i cannot easily select a different screen, the double click is either set too fast or just impossible to use.
if i double click on the adjacent room (defined Screen (Sleeping quarters) is room number 0) it turns to blue and cursor is moved but doesn't show it.
if i drag the room it highlights an enlarging red square.
if i hold shift down, it moves to wherever the cursor ended up but i just want to select another room.
User avatar
Chema
Game master
Posts: 3020
Joined: Tue Jan 17, 2006 10:55 am
Location: Gijón, SPAIN
Contact:

Post by Chema »

Twilighte wrote:Woh, just tried latest version of editor, and realise this is way more cool now. I can see where to plot things with the help of the "Snap Cursor" which also reflects correctly for each height or layer.
I can see now the reason for limiting object sizes.
Yep, and also keep in mind, for your designs, that you can also develop "decorations" for flats... e.g. in a dungeon-like game instead of drawing three flats with one empty wall, another with a torch and another with an axe (on a hook) you can use the same flat and add (at layer 1 or higher) one torch or one axe or any other decoration.

In Space 1999 decorations might be those maps that sometimes appears on walls, or text on vdu screens or symbols on walls or doors.

Also this is useful for objects. Say I would like to put my laser gun on one of the shelves of your flats...

This should be kept in mind, so "decorations" lie correctly on the wall graphics.
I notice their is a Chars Tab but no idea why?
Not used yet. I may use it in a near future to place characters that are at that room, so you can define their appearance, type of animation, automatic move, etc.

For now (and I think for this game it is enough) all the characters are "global", that means that they are initialized outside the map, so they can be moved around the world and keep their last satus even if you leave a room and enter it again.
I need to get some more graphics done, especially objects like the Tables and chairs.
I also want to have a semi-transparent window section for research labs where the top half is a pain of glass and the bottom half is a solid wall.
That would be very nice. The mask does the work, but I suppose the design is what is more complicated :)
Apologies for delay. i'll work on some screens tonight...

Ok, i have a single screen done...

http://www.defence-force.org/ftp/forum/ ... 999Map.zip
Could you please send me the tileset file (the txt file with the list of tiles graphic bitmap and corresponding mask bitmap) so I don't have to generate it by hand? I think I have not seen him in the zip file.
However i find i cannot easily select a different screen, the double click is either set too fast or just impossible to use.
if i double click on the adjacent room (defined Screen (Sleeping quarters) is room number 0) it turns to blue and cursor is moved but doesn't show it.
if i drag the room it highlights an enlarging red square.
if i hold shift down, it moves to wherever the cursor ended up but i just want to select another room.
Mmmm... I will have a look. I did not find a problem in my tests. With a double click what you do is "creating" an empty room (by default they are not initialized, as is shown with a label over the room graphic). Defined rooms (even if empty) should show in blue and a simple click should let you move from one room to another.

Also the cursor keys do the same thing.

¿Does the room number shown below the world map and avobe the room graphic area change when you click over a different square?

I can see in your world file (Space1999.txt) that there are several rooms defined, some of them empty. Send me the tileset file and I will load it and have a look.

Ooops... and now that you mention it I have not set up a method for deleting a room entry :)

Well as it is a very easy text file I can tidy it up by hand, if needs be.

On another note the world compiler is ready and I am moving onto rewriting the function that loads a room from the map. Until I have it ready I won't be able to completely debug it.

Rooms take up more space now, so we might need to be careful if we don't want to eat up all the Oric's memory. I cannot provide numbers yet, but, for example, room 0 in your map takes up 77 bytes.

That is the price for a more flexible and easier format :)

Regards,
User avatar
Twilighte
Game master
Posts: 819
Joined: Sat Jan 07, 2006 12:07 am
Location: Luton, UK
Contact:

Post by Twilighte »

Mmmm... I will have a look. I did not find a problem in my tests. With a double click what you do is "creating" an empty room (by default they are not initialized, as is shown with a label over the room graphic). Defined rooms (even if empty) should show in blue and a simple click should let you move from one room to another.

Also the cursor keys do the same thing.

¿Does the room number shown below the world map and avobe the room graphic area change when you click over a different square?
Yes...
ok, forgot about the cursor keys, which make the world of difference! :D
Now i can select the room i want, move a room and define a map, which is exactly what i plan to do next. :)
The delete room would be very cool, but since i will know the room number, i should be able to edit it out of the text file manually for now :idea:
Could you please send me the tileset file (the txt file with the list of tiles graphic bitmap and corresponding mask bitmap) so I don't have to generate it by hand? I think I have not seen him in the zip file.
Yes, apologies, i will zip up the complete white directory. It is just easier than selective file compiling :)

You can find it here...

http://www.defence-force.org/ftp/forum/ ... /White.zip

However it would be a cool idea :idea: if when you save the world, it would save all data for that world (including tileset txt, graphics, etc) in a folder made of the project name.

I may have mentioned this before, but it would be really cool if the mirror flag (when set) changed the view in the picture/mask images on the tile set tab.

I also notice a strange curly line top right of the blue grid. No idea if this is intentional for some unfathomable reason?

With the single room provided, it is still a shame we cannot do floors. :(
User avatar
Chema
Game master
Posts: 3020
Joined: Tue Jan 17, 2006 10:55 am
Location: Gijón, SPAIN
Contact:

Post by Chema »

Twilighte wrote:Yes...
ok, forgot about the cursor keys, which make the world of difference! :D
Now i can select the room i want, move a room and define a map, which is exactly what i plan to do next. :)
The delete room would be very cool, but since i will know the room number, i should be able to edit it out of the text file manually for now :idea:
Ah, glad you find it useful... I did not spend too much time with this application, so it is rather cumbersome, I know.
Could you please send me the tileset file (the txt file with the list of tiles graphic bitmap and corresponding mask bitmap) so I don't have to generate it by hand? I think I have not seen him in the zip file.
Yes, apologies, i will zip up the complete white directory. It is just easier than selective file compiling :)

You can find it here...

http://www.defence-force.org/ftp/forum/ ... /White.zip
Excellent... I will have a look just now.
However it would be a cool idea :idea: if when you save the world, it would save all data for that world (including tileset txt, graphics, etc) in a folder made of the project name.
Yes, you are right. I have to add some menu to manage the project and all the files, so it is easy to add things to a tileset, for example. I only need to find time for it, but I have it in mind.
I may have mentioned this before, but it would be really cool if the mirror flag (when set) changed the view in the picture/mask images on the tile set tab.
Yes. Another thing I have on the "to-do" list :) Because of how I load those graphics (using a method of the control) they cannot be mirrored. I have to switch to use the StretchBlt again... If you can live without it for now, it would be great.
I also notice a strange curly line top right of the blue grid. No idea if this is intentional for some unfathomable reason?
LOL... Will you believe I have not seen it till now that you mentioned? Surely I painted it without noticing!
With the single room provided, it is still a shame we cannot do floors. :(
You mean floor tiles? It is... and I want to have a look at it. But that is mainly because of how the engine paints tiles and it will take a lot of CPU to add this.... I want to re-think that part of the code, but that will take long. There is a lot of work yet to be done.

Remember you can use stairs. Feel free to create an adequate graphic for them, but keep their name (the label on the tileset STAIRx) for now, please.

This way you can create platforms on rooms, just like they exist between Main Mission and the Command Room (is it the name?) which is adjacent.

In fact we could have different levels in a room, but as a character is 3 layers heigth (8x3=24 3D "pixels") it should be put at layer 4, so there is no room (no more layers) for placing objects. I can extend layers to 5 or more (up to 7) with just changing a define, but it takes more memory and slows down the engine.

I think you could do just some test and experiment with room designs to see what can and what cannot be done and we can move onto the complete map design a bit later, but as you wish.

If we are able to have a good map, with your astonishing graphics and an interesting plot, we can create a small video adventure with what we currently have, and maybe extend it later.

One more thing. To save some space in rooms, you can follow a couple of recommendations:

1- The compiler calculates the most used flat at each wall and stores it in a single byte. THe loader then uses this value to fill the whole wall. The rest are stored as objects (which take more space, as we need the coordinates). So (in the extremes) a wall with all the flats being the same takes up little space, while if they are all different, the size becomes huge.

2.- The compiler stores blocks as:

Code: Select all

 
ID (1 byte)
times it appears (1 byte)
coordinates (1 byte per appearance of this block) 
So it takes up less space to place many blocks around the room if they are all equal, than just a few if they are different.

Combining 1 & 2 results in that a wall with all flats being WALL but a two being VDU takes less space than if one is an VDU and the other is a GRILL, for instance.

3.- Mirrored blocks have different ID (different entries in the data), so be sure to mirror them only if necessary, to save space.

If you find this difficult to follow, just ignore it. I can have a look at rooms and, pinpoint you with some changes that could save space, if they exist.

Regards,
User avatar
Chema
Game master
Posts: 3020
Joined: Tue Jan 17, 2006 10:55 am
Location: Gijón, SPAIN
Contact:

Post by Chema »

A couple of things more...

I just loaded your room and it is impressive! I like your designs very much indeed :)

I have some questions, though...

1/ Aren't those beds too big? I mean, if you scroll down the list of tiles, you can find one called HELENA which is the image of a character, so you can place it anywhere for size reference. A bed size of 2x3 or even 1x2 could be enough, I think... but it is you the expert in this area :)

2/ Wouldn't it be nice to have also flats on those walls that do not have them currently? Such as south and east walls, so we don't need to put a door or something similar to indicate you can move to another room in that direction. Would that work?

3/ You can freely place flats anywhere, so you can make a kind of bathroom or closet in one corner of the room, even if I am not sure if the character would be difficult to see when inside.

4/ Testing the above possibilities I noticed we have a problem with lower-down corners: as you can only place one flat at each position it is not possible to draw a corner. Maybe we need a single flat for those cases?

Regards,
User avatar
Chema
Game master
Posts: 3020
Joined: Tue Jan 17, 2006 10:55 am
Location: Gijón, SPAIN
Contact:

Post by Chema »

My last post today... I promise :)

The loading of rooms is done. The routine is about 650 bytes long (which is quite a lot even with this easier room format, but there is some room for optimization -- anyone interested :) )

It takes a bit more than 1 second to completely load a 58 bytes room and display it in screen. If it keeps this speed more or less with more complex rooms, it could suffice.

Now I have to tidy everything up so I can easily generate the data files with a simple .bat and recompiling. As soon as this is done I can easily test Twilighte designs...

Another item to remove from the to-do list :)

Cheers.
Post Reply