Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, 1 invisible), 1,086 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
converting the 2D side scroller tut to Lite-C #242416
12/22/08 23:26
12/22/08 23:26
Joined: Feb 2008
Posts: 87
O
OblivionDrake Offline OP
Junior Member
OblivionDrake  Offline OP
Junior Member
O

Joined: Feb 2008
Posts: 87
Hello I'm trying to do the 2D side scroller from the AU resoures page but in Lite-C and I keep getting and error in my code.

#include <acknex.h>
#include <default.c>

BMAP* fond_pcx="fond.pcx";

PANAL* fond_pan = ////////This is were it says theres an error
{
pos_x=0;
pos_y=0;
layer=0;
bmap=fond_pcx
flags = OVERLAY | VISIBLE;
}

function main()
{
video_mode = 7;
screen_color.blue = 150;
}

I'v been jumping back and forth between this tutorial and the Lite-C workshop and am at a lose as to whats wrong with that particular line.

my only thought is if there isn't anything wrong with the script then it mint be the sprites since I cant view them unless I agree to some EULA license and if thats the case can anyone tell me whats on the each picture so I can make my own form of the sprites.

Re: converting the 2D side scroller tut to Lite-C [Re: OblivionDrake] #242419
12/22/08 23:46
12/22/08 23:46
Joined: Jul 2008
Posts: 894
T
TechMuc Offline
User
TechMuc  Offline
User
T

Joined: Jul 2008
Posts: 894
correct is PANEL*
and not PANAL

see english dictionary --> panel :p

Re: converting the 2D side scroller tut to Lite-C [Re: TechMuc] #242423
12/23/08 00:08
12/23/08 00:08
Joined: Feb 2008
Posts: 87
O
OblivionDrake Offline OP
Junior Member
OblivionDrake  Offline OP
Junior Member
O

Joined: Feb 2008
Posts: 87
Thanks TechMuc I sometimes over look little things like that but now I get an error here:

#include <acknex.h>
#include <default.c>

BMAP* fond_pcx="fond.pcx";

PANEL* fond_pan=
{
pos_x=0;
pos_y=0;
layer=0;
bmap=fond_pcx //////////////In these two lines
flags = OVERLAY | VISIBLE;//
}

function main()
{
video_mode = 7;
screen_color.blue = 150;
}

the message sayes ():too many parameters flags
():Syntax error

anyone know whats wrong there?

Re: converting the 2D side scroller tut to Lite-C [Re: OblivionDrake] #242424
12/23/08 00:09
12/23/08 00:09
Joined: Jan 2008
Posts: 1,580
Blade280891 Offline
Serious User
Blade280891  Offline
Serious User

Joined: Jan 2008
Posts: 1,580
try adding a semicolon to the end of fond_pcx


My Avatar Randomness V2

"Someone get me to the doctor, and someone call the nurse
And someone buy me roses, and someone burned the church"
Re: converting the 2D side scroller tut to Lite-C [Re: Blade280891] #242425
12/23/08 00:36
12/23/08 00:36
Joined: Feb 2008
Posts: 87
O
OblivionDrake Offline OP
Junior Member
OblivionDrake  Offline OP
Junior Member
O

Joined: Feb 2008
Posts: 87
Yes Blade28081991 you are my hero!!!!
Like I mentioned to TechMuc its always the little thing that get me.

again thanks

ill most likely post the finished code here that is unless I have anyother problems.

Re: converting the 2D side scroller tut to Lite-C [Re: OblivionDrake] #242435
12/23/08 02:36
12/23/08 02:36
Joined: Feb 2008
Posts: 87
O
OblivionDrake Offline OP
Junior Member
OblivionDrake  Offline OP
Junior Member
O

Joined: Feb 2008
Posts: 87
Back and with more than one problem now but not because of a little miss step more because of my lack of Lite-C knowledge. My next major task is to creat a sky panel that moves and has the bmap refresh so it makes the illuion of a neverending sky as the player moves.

Now Ive followed the instructions by creating a second panel using the same sky bmap and but it directly beside the other. But in doing this I had to change some things and one thing which Im not so sure I replaced it with the right thing.In this code:

panel scroll_ciel_pan
{
pos_x = 0; pos_y = 0;
layer = 1;
bmap = ciel_map;
flags = refresh;///////refresh isnt anything in Lite-C
}

so I replaced it with OVERLAY | VISIBLE which alows it to show up but im not shure thats all that the refresh statment in C-script did. So my question is Is what I replaced refresh with alright or was there something else I should have replace it with?

The other thing is that I moved on and am at this step were I add this function

function avance_ciel()
{
ciel_pos +=1; ////////////////but theres a problem with this line
if (ciel_pos >= 640){ciel_pos = 0;}
}

And Im not sure how to fix it or if theres anything else wrong with this function that needs to be updated to Lite-C.

