• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
noatom

Create infinite curve

8 posts in this topic

So I basically start with a straight line from 0,0 to 0,10 (x,y space),and i need to add another line of that length,connected to the old one,but which slowly makes a curve,then another one....

 

The point is,I want the lines connected.

 

The bigger problem is doing this for infinite time.How would you go about it?

0

Share this post


Link to post
Share on other sites
We are going to need either a much better description of the situation (ideally including why you are trying to do this) or a picture of what you want this to look like: My mind-reading skills are not what they used to be. ;)
1

Share this post


Link to post
Share on other sites

I just need to code random generated curves forever. For example,you start with 100 floats,representing points. With those 100 floats you have to create a random curve.When you move forward,you delete the first float,and create a new one,but that new one IS based on the 99th one.Basically each new float is somehow linked to the float behind it.

 

or look at it from this point,you always have 100 points.You first create a curve.Whenever the player moves forward,you create a new point where the player WAS last time,and that new point is creating a new curve.

 

So,if player is is on point 1,but moves to point 2,point 1 will equal to a new point.You do that untill all points have been recreated to form a new curve.

Edited by noatom
0

Share this post


Link to post
Share on other sites
Sorry, but you are still not making a lot of sense. I don't understand what you are trying to do, or the connection between the 100 floats and the random curve, or what you mean by a float being based on another, or the nature of the link between the new float and the float behind it.

You probably have a more natural problem in mind, and you convinced yourself that it could be reduced to something like what you are describing. If you explain the circumstances in which the need to solve this problem arose, we will be in a much better position to help you.
0

Share this post


Link to post
Share on other sites

ok,the real problem is: " implement a road ,that has curves,and that goes one forever". When it says goes on forever,it means that when the player goes forward,the road will become longer.

 

its in 2d space btw

Edited by noatom
0

Share this post


Link to post
Share on other sites
If I understand you correctly, you are wanting to create something similar to snake right? Meaning you have a path and you have a head of the path where it grows but as it grows at the head, the tail gets shorter so you always have the same number of points, right?
0

Share this post


Link to post
Share on other sites
I am assuming only a quite small part of the curve is visible at any time. If the player can only move forward you can then simply store the visible portion of the curve and generate new parts as needed. The old parts can be easily discarded. If the player can also move backwards you probably need something more complicated (but it depends on your needs).
0

Share this post


Link to post
Share on other sites
I suggest starting with an actual implementation of driving along an arbitrary finite road. This way, apart from dealing with more difficult parts first, you are forced to develop a sufficiently general representation for arbitrary road sections (for example, a bunch of polygons or large tiles) and you only need to implement updates of the road representation and random generation of reasonable road sections to allow the player to drive forever. I suggest looking for inspiration in an old MS-DOS game, Stunts (aka 4D Sports Driving), which has 3D graphics but friendly tiles in the level editor: track pieces include for example 2x2 tiles large 90° curves, single tile tight 90° curves, 2x1 vertical or corkscrew loops, hills and ramps rising 1 level in 1 tile length, etc. Every tile consists of a few polygons, instanced in a simple 3D scene with an arbitrary camera, extremely aggressive culling of distant geometry, and a skybox. Your game could lay down this kind of road pieces in "unexplored" parts of the map, without replacing previously encountered road sections. Another reference: OutRun, where the fixed view allows the road to be a sequence of coarsely juxtaposed very short sections (you can go down to about 1 pixel) with a smoothly varying vertical and horizontal displacement from the previous section. Add random road width changes, objects (e.g. roadside boulders) and a little traffic, and you have specified everything.
1

Share this post


Link to post
Share on other sites

I may be misunderstanding, but you want a curve that you can add control points to?  That should be straightforward enough.  As long as you keep adding points to a spline, it will keep getting longer.  A catmull rom spline, my go-to spline, only looks at 4 control points at a time, so you can remove points that are already off-screen, and add more on as they approach on-screen.  (I also like catmull rom because all the control points are on the curve)

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0