• Welcome to SC4 Devotion Forum Archives.

Construction Layer Protoype - Progress Update

Started by tomkeus, March 28, 2010, 04:09:56 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

tomkeus

Hi guys, I know it's been a while since you've seen anything from me, but what I'm doing ain't easy   :-[

I'm developing some tools which generally fall into CAD/CAM category, and there are no references for such stuff on the interwebs and I have to invent everything by myself and, although general principles are not particularly hard to develop, bug hunting is a nightmare and I don't have as much free time as before (maybe 10-15 hrs of effective work per week).

Now, enough of excuses, here's what I've done so far:

- Implemented camera similar to camera in Google Earth

- Implemented some basic UI indicators

- Laid ground work for the road/rail system: This means, most of the basic drawing algorithms are in place. Basic algorithm is extrusion along the path. Road is geometrically represented as a curved line, and 3D mesh is obtained by sweeping a profile (another 2D line, specified by user as a sequence of Points in a XZ plane) along the line. This is also used to draw bridges and within 15 min (time needed to find good texture and to specify a new profile) I can do railroads, expressways, embankments etc. Another algorithm I've developed is spacing along the path. I'm using it currently to position bridge pillars. This tool can also be used to place street lights, catenary for the railroads and similar.
 So far, process of laying down roads is a little different than the one you saw in the 2D prototype demo. Segment types (curved or straight) are not specified manually. Their type is inferred automatically in a way similar to splines. Possibility to draw the same way as in 2D demo, will be added soon (it is much more controllable but a little messy to do when you have to deal with polygonal geometry)

When I'm happy with the overall feel of the road/rail laying system I will upload the program for you to evaluate and start the work on the zone laying system.


For now, few screens:





#define TRUE FALSE /*Happy debugging suckers*/

croxis

I look forward to putting some terrain under all that :D

TJ1



JoeST

Copperminds and Cuddleswarms

townscape

oh by the way: I don't see any junctions and intersections

how do they look? planning on placing any limits at wich you can junction roads?

funny how I link the banner to the only place I ever post :)
The Greatest place to get a game name

tomkeus

Quote from: townscape on March 30, 2010, 11:29:15 AM
oh by the way: I don't see any junctions and intersections

And you probably wont see them for some time. Two problems are main reasons:

Simple problem: I have worked out on the paper how should junctions work, but I still have to code them and debug them.

Messed up problem: For now, all roads so far have straight line topology and thus I can just cram them into lists. When junctions and intersections enter the story, topology becomes nontrivial and I have to use graphs which is something I never did earlier and I still didn't came around to think about it.

I could make some interim solutions just for eye-candy purposes but I'm not keen on wasting time doing things I know I will have to remove later.
#define TRUE FALSE /*Happy debugging suckers*/

tomkeus

#7
I will be little longer until I finish what I've promised but it is for a good reason. I haven't written new functionality lately (save for the parts of the code needed to create line fillets between adjacent road segments), rather I have finally fleshed out what kind of geometrical operations I need
and organized them into pretty powerful compact class. I think you'll be pleasantly surprised with amount of stuff that is going to be possible to do with this framework.


Let me mention some of this stuff:

-Sweeping arbitrary profile along the curve with automatic texturing: I am currently drawing single lane roads and bridges, but I could be drawing railroads, or avenues or whatever. Everything I need is a texture, and a profile which can be easily specified as a sequence of points in txt file.

-Spacing along the curve. I can distribute given number of objects along the curve: I'm using it to space pillars on the bridges, but it can easily be used for creation of streetlights, railroad electrification, treelines etc.

-Snapping in 2D and 3D with ofset (as seen in 2D prototype demo), curve offsets (thus easily making multi-lane, multi-rail, multi-x tools), curve fillets (fiting curved segments of specified radius bettween two segments), intersecting with offsets (thus identifying boundary points of the intersection or junction and generating intersection/junction polygons and texturing them).

....There are many possibilities now. System also allows powerful zoning tools. Zones will be drawn in the same way shown in 2D prototype demo. There will be NO autoroads, it will be possible to have concave zones and lots will be capable of having curved edges. Though, zones wont be able to have unreasonable shapes (you will se what I mean once I do it).

For example, on the screenshot bellow, you can see that bridges look different than those on screenshots few posts above. It took me one minute to change them. You will also be able to do that very fast, and If you're not to lazy to do some modeling, you can make truss bridges by spacing truss segments along the curve and additionally sweeping a number of profiles to get the road surface, or concrete beams, etc.
#define TRUE FALSE /*Happy debugging suckers*/

joelyboy911

Are you in need of someone to help make textures? I'd be willing to give it a shot, just let me know what size/format/colours it needs to be and I can try to make something up.
SimCity Aviation Group
I miss you, Adrian

tomkeus

I will be needing some texture work in the near future and I will announce everything I'll be needing, from textures to models. I have two building models from Victor01 and I might need few more to make some clutter.
#define TRUE FALSE /*Happy debugging suckers*/

croxis


tomkeus

Though, I still have to do job I really hate but is absolutely essential.

Around half of the code is uncommented and there is enough of it I'm beginning to forget some stuff I did month or two ago.
#define TRUE FALSE /*Happy debugging suckers*/

croxis

I know the feeling. I found myself documenting almost everything just because I often do not remember what the heck I was doing after a week.

JoeST

that sounds absouletly sexy as hell! and yeah documenting isnt always fun :D

Joe
Copperminds and Cuddleswarms

Nique

Proudly developer of

tomkeus

#15
Guys, I'm sorry we're absent, but I am currently dealing with some administrative crap and I cannot hang around the Internets too much.

Despite that I am making relatively good progress, and intersection system is taking shape. I was hoping to be able to feature some nice video of network laying features by now, but when working on something of this size, dealing with one set of problems, opens a whole new larger set of problems and I'm working slower than expected. So please bear with me.
#define TRUE FALSE /*Happy debugging suckers*/

townscape

Take your time :)

There's no time limit and we're not limited in budget because we don't have one (yet?)

funny how I link the banner to the only place I ever post :)
The Greatest place to get a game name

tomkeus

Hey guys, just to report to you that I'm still breathing.

I didn't get to do anything lately. Approximately two weeks ago I have moved to Frankfurt in Germany for my PhD work. I'm still in the process of setting my life up. I currently do not have Internet at home, since I'm accommodated temporary, until I move to a new apartment next week. Workload at the office is not too high so I will be able to continue to work fairly regularly on CityMania.

One nice thing is that some of my new colleagues are researches in the field of complex and neural networks and some of them have shown interest in contributing to the game (simulation aspects, especially traffic).
#define TRUE FALSE /*Happy debugging suckers*/

Nique

Quote from: tomkeus on July 12, 2010, 08:15:06 AM
Hey guys, just to report to you that I'm still breathing.

I didn't get to do anything lately. Approximately two weeks ago I have moved to Frankfurt in Germany for my PhD work. I'm still in the process of setting my life up. I currently do not have Internet at home, since I'm accommodated temporary, until I move to a new apartment next week. Workload at the office is not too high so I will be able to continue to work fairly regularly on CityMania.

One nice thing is that some of my new colleagues are researches in the field of complex and neural networks and some of them have shown interest in contributing to the game (simulation aspects, especially traffic).

that's good news!  &apls  ()stsfd()
Proudly developer of

JoeST

Awesome sauce!, hope you enjoy yourself Tom :)

Joe
Copperminds and Cuddleswarms