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
1 registered members (AndrewAMD), 1,486 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 2 of 2 1 2
Re: Screenshots to Panels [Re: ] #449461
03/21/15 03:41
03/21/15 03:41
Joined: Apr 2005
Posts: 1,988
Canadian, Eh
DLively Offline
Serious User
DLively  Offline
Serious User

Joined: Apr 2005
Posts: 1,988
Canadian, Eh
@Malice Its not that I shouldn't use hard coded values. If I personally knew for my own project that I could hardcode a number because I'd never need to change it, I would - Its not performance altering in anyway. The only thing that is remotely involved with hardcoding values is the programmers ability to upgrade their script... Besides, I just re-wrote your code... I didn't hardcode anything.

I forgot to type scale_y... I was rushing through it. It was the notes that were mainly important..

And just to clean up your lock system for the fresh eyes
Code:
function main(){
	//[x] is not being pressed -- int is an integer variable
	int x_pressed = 0;
	
	while(1){wait (1);
		//if x was held, check for release
		if(!key_x && x_pressed) x_pressed = 0;
		
		//x has been pressed
		if(key_x && !x_pressed) {
			x_pressed=1;
			shot();
		}
	}
}



A8 Pro 8.45.4
YouTube: Create Games For Free
Free Resources: www.CGForFree.com
Re: Screenshots to Panels [Re: DLively] #449462
03/21/15 03:51
03/21/15 03:51

M
Malice
Unregistered
Malice
Unregistered
M



Yes -- Good point. The only hard coded value I used was in fact a constant that had to always be 4 in the case of the design statements provided.

I loved that you added a loop to show the scaling and movement.

This is much clearer way to write code. You are very good at laying out clean code. I wish I had your insight for it.

Enjoy your night..

Re: Screenshots to Panels [Re: ] #449467
03/21/15 09:54
03/21/15 09:54
Joined: Apr 2005
Posts: 1,988
Canadian, Eh
DLively Offline
Serious User
DLively  Offline
Serious User

Joined: Apr 2005
Posts: 1,988
Canadian, Eh
Quote:

I loved that you added a loop to show the scaling and movement.

This is much clearer way to write code. You are very good at laying out clean code. I wish I had your insight for it.


@malice: I seen between the two of you, (yourself and alibaba) you had given him the full code - But hes just started so i knew he wouldn't fully understand it and so of coarse me looking to help anyone, I jumped right in to fill in the blanks and organized it for fresh eyes... Really, This was all you friend laugh

@2teach: Glad to hear you're enjoying 3dgamestudio laugh


A8 Pro 8.45.4
YouTube: Create Games For Free
Free Resources: www.CGForFree.com
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