Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411719 Posts in 69402 Topics- by 58450 Members - Latest Member: FezzikTheGiant

May 21, 2024, 11:13:19 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)Language with good data management (or a better way to manage data)
Pages: [1]
Print
Author Topic: Language with good data management (or a better way to manage data)  (Read 1174 times)
Muz
Level 10
*****


View Profile
« on: August 25, 2010, 11:40:19 AM »

Hey, I'm thinking of programming an experimental game with lots of data. It should be able to display a lot of data easily to the player and let me toss in thousands of variables easily. C and Lua seems to work OK enough, but are there any languages better suited for this?
« Last Edit: August 27, 2010, 06:06:20 AM by Muz » Logged
BorisTheBrave
Level 10
*****


View Profile WWW
« Reply #1 on: August 25, 2010, 11:48:54 AM »

Not sure what you are looking for. Have a look at R.
Logged
increpare
Guest
« Reply #2 on: August 25, 2010, 12:35:51 PM »

Could you give some more detail?
Logged
Muz
Level 10
*****


View Profile
« Reply #3 on: August 25, 2010, 01:48:19 PM »

I'm not really sure how to describe it, lol. I want to do something with combat details. Taking an example of how it would be in Lua...

Let's say that I have a character. It would be something like chr[n].. chr[0], chr[1] so on. For combat stuff, I want to divide that character's body parts into different parts so it looks like chr[0]["head"], chr[1]["leftArm"].

Now I want to put more info inside that info. Maybe divide the skull into 10 different points and track damage for each.. it'd end up like chr[n]["head"]["skull"][9]["bluntHP"] = 3

This gets pretty tedious to type the more I start nesting it. And to recover the stored data, it'd be x = chr[n][bodyPart][bodyDiv][loc][var], where you have lots of different variables to set, and long functions looking like
ChrStrength = GetChrStrength(armMass, physicalStrength, age, ...)
WpnDamage = CalcWpnDamage(GetWeaponInHand(*chrB), GetWeaponInHandMaterial(*chrB), ...)
GetDamageOnChr(chrA, bodyPart, bodyDiv, loc, chrB, weapon, angle, WpnDamage, ChrStrength, ...).

Actual situation might not be so silly, but this gets long and illegible the more I do it. So, is there some language designed to handle something like this?

Or maybe I'm taking the wrong approach with an typical language. If so, point out what I'm doing wrong Smiley
Logged
st33d
Guest
« Reply #4 on: August 25, 2010, 02:33:18 PM »

I'd be trying to create a nestable body map. So I can easily break up a map - or body in to segments and then each of those segments contains the same type of object, a body map.

The body maps would then allow recursive dives into them to deliver damage or access finer body parts.

Your body and language should handle tree based structures I believe, and tree searches.
Logged
Impossible
Level 3
***



View Profile
« Reply #5 on: August 27, 2010, 02:22:47 AM »

Looks like you want a relational DB, not an entirely different programming language. SQLite would work well in this case. DataDraw might also be an option.  Your choice of language matters much less than your choice of data structures in this case, although C# might be a good choice because of LINQ.
Logged
Muz
Level 10
*****


View Profile
« Reply #6 on: August 27, 2010, 06:30:37 AM »

Hmm... good points. I'll look into those. Making a map seems a bit easier since the concept fits in my head right now Tongue


Wait, now that I think of it, a body map doesn't be a good idea because I'm prototyping it. I don't yet know whether or not I need all those parts. I'd end up spending more time building the map than the time it'd save.

I'll go and look at different data structures for a few days.
« Last Edit: August 27, 2010, 07:06:41 AM by Muz » Logged
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic