First Symbos Application

Página 3/47
1 | 2 | | 4 | 5 | 6 | 7 | 8

Por edoz

Prophet (2465)

Imagen del edoz

06-01-2014, 15:33

Thanks for the explanation! This makes something more clear to me already! So if I understand right you can have a max of 15 titles in 1 sheet ? So you split 1 sheet into 15 virtual locations and every location is named as a title ?
So in my case I created 16 Sheets (pictures) for my puzzle project.. so I was thinking wrong in this case ?
or is it possible to create 1 sheet that contains 1 title ? (This was how I was thinking) (before your explanation)

Por Trebmint2

Master (242)

Imagen del Trebmint2

06-01-2014, 16:06

No you can have as many tiles in a single sheet as you wish. If the sheet is 64x64 you could have 4 tiles of 32x32 or 16 of 16x16 or 256 of 8x8 or a single tile of 64x64.

I think the maximum number of tiles you can have off a sheet is 256. In theory you can have 64 sheets x 256 tiles... which should be enough Smile

The reason this is done because the image data is linear, turning it into tile sizes mean each tile data is a unique linear block. A sheet is really just a collection of many same size sprite blocks

Por Trebmint2

Master (242)

Imagen del Trebmint2

06-01-2014, 16:17

And yes you can create 16 sheets for each part of the puzzle, or one complete sheet split into tiles. Even 16 sheets effectively is treated like 16 tiles, just that the tile is the same size as the sheet.

The main thing is you have to IncludeSheet, and then load it into memory

Por edoz

Prophet (2465)

Imagen del edoz

06-01-2014, 17:06

Thanks, again. So when you load a sheet in your project in the end it's in the exe file or is it loaded at run time ?

Por Trebmint2

Master (242)

Imagen del Trebmint2

06-01-2014, 18:04

Think of the sheet part of symstudio as a paint package that generates images, it doesnt imbed them into the exe, however by using the IncludeSheet command in the code you do create the image as part of the DSK, which you then have to LoadSheet in the code at runtime. The images will exist in the DSK image but not be loaded with the exe. This means that a single image/sheet can then be created as a MSX 16 colour version, a CPC 4 colour version or even a 256 colour version on the dsk all from one original sheet... basically helps cross portability

There are 2 reasons for this. First its quite unusual to have an asset creator within a language, but since no other tool does create symbos format graphics its part of the symstudio suite (just not automatically tied together like the Form and the Code editor are). The same goes for the Video editor, its just an additional tool.

Second since symbos actually has two formats because of the difference between how the msx and cpc handles image data, it neccessary to be able to create a CPC and MSX version if need be and load them in as required. No point holding two versions as this is wasteful. Although if you load a CPC graphic in on the MSX it will convert it automatically,there can be side effects with this so the ability to produce all the assets you need and then load them as you require seemed the best idea

Por edoz

Prophet (2465)

Imagen del edoz

06-01-2014, 18:08

I like the idea that they are not embedded in the exe file. In this way I could create multiple graphic files for each level. Or users can create their own map etc. So it's clear to me now. Let's code Big smile Many thanks for the explanations. They are very helpful to understand how symbos and symstudio works. Now I'm aware how it works and the only thing is to do it Big smile

Por Trebmint2

Master (242)

Imagen del Trebmint2

06-01-2014, 18:25

I must admit that this info was based on the last version of symstudio, which as many people have noticed doesnt seem to work. Im looking into this and hopefully with prodatrons help I hope to get it compiling good code again. Unfortuantely older versions of symstudio might be different or just lack elements. It was very much a work in progress.

I will keep people updated re progress. Rob

Por edoz

Prophet (2465)

Imagen del edoz

06-01-2014, 18:46

It has some bugs.. sometimes it's crashing.. but I save a lot and I remember to avoid a crash Big smile
But the good part is that I can do something with it! So it's really nice what you and prodatron has created in the past!

Por edoz

Prophet (2465)

Imagen del edoz

06-01-2014, 20:07

OK.. here is the first question.

- I created a bitmap in Photoshop with a resolution of 128x128 pixels
- I created a new project in Symbos and loaded the sheet into the project.

- I created a new form with contains 16 image boxes with title 0 till 15 (only one sheet this time)

During compile I got this errors

First I thought it was something in my code. But I disabled (REM) all the code items and even then I got this error.
Is there a way to capture the full compile log ? I think there is something wrong with the sheet.. but I have no idea..
Hope for suggestions ?

This is the code

;Global Message

;Global Position1,Position2,Position3,Position4,Position5,Position6,Position7
;Global Position8,Position9,Position10,Position11,Position12,Position13
;Global Position14,Position15,Position16

;Global X_Position1%,Y_Position1%
;Global X_Position2%,Y_Position2%
;Global X_Position3%,Y_Position3%
;Global X_Position4%,Y_Position4%
;Global X_Position5%,Y_Position5%
;Global X_Position6%,Y_Position6%
;Global X_Position7%,Y_Position7%
;Global X_Position8%,Y_Position8%
;Global X_Position9%,Y_Position9%
;Global X_Position10%,Y_Position10%
;Global X_Position11%,Y_Position11%
;Global X_Position12%,Y_Position12%
;Global X_Position13%,Y_Position13%
;Global X_Position14%,Y_Position14%
;Global X_Position15%,Y_Position15%
;Global X_Position16%,Y_Position16%

