Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, Akow), 1,371 guests, and 10 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19055 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
Currently low expectations #200178
04/02/08 21:48
04/02/08 21:48
Joined: Mar 2008
Posts: 73
America: New Jersey
Masna Offline OP
Junior Member
Masna  Offline OP
Junior Member

Joined: Mar 2008
Posts: 73
America: New Jersey
I just got game studio. I have some ideas for games but I want to start simple. Right now my goal is to program a cube to move around a platform. Only problem is... how? I've modeled the cube and the platform and put them in a level. Now I have to somehow program it using lite-c. Are there any good tutorials on lite-c? (Please not in German.)

Thanks,
Masna

Re: Currently low expectations [Re: Masna] #200201
04/02/08 23:28
04/02/08 23:28
Joined: Mar 2008
Posts: 73
America: New Jersey
Masna Offline OP
Junior Member
Masna  Offline OP
Junior Member

Joined: Mar 2008
Posts: 73
America: New Jersey
Does anyone have a simple lite-c script for moving using the arrow keys?

EDIT: Can you set perameters for your character so he doesent fly off a cliff?

Last edited by Masna; 04/02/08 23:29.
Re: Currently low expectations [Re: Masna] #200203
04/02/08 23:39
04/02/08 23:39
Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
Pappenheimer Offline
Senior Expert
Pappenheimer  Offline
Senior Expert

Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
You could search in the contributions forum, I'm not sure, but I think someone, maybe Damocles, offered such a script.

Re: Currently low expectations [Re: Pappenheimer] #200213
04/02/08 23:57
04/02/08 23:57
Joined: Mar 2008
Posts: 73
America: New Jersey
Masna Offline OP
Junior Member
Masna  Offline OP
Junior Member

Joined: Mar 2008
Posts: 73
America: New Jersey
I just did a search and nothing came up. I should really learn to write scripts myself. Only problem is... how? I searched and found tutorials but they were either in Geraman or they used programs I don't have.

Last edited by Masna; 04/02/08 23:58.
Re: Currently low expectations [Re: Masna] #200220
04/03/08 02:23
04/03/08 02:23
Joined: Oct 2006
Posts: 175
G
Gumby22don Offline
Member
Gumby22don  Offline
Member
G

Joined: Oct 2006
Posts: 175
Have you ever coded before? If not, I hope you do stick with it - its great fun getting that block to move \:\)

I haven't used the template scripts, but you might find that a good way to start, and allow you to look at some basic code (plus some more advanced stuff you can ignore to begin with)

What you want is the scripts that do run around, which move a model based on time_step (time taken for last frame as fraction of a second) * +1 or -1 based on WASD keys being active.

Let me see if i can find a recent one...
(oh when searching it defaults to one week - try widening that to a year or more for most basic searches)
I can't find it quickly - and I know its worse for noobs :P Here's my recollection:

try starting with:

 Code:
while (key_q == 0){
   my_box.x=my_box.x + ((key_d-key_a)*time_step);   //move x coord DA
   my_box.y=my_box.y + ((key_w-key_s)*time_step);   //move y coord WS
   wait(1);   //do next frame
}


also try: c_move (my, vector(0,0,0), vector(key_d - key_a * time_step, key_w - key_s * time_step, 0), ignore_models);

c_move is the collision system movement function. modifying x and y directly is hard movement.

Don
have a great day

Last edited by Gumby22don; 04/03/08 02:26.
Re: Currently low expectations [Re: Gumby22don] #200266
04/03/08 10:21
04/03/08 10:21
Joined: Aug 2000
Posts: 7,490
O
Orange Brat Offline

Senior Expert
Orange Brat  Offline

Senior Expert
O

Joined: Aug 2000
Posts: 7,490
Download the Lite-C and Game Design workshops here:

http://www.3dgamestudio.com/download.php


My User Contributions master list - my initial post links are down but scroll down page to find list to active links
Re: Currently low expectations [Re: Orange Brat] #200332
04/03/08 15:00
04/03/08 15:00
Joined: Sep 2003
Posts: 929
Spirit Offline

Moderator
Spirit  Offline

Moderator

Joined: Sep 2003
Posts: 929
There was some time ago a sticky post here: "If you cant even find the tutorials, consider game programming is not for you!" \:\)

What you need is the lite-C tutorial, after reading that the cube on the platform should be no problem for you.

Also look in the simple examples that come with lite-C. There's a moving ball and it should be no prop to make a moving cube from it.

Re: Currently low expectations [Re: Spirit] #200386
04/03/08 19:35
04/03/08 19:35
Joined: Mar 2008
Posts: 73
America: New Jersey
Masna Offline OP
Junior Member
Masna  Offline OP
Junior Member

Joined: Mar 2008
Posts: 73
America: New Jersey
Thanks all. I'll post a download for the moving square once I get that stubborn block to move.

Last edited by Masna; 04/03/08 19:35.
Re: Currently low expectations [Re: Masna] #201279
04/08/08 01:00
04/08/08 01:00
Joined: Mar 2008
Posts: 73
America: New Jersey
Masna Offline OP
Junior Member
Masna  Offline OP
Junior Member

Joined: Mar 2008
Posts: 73
America: New Jersey
I thought i'd start my script from scratch: Could anyone point out anything wrong with this script? :

////////////////////////////////////////////////////////////////////
#include <acknex.h>
#include <default.c>
function move_up(Square)
{
while (!key_w)
}

Thnaks,
Masna

Re: Currently low expectations [Re: Masna] #201281
04/08/08 01:21
04/08/08 01:21

M
Malice
Unregistered
Malice
Unregistered
M



you are missing "function main" which must be in all main scripts, while you can include other scripts in your project you must have one main script that starts every thing.
////////////////////////////////////////////////////////////////////
#include <acknex.h>
#include <default.c>

function main()
{
video_screen =1; // set fullscreen mode
video_mode =8; // create a program window of 800x600 pixels
level_load("YOUR_LEVEL_NAME_HERE.wmb"); // loads the level you name here..
wait(-2);
}
function move_up(Square)
{
while (!key_w)
{
my.z+=1*time_step;
}

Page 1 of 2 1 2

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