Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
3 registered members (AndrewAMD, TipmyPip, OptimusPrime), 15,229 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
2d games #366669
04/06/11 07:17
04/06/11 07:17
Joined: Mar 2010
Posts: 56
Hertfordshire, England
Panda_Dude Offline OP
Junior Member
Panda_Dude  Offline OP
Junior Member

Joined: Mar 2010
Posts: 56
Hertfordshire, England
How do you make 2d games? I've heard you can but how?

Re: 2d games [Re: Panda_Dude] #366670
04/06/11 07:23
04/06/11 07:23
Joined: Oct 2007
Posts: 5,211
İstanbul, Turkey
Quad Offline
Senior Expert
Quad  Offline
Senior Expert

Joined: Oct 2007
Posts: 5,211
İstanbul, Turkey


3333333333
Re: 2d games [Re: Quad] #366673
04/06/11 08:39
04/06/11 08:39
Joined: Aug 2007
Posts: 1,922
Schweiz
Widi Offline
Serious User
Widi  Offline
Serious User

Joined: Aug 2007
Posts: 1,922
Schweiz
Panels is that what you need...

Re: 2d games [Re: Widi] #366723
04/06/11 19:37
04/06/11 19:37
Joined: Mar 2010
Posts: 56
Hertfordshire, England
Panda_Dude Offline OP
Junior Member
Panda_Dude  Offline OP
Junior Member

Joined: Mar 2010
Posts: 56
Hertfordshire, England
I've decided to do what the AUM says and do 'fake' 2D games. Thanks for the help thus far, but now I need help with the script. What is wrong here? Why can't I see anything wrong? I know for certain it is something within the action 'player_move' but I can't tell what... crazy
Code:
#include <acknex.h>
#include <default.c>

ENTITY* player;
var movement;

function main ()
{
	video_mode = 7;
	level_load ("level.wmb");
	camera.tilt = -90;
	camera.x = 0;
	camera.y = 0;
	camera.z = 650;
}

action player_move ()
{
	player = me;
	while (1)
	{
		camera.pan = (key_cur-key_cul) * 10 * time_step;
		movement = (key_cuu-key_cud) *10 * time_step;
		c_move (player, vector(0,movement,0),nullvector, GLIDE);
		wait (1);
	}
}



Re: 2d games [Re: Panda_Dude] #366724
04/06/11 19:43
04/06/11 19:43
Joined: Jan 2002
Posts: 4,225
Germany / Essen
Uhrwerk Offline
Expert
Uhrwerk  Offline
Expert

Joined: Jan 2002
Posts: 4,225
Germany / Essen
What is that code supposed to do, despite of loading a level and setting a camera position?


Always learn from history, to be sure you make the same mistakes again...
Re: 2d games [Re: Uhrwerk] #366725
04/06/11 19:49
04/06/11 19:49
Joined: Mar 2010
Posts: 56
Hertfordshire, England
Panda_Dude Offline OP
Junior Member
Panda_Dude  Offline OP
Junior Member

Joined: Mar 2010
Posts: 56
Hertfordshire, England
Is it that bad that you can't tell what it's for? The action is attached to a model in WED and it is supposed to move forwards/backwards when you press the up and down arrow keys and the camera's pan angle is supposed to change when you press the left and right arrow keys.

Re: 2d games [Re: Panda_Dude] #366728
04/06/11 20:01
04/06/11 20:01
Joined: Jan 2002
Posts: 4,225
Germany / Essen
Uhrwerk Offline
Expert
Uhrwerk  Offline
Expert

Joined: Jan 2002
Posts: 4,225
Germany / Essen
Ah, ok. If you assigned player_move() to an entity this should more or less work. What is the part that is not working as your expect it?


Always learn from history, to be sure you make the same mistakes again...
Re: 2d games [Re: Uhrwerk] #366729
04/06/11 20:03
04/06/11 20:03
Joined: Mar 2010
Posts: 56
Hertfordshire, England
Panda_Dude Offline OP
Junior Member
Panda_Dude  Offline OP
Junior Member

Joined: Mar 2010
Posts: 56
Hertfordshire, England
well it won't even run the script... I don't know what's wrong. confused
I made some alterations to the script
Code:
action player_move ()
{
	player = me;
	while (1)
	{
		set (my,POLYGON)
		camera.pan = player.pan;
		player.pan = (key_cur-key_cul) * 10 * time_step;
		movement = (key_cuu-key_cud) * 10 * time_step;
		c_move (player, vector(0,movement,0),nullvector, GLIDE);
		wait (1);
	}
}


I did this because otherwise the 'player' would only be able to move on one axis (I think)

Last edited by Panda_Dude; 04/06/11 20:08.
Re: 2d games [Re: Panda_Dude] #366730
04/06/11 20:14
04/06/11 20:14
Joined: Dec 2008
Posts: 1,660
North America
Redeemer Offline
Serious User
Redeemer  Offline
Serious User

Joined: Dec 2008
Posts: 1,660
North America
What error code do you get when you try to run the script? As it is, I see nothing fundamentally wrong with your code.

.. except that you need to put a semicolon after "set (my,POLYGON)" wink


Eats commas for breakfast.

Play Barony: Cursed Edition!
Re: 2d games [Re: Redeemer] #366731
04/06/11 20:20
04/06/11 20:20
Joined: Mar 2010
Posts: 56
Hertfordshire, England
Panda_Dude Offline OP
Junior Member
Panda_Dude  Offline OP
Junior Member

Joined: Mar 2010
Posts: 56
Hertfordshire, England
oh yeah... I forgot about that. But still it says
"Error with SCRIPT.C
Startup failure"
Wait no it is about the player = me; bit. It says cannot convert 'POINTER' to 'struct ENTITY'

Last edited by Panda_Dude; 04/06/11 20:28.
Page 1 of 2 1 2

Gamestudio download | 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