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 2 of 2 1 2
Re: how can make screen moving on 2d game? [Re: MDI] #166397
11/08/07 21:22
11/08/07 21:22
Joined: Apr 2006
Posts: 1,551
Netherlands
D3D Offline
Serious User
D3D  Offline
Serious User

Joined: Apr 2006
Posts: 1,551
Netherlands
Not really sure if it's the best solution, but perhaps you can use structs for that? Only then you would have to write the whole game in Lite-C. To be honest, for a 2D game I would not use 3D Gamestudio.

You can fake 2D or maybe even write with the help of Lite-C and a plugin a 2D engine, just no real 2D out of the box.


smile
Re: how can make screen moving on 2d game? [Re: MDI] #166398
11/09/07 12:17
11/09/07 12:17
Joined: Apr 2002
Posts: 4,801
Richmond B.C., Canada
Captain_Kiyaku Offline

Dichotomic
Captain_Kiyaku  Offline

Dichotomic

Joined: Apr 2002
Posts: 4,801
Richmond B.C., Canada
you can create an array for your 100 panels, and save the pointers in it and let them move in a while loop when you go with your mouse to the edge of your screen.

would be like this:


panel* ptrPanelTemp;
function fncMoveScreen(iX, iY)
{
while(iCounter < 100)
{
ptrPanelTemp = ptr_for_handle(yourArray[iCounter]);
ptrPanelTemp.pos_x += iX;
ptrPanelTemp.pos_y += iY;
iCounter += 1;
}
}

and call it like fncMoveScreen(5, -7);, depends on how you want to move the screen

this should work when you saved all the pointers in this arrays at the beginning of your game.


My Blog

"Tag und Nacht schrei ich mich heiser,
Wind weht alle Worte fort,
Tag und Nacht schrei ich mein Krähenwort!"

Subway To Sally - Krähenkönig
Re: how can make screen moving on 2d game? [Re: Captain_Kiyaku] #166399
11/09/07 16:25
11/09/07 16:25
Joined: Aug 2004
Posts: 2,215
I
ISG Offline

Expert
ISG  Offline

Expert
I

Joined: Aug 2004
Posts: 2,215
Or just use one image with all the stuff on it from the map? Unless you specifically need everything in it's own seperate form.


Ground Tactics - Coming Soon
Ground Tactics OFFICIAL WEBSITE
how can make screen moving on 2d game? [Re: ISG] #166400
11/11/07 20:03
11/11/07 20:03
Joined: Sep 2006
Posts: 188
Latvia
MDI Offline OP
Member
MDI  Offline OP
Member

Joined: Sep 2006
Posts: 188
Latvia
Sorry but i somehow dont understand that in
ptr_for_handle(yourArray[iCounter]);

I need create panel and then store it with handle under yourarray, but what is that icounter?


Latvija rullē
Thanks for help [Re: MDI] #166401
11/12/07 23:45
11/12/07 23:45
Joined: Sep 2006
Posts: 188
Latvia
MDI Offline OP
Member
MDI  Offline OP
Member

Joined: Sep 2006
Posts: 188
Latvia
With your ideas i done some fixes and now game works really nice.


Latvija rullē
Re: Thanks for help [Re: MDI] #166402
11/13/07 14:10
11/13/07 14:10
Joined: Apr 2002
Posts: 4,801
Richmond B.C., Canada
Captain_Kiyaku Offline

Dichotomic
Captain_Kiyaku  Offline

Dichotomic

Joined: Apr 2002
Posts: 4,801
Richmond B.C., Canada
Sorry for the late answer.
iCounter is the position in the array. it goes from 0 to 99 so all panel-pointers inside will get moved.


My Blog

"Tag und Nacht schrei ich mich heiser,
Wind weht alle Worte fort,
Tag und Nacht schrei ich mein Krähenwort!"

Subway To Sally - Krähenkönig
Re: Thanks for help [Re: Captain_Kiyaku] #166403
11/13/07 18:02
11/13/07 18:02
Joined: Sep 2006
Posts: 188
Latvia
MDI Offline OP
Member
MDI  Offline OP
Member

Joined: Sep 2006
Posts: 188
Latvia
Aha! I there dont find way how put in that array without errors. And then i transform panels in sprites and move camera in 3d world. With all of this now is easy to make events and other stuffs.

Only sprites strangly reacts on event_touch and event_release - dont wait till release but already after frame make event-rel.. and then again event_tou.. and continue so long till i move mouse off from sprite.
That is normal or engine bug with sprites?

P.S. my fault!! HEHE! That happens when on model creates new sprite(checkbox)
Now need do something to ignore him.

Last edited by MDI; 11/13/07 19:34.

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