;Global OpenLocation%

;IncludeSheet "puzzlemap",1,1,32,32

;**** Code called on Opening Window Form1
FUNCTION Form1_Open


;Set defaults

;X_Position1=1
;Y_Position1=1
;X_Position2=64
;Y_Position2=1
;X_Position3=128
;Y_Position3=1
;X_Position4=192
;Y_Position4=1

;X_Position5=1
;Y_Position5=32
;X_Position6=64
;Y_Position6=32
;X_Position7=128
;Y_Position7=32
;X_Position8=192
;Y_Position8=32

;X_Position9=1
;Y_Position9=64
;X_Position10=64
;Y_Position10=64
;X_Position11=128
;Y_Position11=64
;X_Position12=192
;Y_Position12=64

;X_Position13=1
;Y_Position13=96
;X_Position14=64
;Y_Position14=96
;X_Position15=128
;Y_Position15=96
;X_Position16=192
;Y_Position16=96

;OpenLocation=16


;setObjPos(Imagebox1_ID,X_Position1,Y_Position1)
;setObjPos(Imagebox2_ID,X_Position2,Y_Position2)
;setObjPos(Imagebox3_ID,X_Position3,Y_Position3)
;setObjPos(Imagebox4_ID,X_Position4,Y_Position4)
;setObjPos(Imagebox5_ID,X_Position5,Y_Position5)
;setObjPos(Imagebox6_ID,X_Position6,Y_Position6)
;setObjPos(Imagebox7_ID,X_Position7,Y_Position7)
;setObjPos(Imagebox8_ID,X_Position8,Y_Position8)
;setObjPos(Imagebox9_ID,X_Position9,Y_Position9)
;setObjPos(Imagebox10_ID,X_Position10,Y_Position10)
;setObjPos(Imagebox11_ID,X_Position11,Y_Position11)
;setObjPos(Imagebox12_ID,X_Position12,Y_Position12)
;setObjPos(Imagebox13_ID,X_Position13,Y_Position13)
;setObjPos(Imagebox14_ID,X_Position14,Y_Position14)
;setObjPos(Imagebox15_ID,X_Position15,Y_Position15)


	
;	RefreshObj ImageBox1_ID
;	RefreshObj ImageBox2_ID
;	RefreshObj ImageBox3_ID
;	RefreshObj ImageBox4_ID
;	RefreshObj ImageBox5_ID
;	RefreshObj ImageBox6_ID
;	RefreshObj ImageBox7_ID
;	RefreshObj ImageBox8_ID
;	RefreshObj ImageBox9_ID
;	RefreshObj ImageBox10_ID
;	RefreshObj ImageBox11_ID
;	RefreshObj ImageBox12_ID
;	RefreshObj ImageBox13_ID
;	RefreshObj ImageBox14_ID

;	RefreshObj Form1


ENDF


;**** Main loop of Form Form1
FUNCTION Form1_Main

ENDF


;**** Code called on event occuring on Timer1
;FUNCTION Timer1_Event
;b=b+1
;setObjPos(Imagebox1_ID,b,50)
;RefreshObject Form1
;RefreshObject ImageBox1_ID

;****

;**** Code called on event occuring on ImageBox1
FUNCTION ImageBox1_Event

ENDF
;**** Code called on event occuring on Button1
FUNCTION Button1_Event

ENDF
;**** Code called on event occuring on ImageBox2
FUNCTION ImageBox2_Event

ENDF
;**** Code called on event occuring on ImageBox3
FUNCTION ImageBox3_Event

ENDF
;**** Code called on event occuring on ImageBox4
FUNCTION ImageBox4_Event

ENDF
;**** Code called on event occuring on ImageBox5
FUNCTION ImageBox5_Event

ENDF
;**** Code called on event occuring on ImageBox6
FUNCTION ImageBox6_Event

ENDF
;**** Code called on event occuring on ImageBox7
FUNCTION ImageBox7_Event

ENDF
;**** Code called on event occuring on ImageBox12
FUNCTION ImageBox12_Event

ENDF
;**** Code called on event occuring on ImageBox13
FUNCTION ImageBox13_Event

ENDF
;**** Code called on event occuring on ImageBox14
FUNCTION ImageBox14_Event

ENDF
;**** Code called on event occuring on ImageBox15
FUNCTION ImageBox15_Event

ENDF
;**** Code called on event occuring on ImageBox16
FUNCTION ImageBox16_Event

ENDF
;**** Code called on Closing Window Form1
FUNCTION Form1_Close

ENDF
;**** Code called on Resize Window occuring on Form1
FUNCTION Form1_Resize

ENDF

What is this ? (if i copy and past it is visible)
FNC_FIL_FILINP  equ 020
FNC_FIL_FILINP  equ 020
FNC_FIL_FILOUT  equ 021
FNC_FI



Por Trebmint2

Master (242)

Imagen del Trebmint2

06-01-2014, 21:00

Hey edoz, sorry it seems this info that I was giving you is wrong in thats how the latest version works but your version does actually not require loading as it is embedded with IncludeSheet

So try altering the IncludeSheet to be IncludeSheet 1,1,32,32 (Not IncludeSheet "Puzzlemap",1,1,32,32)

I think this will stop the compile errors... though the image might not be correct. Difficult for me to correct as I've got the later version

Página 3/47
1 | 2 | | 4 | 5 | 6 | 7 | 8