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
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (M_D), 1,430 guests, and 3 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
how can make screen moving on 2d game? #166387
11/07/07 23:03
11/07/07 23:03
Joined: Sep 2006
Posts: 188
Latvia
MDI Offline OP
Member
MDI  Offline OP
Member

Joined: Sep 2006
Posts: 188
Latvia
how can make screen moving on 2d game? That i need to my newest game - that is 2d strategy like much mobile games. And if map is bigger for 1024 and 768 how i can move my screen or need move panels when mouse get close to screen border.
Please help any.


Latvija rullē
Re: how can make screen moving on 2d game? [Re: MDI] #166388
11/08/07 01:04
11/08/07 01:04
Joined: Sep 2006
Posts: 106
FairyLand!!!
RruthH Offline
Member
RruthH  Offline
Member

Joined: Sep 2006
Posts: 106
FairyLand!!!
Have a look at AUM 2: Stratego. The code's in there.

how can make screen moving on 2d game? [Re: RruthH] #166389
11/08/07 11:23
11/08/07 11:23
Joined: Sep 2006
Posts: 188
Latvia
MDI Offline OP
Member
MDI  Offline OP
Member

Joined: Sep 2006
Posts: 188
Latvia
That isnt help in this type!
There is 3d world and camera moving isnt problem.
But im using panels for game world and for units.
All is great only i dont know how to move screen or panels if i wishes drive to another location in map.


Latvija rullē
Re: how can make screen moving on 2d game? [Re: MDI] #166390
11/08/07 18:02
11/08/07 18:02
Joined: Aug 2004
Posts: 2,215
I
ISG Offline

Expert
ISG  Offline

Expert
I

Joined: Aug 2004
Posts: 2,215
Maybe if I could understand the question better then I could help. Maybe some visual examples could be useful.


Ground Tactics - Coming Soon
Ground Tactics OFFICIAL WEBSITE
Re: how can make screen moving on 2d game? [Re: ISG] #166391
11/08/07 18:20
11/08/07 18:20
Joined: Jul 2007
Posts: 959
nl
F
flits Offline
User
flits  Offline
User
F

Joined: Jul 2007
Posts: 959
nl
if i understand it right he wants to create a 2d world white a 3d calcution

somthing like habo(stupid game)


"empty"
how can make screen moving on 2d game? [Re: flits] #166392
11/08/07 19:10
11/08/07 19:10
Joined: Sep 2006
Posts: 188
Latvia
MDI Offline OP
Member
MDI  Offline OP
Member

Joined: Sep 2006
Posts: 188
Latvia
Here is picture:



all other terrains is behind screen = that is in + 768 or + 1024 pixels!
And i wishes with mouse driving to screen border pull them in screen - simply drive to another location in map.

And here isnt any needs after camera moving - no 3d worlds.


Latvija rullē
Re: how can make screen moving on 2d game? [Re: MDI] #166393
11/08/07 20:38
11/08/07 20:38
Joined: Apr 2006
Posts: 1,551
Netherlands
D3D Offline
Serious User
D3D  Offline
Serious User

Joined: Apr 2006
Posts: 1,551
Netherlands
Guess you must first write down the size of images and to be used screen resolution. Read a little about using mouse and panels in Gamestudio.

Set the fixed values in variables so that you wont go off-screen.

Then use something like if the mouse is at this or that location on the screen, move panel to left or right up down. That would I think be the easy way.

Don't know if you can do some collision with panels or have to fake it!?


smile
how can make screen moving on 2d game? [Re: D3D] #166394
11/08/07 20:45
11/08/07 20:45
Joined: Sep 2006
Posts: 188
Latvia
MDI Offline OP
Member
MDI  Offline OP
Member

Joined: Sep 2006
Posts: 188
Latvia
only one problem! In this case to me moves only last created panel of his type!
How can make that when moves all panels with one name!

Sample!

panel* grass
{grass = pan_create("grass.pcx;",2);grass.visible = on;
if(key_d == 1)
{grass.pos_x -=5 * time;}
// and so on.......
}

And how i say heres moves only last panel. How can do that when moves them all in one time?


Latvija rullē
Re: how can make screen moving on 2d game? [Re: MDI] #166395
11/08/07 20:53
11/08/07 20:53
Joined: Apr 2006
Posts: 1,551
Netherlands
D3D Offline
Serious User
D3D  Offline
Serious User

Joined: Apr 2006
Posts: 1,551
Netherlands
Code:
 panel* panel1; panel2; panel* grass
{grass = pan_create("grass.pcx;",2);grass.visible = on;
if(key_d == 1)
{grass.pos_x -=5 * time_step;
panel1.pos_x -=5 * time_step;
panel2.pos_x -=5 * time_step;}
// and so on.......
}



Or did you mean something else? Also why do you want to move the grass or is that the whole map as shown in the image above?


smile
how can make screen moving on 2d game? [Re: D3D] #166396
11/08/07 21:03
11/08/07 21:03
Joined: Sep 2006
Posts: 188
Latvia
MDI Offline OP
Member
MDI  Offline OP
Member

Joined: Sep 2006
Posts: 188
Latvia
No all isnt grass!

There is rock panels, mountain panels, forest panels, bridge panels, grass panels, water panels, and some type city panels.
They are created with x.dat document help and dont make big problem in creating.
On one symbol creates one type panel in his own place.

And this style is too horrible - here in this map is 100(10*10) panels.
and im not going to write for all his own name.
Or isnt some way how to merge under one name all one type panels?

This problem is to me with some time ago maded 3d game too. One type enemies named under one ENTITY* - and all functions works only on last one putted model correctly.

Last edited by MDI; 11/08/07 21:04.

Latvija rullē
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