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
2 registered members (TipmyPip, 1 invisible), 18,758 guests, and 8 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
is this possible? (bitmap) #312697
02/26/10 00:23
02/26/10 00:23
Joined: Sep 2009
Posts: 84
Theil Offline OP
Junior Member
Theil  Offline OP
Junior Member

Joined: Sep 2009
Posts: 84
Hi, I have a problem trying to do some kind of animation for a panel, I have 1 bitmap so I want it to be repeated over and over, but I don't know how to do this quiet well, here's an example:

I have this image:




This is what I'm trying to achieve:



and this is what I've done so far




Would this be possible? or do I have to do something else? this is the code I'm using right now, so you might take a look and see if I'm doing something wrong:

bar_pan.pos_x -= 10*time_step;

if(bar_pan.pos_x < 150)
{
bar_pan.pos_x = 450;
}

I would really appreciate some help, this might be some noobish question but I need to do this as fast as I can, since it is for my thesis, thanks for reading this, I hope you can help.

Re: is this possible? (bitmap) [Re: Theil] #312699
02/26/10 00:42
02/26/10 00:42
Joined: Aug 2007
Posts: 1,922
Schweiz
Widi Offline
Serious User
Widi  Offline
Serious User

Joined: Aug 2007
Posts: 1,922
Schweiz
Wrong Forum !!!

Re: is this possible? (bitmap) [Re: Widi] #312701
02/26/10 00:51
02/26/10 00:51
Joined: Sep 2009
Posts: 84
Theil Offline OP
Junior Member
Theil  Offline OP
Junior Member

Joined: Sep 2009
Posts: 84
oh sorry I was confused I meant to post this on Lite-C programming, I will create another post in there so the moderators can delete this one I'm really sorry

Last edited by Theil; 02/26/10 00:51.
Re: is this possible? (bitmap) [Re: Theil] #312705
02/26/10 00:59
02/26/10 00:59
Joined: Apr 2005
Posts: 1,988
Canadian, Eh
DLively Offline
Serious User
DLively  Offline
Serious User

Joined: Apr 2005
Posts: 1,988
Canadian, Eh
make 2 of them or even 3 if you have to..


A8 Pro 8.45.4
YouTube: Create Games For Free
Free Resources: www.CGForFree.com
Re: is this possible? (bitmap) [Re: DLively] #312731
02/26/10 09:05
02/26/10 09:05
Joined: Oct 2004
Posts: 4,134
Netherlands
Joozey Offline
Expert
Joozey  Offline
Expert

Joined: Oct 2004
Posts: 4,134
Netherlands
There may be certain tricks with repeating a bitmap over a panel, but generally the easiest way is indeed to use 2 or more bitmaps cycling over the screen.


Click and join the 3dgs irc community!
Room: #3dgs
Re: is this possible? (bitmap) [Re: Joozey] #312754
02/26/10 12:16
02/26/10 12:16
Joined: Jan 2007
Posts: 2,247
Deutsch Niedersachsen
Puppeteer Offline
Expert
Puppeteer  Offline
Expert

Joined: Jan 2007
Posts: 2,247
Deutsch Niedersachsen
1 more is enough.


Formally known as Omega
Avatar randomness by Quadraxas & Blade
http://omegapuppeteer.mybrute.com
Re: is this possible? (bitmap) [Re: Puppeteer] #312783
02/26/10 14:04
02/26/10 14:04
Joined: Oct 2007
Posts: 5,211
İstanbul, Turkey
Quad Offline
Senior Expert
Quad  Offline
Senior Expert

Joined: Oct 2007
Posts: 5,211
İstanbul, Turkey
infact it is much easier with a single image and a window. (but the single image should be the same image reapting 2 times)

Code:
#include <acknex.h>

BMAP* image_2x = "img2x.jpg";
var scroll_var;
PANEL* repeating_img = {
	window(0,0,512,240,image_2x,scroll_var,0);
	flags = SHOW;
}

void main(){
	while(1){
		scroll_var += 10*time_step;
		scroll_var%=512;
		wait(1);
	}
}



with this image(rename to img2x.jpg ):




Last edited by Quadraxas; 02/26/10 14:10. Reason: forgot the image :D

3333333333
Re: is this possible? (bitmap) [Re: Quad] #312986
02/27/10 13:17
02/27/10 13:17
Joined: Oct 2004
Posts: 4,134
Netherlands
Joozey Offline
Expert
Joozey  Offline
Expert

Joined: Oct 2004
Posts: 4,134
Netherlands
Ah yes, window, that was it laugh.


Click and join the 3dgs irc community!
Room: #3dgs

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