Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

11 Neutral

1 Follower

About grelf

  • Rank

Personal Information

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. grelf

    Fractals in games

    IMHO people are assuming too much clever technicality is always required and are thereby lumbering themselves with huge processing, memory and performance requirements. I too have a terrain generator, essentially infinite in extent, with trees and many other objects on it. All in about 200 kilobytes of JavaScript plus some small images. The trees are PNGs made from my own PHOTOS - not generated as graphics. The trees are pseudorandomly distributed on the wooded parts of the terrain but in such a way that if you move back to the same spot you will of course see exactly the same scene. Explore this terrain at https://www.myforest.uk and look at the user guide which has links to a page about how it is programmed. My principle aim is to encourage others to explore the wonderful creative medium of plain HTML5/JavaScript before getting into any deeper waters. (I admit that my forest may be slow on some devices but of course they are getting faster all the time.) In answer to the original question: I am not using fractals but you can explore my HTML5/JavaScript implementation of Mandelbrot and Julia sets here: https://www.grelf.net/mandelbrot
  2. grelf

    Before DOOM

    The August 2019 Challenge on GameDev.net has been announced and it is about recreating DOOM with current technology. I missed the original DOOM craze in the 1990s although I had developed some computer games in the decade before that. So I first had to look at the Wikipedia entry on DOOM to see what it was all about. What a coincidence that the story, created in 1993, begins in 2019! Mars is supposed to be colonised by now with experiments being done on teleportation between Mars and its two tiny moons, Phobos and Deimos. One interpretation of the plot is that the teleportation machines are subverted so that they spew out horrible creatures from some unknown origin - hell? The creatures are determined to attack us and they must therefore be exterminated, which forms the action of the game. As I have not seen the original DOOM I am not qualified to respond directly to GameDev.net's challenge but it set me thinking tangentially. What about a prequel to DOOM, where the teleporters are being tested before being installed on Mars and its moons? Let us imagine that the testing was not thorough enough, leaving vulnerabilities to be exploited by hackers. Pre-DOOM is thus about the laboratory in which 3 teleporters are to be tested before being set up in their intended locations. The player will try each machine out and complete a test report. If all seems satisfactory we then have to consider what could still be wrong. Perhaps there is something outside the testing lab? My little game is written in JavaScript with an HTML5 front page. It is entirely client-based. It uses the HTML5 2D graphics context but no other libraries or frameworks. I have adapted it from another HTML5 game of mine, The Forest, an explanation of which can be found here. Pages after that describe the history (from 1982) and programming details. Pre-DOOM uses my own photographs for some of the graphics, just like The Forest. The game is basically complete and available completely free here: https://www.grelf.net/predoom There are just a few untidinesses to be addressed. www.grelf.net August 2019
  3. grelf

    HTML5 HTML game programming

    To get a different perspective on JavaScript in HTML5 pages (mixing canvas and other elements) you may ike to look at https://www.grelf.net/jscourse/index.html My home page (grelf.net) also links to other examples that I have converted to HTML5/JavaScript from some of my earlier programs in C++, Java, etc. Are you aware that there is another game developers' web site specifically for HTML5.JavaScript? See http://www.html5gamedevs.com/forum/2-coding-and-game-design/
  4. grelf

    HTML5 HTML game programming

    Certainly put ordinary HTML input elements in the same page as canvas element(s). It works fine. (My main example: https://www.myforest.uk ). You may well want users to touch, click or drag things in the canvas but if you try to replicate HTML controls such as text input, check boxes or drop-down lists within canvases you would just be making life unnecessarily difficult for yourself.
  5. grelf

    How difficult is it to make programs?

    How long is a piece of string? Are you wanting to write an essay or a novel? Programming can be a form of creative writing, especially when making games. You could start here (it's free): https://www.grelf.net/jscourse/start.html That will show you how easy it is to get started but you must do the examples - learn by doing.
  6. Do you mean how to give each star a Gaussian brightness profile? If so, you can see an example here: https://www.grelf.net/sky/index.html If you scroll down you will get some explanation. Right click to view source and you will see links to the various JavaScript files. The one you need is viewAA.js and it contains a method of a View object declared like this: View.prototype.calculateStarProfile = function (maxLevel, halfWidth) You will find the Gaussian constructor and its calc() method further down in the same file. I hope this helps.
  7. grelf


    I don't see why you say that web technologies are "hardly the need". I have made an orienteering simulation (and treasure hunt for non-orienteers) with limitless forest - entirely in HTML5/JavaScript. To read about the background start here: https://www.grelf.net/ojsvg.html and the game itself is at myforest.uk
  8. grelf


  9. grelf


  10. grelf

    Weird circular orbit problem

    The trouble with integration methods for predicting the path of an object is that eventually errors increase to the point where no faith can be had in the results. In 1987 Bretagnon and Francou, of the Bureau des Longitudes in Paris took a different approach and produced a method called VSOP87 which enables the heliocentric coordinates of all the major planets to be calculated from long series of terms. As I understand it they did harmonic analysis of historically long series of observations, effectively producing something akin to Fourier series for the calculations. Jean Meeus' book "Astronomical Algorithms" explains much more about this, giving the algorithm and discussing accuracy. He includes all the necessary data as an appendix to the book. See https://www.willbell.com/math/mc1.htm I obtained the book in 2010 and implemented the algorithm for all major planets for a certain web site. I originally wrote it in Java for client-side applets but when Oracle ceased to keep Java secure enough in browsers, I converted it all to server-side PHP (yuk!). The original paper is referenced in Jean's book: P.Bretagnon, G.Francou, "Planetary theories in rectangular and spherical variables. VSOP87 solutions", Astronomy and Astrophysics, Vol. 202, pp 309-315 (1988). Searching today I discovered that Jean's book is available online as a PDF (488 pages) from http://www.agopax.it/Libri_astronomia/pdf/Astronomical Algorithms.pdf Thanks for pointing me to MathPages.com - that looks excellent.
  11. grelf

    Weird circular orbit problem

    I was really questioning the original item's mention of circular orbits. If a circular orbit was expected, or if that is a suitable approximation for Mercury's orbit in your application, then why is integration considered necessary? In that case the radius and angular velocity would be constant and the angular position would simply be proportional to time. Keep it simple.
  12. grelf

    Weird circular orbit problem

    Mercury's orbit is the least circular of all the major planets with an eccentricity of about 0.206.
  13. grelf

    The Forest

    This is an update (2014 - ongoing) of a pair of programs first published in the mid-1980s: The Forest and Explorer. The originals were of course very limited in their capabilities so the new version is very much more than just an update. The Forest started as a training aid for the sport of orienteering, so a map is generated which conforms to IOF standards and is essentially infinite in extent. Each scene on the ground (or, for non-orienteering explorers, from a helicopter, down in mines, etc) is built as a composite of thousands of copies of a few photos of my own. The amazing thing is that such scenes are displayed in less than a second but the code is just JavaScript, using the standard HTML5 2D graphics API. No frameworks or libraries are used, just my own code. Being just HTML5/JavaScript the programs runs on any device that has a browser. The user does not have to install anything. The code is about 200 kilobytes (yes) and the photos come to less than 2 megabytes, so the whole thing downloads and runs in seconds. This is not a commercial venture. I am simply doing it for my own creative enjoyment, as a demonstration of the capabilities of JavaScript in an HTML5 web page, to encourage others to create things in that environment and as an example for others to build upon. I am continually adding new features. The code is easily available and I have written extensive documentation both for users and programmers. Start here: https://www.grelf.net/ojsvg.html Among the many links from there you will find my free programming course too (JavaScript in HTML5). Explorers (non-orienteers) can have quite a challenging and (hopefully) interesting quest, as the following describes. [This is possibly a SPOILER.] The first strange thing that explorers are likely to notice is that some rootstocks (upturned tree roots) have fragments of a small map attached to them. Putting the fragments together reveals an island to search for on the main map and travel to. If all the fragments have been seen something will happen on arrival at that location. There will be a clue as to where the treasure chest lies very near there. There are several other diversions that may be encountered along the way and which may or may not be worth looking into. Also scattered throughout The Forest are some posters written in a simple cipher which the explorer may want to elucidate. When decrypted these posters give clues about various things in The Forest, including how to get into certain places. It is not essential to read these but it could save some time and effort. The cipher appears on something else too, so it is useful to understand it. The treasure chest has a note (in plain text this time) indicating how to find a particular building. It also provides a key code for entering the building. Do make a note of the key code. Buildings all have key codes which must be typed in for entry. There is a measuring device that can be found in many places underground. It will help to determine the key codes, once the explorer understands how it works. Once inside a building there are posters on the walls which may help to explain certain things. Buildings all contain a controller for a mechanism which is essential for the next stage of the treasure hunt but the mechanism will only work in that particular building indicated by the note from the treasure chest. (It is believed that there is only one building with that key code but since everything is randomly generated that may not be true.) The mechanism will reveal the target of the next stage of the adventure and make it possible to get there. The next stage involves a dream sequence reminiscent of a certain film. The sequence ends at another machine.... (to be continued). Further hints: there is a shortcut key that enormously assists the journey from the starting area to treasure island. The x and y positions given in the status line also may be useful. See the User Guide for more details: https://www.grelf.net/terrain.html
  14. My advice is to start simply, by learning JavaScript and just enough HTML to use it in a web page. I wrote an introductory course which starts very simply and builds up to advanced stuff: https://www.grelf.net/jscourse/ Don't complicate things by also trying to learrn one of the frameworks or libraries at the same time. Master HTML5/JavaScript first. To see what can be done with a little JavaScript and HTML5, take a look at https://myforest.uk/
  15. grelf

    The Forest

    Album for The Forest
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!