Gamestudio Links
Zorro Links
Newest Posts
Trading Journey
by 7th_zorro. 04/27/24 04:42
Help with plotting multiple ZigZag
by M_D. 04/26/24 20:03
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
M1 Oversampling
by jcl. 04/26/24 11:12
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
Eigenwerbung
by jcl. 04/26/24 11:08
MT5 bridge not working on MT5 v. 5 build 4160
by EternallyCurious. 04/25/24 20:49
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (Quad), 762 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
wandaluciaia, Mega_Rod, EternallyCurious, howardR, 11honza11
19049 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 3 1 2 3
A few questions about lite-C game development #431104
10/09/13 12:57
10/09/13 12:57
Joined: Oct 2013
Posts: 21
K
kmega00 Offline OP
Newbie
kmega00  Offline OP
Newbie
K

Joined: Oct 2013
Posts: 21
I don't know a whole lot about math but I'm aiming to become a professional game developer regardless.

I wish to become a good game developer because I've brought and waisted so much money on so many bad games in the past. I've also brought/played some great games that rocks. I believe by mastering game development techniques using lite-C I'll be able to create some great multi-player games that'll be enjoyed by many.

I've been through the tutorials a while back and now carefully reading through the main Acknex manual. There are some things I understand and there are things I don't.

In order to create the best games possible I wish to ask questions about things I don't understand.

Any answers are well appreciated.

My first question:

I know absolutely nothing about floats except I think it's used in creating some material effects and other things.

It seems that the knowledge of float is not fully required to create great looking games.

Is it possible to create great games with lite-C without the mathematical knowledge of float?

Re: A few questions about lite-C game development [Re: kmega00] #431106
10/09/13 13:09
10/09/13 13:09
Joined: Mar 2006
Posts: 1,993
Karlsruhe
PadMalcom Offline
Serious User
PadMalcom  Offline
Serious User

Joined: Mar 2006
Posts: 1,993
Karlsruhe
Float is a data type for decimal numbers. If english is your mother language, you should definitely learn some math! If not, read a book about programming first before you start programming games. To know what a float is is absolutely necessary.

Re: A few questions about lite-C game development [Re: kmega00] #431107
10/09/13 13:24
10/09/13 13:24
Joined: Sep 2009
Posts: 993
Budapest
Aku_Aku Offline
User
Aku_Aku  Offline
User

Joined: Sep 2009
Posts: 993
Budapest
I am not sure what do you talk about, i assume it is a type of the numeric variables.
There integers where there is no decimal point.
There are decimal numbers, they have integer part and fraction part and between them there is the decimal point.
Here are two subtypes, the first has fixed number of decimal numbers, and the second part where the decimal point can move left-right or foreward-backward.
Here is the web page what is describe this variable type, better than me:
Floating point

Re: A few questions about lite-C game development [Re: Aku_Aku] #431124
10/09/13 17:11
10/09/13 17:11
Joined: Oct 2013
Posts: 21
K
kmega00 Offline OP
Newbie
kmega00  Offline OP
Newbie
K

Joined: Oct 2013
Posts: 21
Thanks for the info on floats.