Re: converting the 2D side scroller tut to Lite-C [Re: OblivionDrake] #242537
12/23/08 23:35
12/23/08 23:35
Joined: Apr 2006
Posts: 737
Ottawa, Canada
O
Ottawa Offline
User
Ottawa  Offline
User
O

Joined: Apr 2006
Posts: 737
Ottawa, Canada
Hi!
panel scroll_ciel_pan

should be

PANEL* scroll_ciel_pan

Hope this helps

Ottawa smile

Re: converting the 2D side scroller tut to Lite-C [Re: Ottawa] #242541
12/24/08 00:04
12/24/08 00:04
Joined: Feb 2008
Posts: 87
O
OblivionDrake Offline OP
Junior Member
OblivionDrake  Offline OP
Junior Member
O

Joined: Feb 2008
Posts: 87
Thanks for the reply but I was more conserned about the parts of the script that I made comments by.

Re: converting the 2D side scroller tut to Lite-C [Re: OblivionDrake] #242649
12/24/08 21:35
12/24/08 21:35
Joined: Feb 2008
Posts: 87
O
OblivionDrake Offline OP
Junior Member
OblivionDrake  Offline OP
Junior Member
O

Joined: Feb 2008
Posts: 87
Just to clarify what Im asking since in the original C-script tutorial the comments in there code all of a sudden on page 19 change into a different langue and I had to do a couple more panels before I was told that the code in question with the ciel_pos +=1; posted above. Is soposible a movement code to make a scrolling sky and that is were Im stuck cause I cant figure out what I need to change in that line to make it Lite-C.

Also after looking though the manual that flag = refresh; must of been done away with a wile ago since I couldn't even find it under any section so I guess Im just gona keep using OVERLAY | VISIBLE until it bites me in the ass.

help would be nice.

Re: converting the 2D side scroller tut to Lite-C [Re: OblivionDrake] #242652
12/24/08 22:17
12/24/08 22:17
Joined: Feb 2008
Posts: 87
O
OblivionDrake Offline OP
Junior Member
OblivionDrake  Offline OP
Junior Member
O

Joined: Feb 2008
Posts: 87
Update on how far I am into this but I still have the same problems with the sky scrolling and now since I just continued on in the Tutorial the scrolling mountains since they use the same formula. The places betten the long comment lines is were I need help.

#include <acknex.h>
#include <default.c>

var mont_pos = 0;

BMAP* mont_pcx="mont.pcx";///mountians
BMAP* ciel_pcx="ciel.pcx";///sprite of sky
BMAP* fond_pcx="fond.pcx";///black nothing sprite
PANEL* fond_pan=/////black nothing sprite not even really needed but its still in the C-script tutorial
{
pos_x=0;
pos_y=0;
layer=0;
bmap=fond_pcx;
flags = OVERLAY | VISIBLE;
}
PANEL* ciel_pan=///sky sprite location
{
pos_x=0;
pos_y=0;
layer=1;
bmap=ciel_pcx;
flags = OVERLAY | VISIBLE;
}
PANEL* scroll_ciel_pan=///sky sprite reused with new location
{
pos_x = 640; pos_y = 0;
layer = 1;
bmap = ciel_pcx;
flags = OVERLAY | VISIBLE;
}
PANEL* mont_pan=////mountain sprites location
{
pos_x = 0;pos_y = 35;
layer = 2;
bmap mont_map;
flags = OVERLAY | VISIBLE;
}
PANEL* scroll_mont_pan=
{
pos_x = 0;pos_y = 35;
layer = 2;
bmap mont_map;
flags = OVERLAY | VISIBLE;
}//////////////////////////////////////////////////////////////////////////////
function avance_ciel()////sky scrolling function
{
ciel_pos +=1*time_step;
if (ciel_pos >= 640){ciel_pos = 0;}
}
function deplace()////////Mountain scrolling function
{
if (key_cur == 1)
{
ciel_pos += 1*time_step;
if (ciel_pos >= 640){ciel_pos = 0;}
mont_pos += 3;
if (mont_pos >= 640){mont_pos = 0;}
}
if (KEY_CUL == 1)
{
ciel_pos -= 1*time_step;
if (ciel_pos <= 0){ciel_pos = 640;}
mont_pos -= 3;
if (mont_pos <= 0){mont_pos = 640;}
}
}
//////////////////////////////////////////////////////////////////////////////
function main()
{
video_mode = 7;
while(1)
{
ciel_pcx.pos_x = 0 - ciel_pos;
scroll_ciel_pan.pos_x = 640 - ciel_pos;
mont_pan.pos_x = - mont_pos;
scroll_mont_pan.pos_x = 640 - mont_pos;
avance_ciel();
deplace();
wait(1);
}
}

Page 1 of 2 1 2

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1