Another question from the manual (I'm slowing reading through it):

Want to make sure I'm understanding this example from Strucs under the programming tab in the manual.

Code:
function spot_init(SPOT* spot) 
{ 
  if (!spot) return; // prevent crash when an empty pointer is passed
  spot.x = 1; 
  spot.y = 1; 
}
...
SPOT myspot; // creates an uninitalized SPOT struct named "myspot"
...
spot_init(myspot); // passes a pointer to myspot



It's my belief function spot_init sets myspot.x to 1 and myspot.y to 1 when it's ran with (myspot) as an argument?

Last edited by kmega00; 10/10/13 20:57.
Re: A few questions about lite-C game development [Re: kmega00] #431129
10/09/13 17:34
10/09/13 17:34
Joined: Mar 2011
Posts: 3,150
Budapest
sivan Offline
Expert
sivan  Offline
Expert

Joined: Mar 2011
Posts: 3,150
Budapest
yes.

not scientifically : a struct is a structure that contains its own variables, given in its definition. like a VECTOR that has x, y and z.


Free world editor for 3D Gamestudio: MapBuilder Editor
Re: A few questions about lite-C game development [Re: sivan] #431133
10/09/13 18:19
10/09/13 18:19
Joined: Oct 2013
Posts: 21
K
kmega00 Offline OP
Newbie
kmega00  Offline OP
Newbie
K

Joined: Oct 2013
Posts: 21
I'm feeling pretty good I understood or at least understood enough about the last example. I'll continue to post about things I don't understand here.

A while back I tried to build a game with mostly just the knowledge I had obtained from the lite-c tutorial alone. I'll share a few screen-shots and the unfinished code I was working with.













I don't plan to finish this game because I'm trying to learn as much as I can from the Acknex manual and then build a much better one that is procedural. The more I learn from the manual the more I realize I could have had a much easier time coding.

I believe posting over 3,000 lines of code here might be too much?

The code can be downloaded from zippyshare here:
msf.c


Another question:
A function sample under Functions tab within programming category:

Code:
function vector_add2 (var* sum,var* v1,var* v2)
{
	//calculate the sum of two vectors
	sum[0] = v1[0] + v2[0];
	sum[1] = v1[1] + v2[1];
	sum[2] = v1[2] + v2[2];
}
var vector1[3] = { 1,2,3 };
var vector2[3] = { 4,5,6 };
var vector3[3];
//...
vector_add2 (vector3,vector1,vector2); //vector3 now contains 5,7,9



I understand that different argument types are supported but...
can I pass other argument types at the same time such as

Code:
function vector_add2 (var* sum,var* v1,var* v2,ENTITY* ent,PARTICLE* p) ???
{
	//calculate the sum of two vectors
	sum[0] = v1[0] + v2[0];
	sum[1] = v1[1] + v2[1];
	sum[2] = v1[2] + v2[2];
}
var vector1[3] = { 1,2,3 };
var vector2[3] = { 4,5,6 };
var vector3[3];
//...
vector_add2 (vector3,vector1,vector2); //vector3 now contains 5,7,9


Last edited by kmega00; 10/10/13 20:56.
Re: A few questions about lite-C game development [Re: kmega00] #431150
10/10/13 07:14
10/10/13 07:14
Joined: Mar 2011
Posts: 3,150
Budapest
sivan Offline
Expert
sivan  Offline
Expert

Joined: Mar 2011
Posts: 3,150
Budapest
yes, you can combine any in that way you wrote.


Free world editor for 3D Gamestudio: MapBuilder Editor
Re: A few questions about lite-C game development [Re: sivan] #431181
10/10/13 19:32
10/10/13 19:32
Joined: Oct 2013
Posts: 21
K
kmega00 Offline OP
Newbie
kmega00  Offline OP
Newbie
K

Joined: Oct 2013
Posts: 21
An example under Programming, under Precompiler, (#ifdef,#ifndef,#else,#endif)

Code:
#define LOW_RES
...
#ifndef LOW_RES
  video_mode = 8; // 1024x768
#else
  video_mode = 6; // 640x480
#endif



I partially understand this example. I'm assuming that I may never need to wright code using this? I don't see the advantage since you can use functions for this also. Does this have any advantage over functions if your only programming in lite_C ?

Last edited by kmega00; 10/10/13 20:54.
Re: A few questions about lite-C game development [Re: kmega00] #431182
10/10/13 19:39
10/10/13 19:39
Joined: Sep 2009
Posts: 993
Budapest
Aku_Aku Offline
User
Aku_Aku  Offline
User

Joined: Sep 2009
Posts: 993
Budapest
When you post source code parts, please use the code tags.
You can find it, meanwhile you write your own post, at the top of the text box of the post. It has an icon with # sign.
I am sure your post will be prettier, and the community will understand easier.

Re: A few questions about lite-C game development [Re: kmega00] #431183
10/10/13 19:41
10/10/13 19:41
Joined: Aug 2002
Posts: 3,258
Mainz
oliver2s Offline
Expert
oliver2s  Offline
Expert

Joined: Aug 2002
Posts: 3,258
Mainz
This example from the manual isn't the best in my opinion.

I will try a better one:
Code:
//#define USE_PHYSX3

#ifdef USE_PHYSX3
	#include <ackphysx3.h>
	#else
	#include <ackphysx.h>
#endif

void create_physics_ent()
{
	ENTITY* ent_tmp=ent_create(CUBE_MDL,nullvector,NULL);
	
	#ifdef USE_PHYSX3
		pX3ent_settype(ent_tmp,PH_RIGID,PH_BOX);
		pX3ent_setdamping(ent_tmp,50,80);
		pX3ent_setskinwidth(ent_tmp,0);
		pX3ent_setiterations(ent_tmp,16);
		pX3ent_setfriction(ent_tmp,100);

		#else

		pXent_settype(ent_tmp,PH_RIGID,PH_BOX);
		pXent_setdamping(ent_tmp,50,80);
		pXent_setskinwidth(ent_tmp,0);
		pXent_setiterations(ent_tmp,16);
		pXent_setfriction(ent_tmp,100);
	#endif
}



In my example I use it to switch between A8 PhysX DLL and the Community PhysX3 DLL. I just have set or unset "#define USE_PHYSX3" and the whole code is changing.

Page 1 of 3 1 2 3

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