Asteroids remake

About Monkey 2 Forums Monkey 2 Projects Asteroids remake

Tagged: 

This topic contains 41 replies, has 7 voices, and was last updated by  AdamStrange 2 years, 8 months ago.

Viewing 15 posts - 16 through 30 (of 42 total)
  • Author
    Posts
  • #2921

    AdamStrange
    Participant

    Here’s a thought for you.

    I’m busy with Ted21, but my aim is to try and integrate other systems directly into the editor. Sprite editor, atlas, vector editor, sound editor, etc. Sort of one stop shop for the basic development.

    I haven’t really looked beyond the concept, but you showing the code for the base vector system is a start. I would need to firm up a lot first though.

    What are your thoughts?

    #2928

    Matthew Smith
    Participant

    Adam,

    Yes certainly sounds interesting! The ability to have some basic editing of a number of file types would enhance a game making application such as Monkey2.  Doing a great job on Ted21 BTW!

    #3210

    Matthew Smith
    Participant

    Updated version (0.6)

    https://1drv.ms/u/s!AgngrULjSty9kJscgMVwpojeo2pn3w

    Added UFOs, extra player every 10,000pts and ability to enter high scores.  Also done a general tidy-up of the game play – plays quite well now.

    The new change follow the reasonably established Asteroids game play – UFOs have a large and small (after 10,000pts).  Large UFO fire randomly whist small UFOs are quite accurate (less accurate initially but get more so the higher you score.

    Now onto the bonus stuff and maybe some color changes.

    #3213

    wiebow
    Participant

    Played it! Really nice man 🙂

    I have also taken the Asteroids template and I am working on a new game as well. Will post once the prototype generates fun gameplay!

    #3226

    Matthew Smith
    Participant

    @wiebow looking forward too seeing it!

    #4118

    AdamStrange
    Participant

    @Matthew Q. how are you constructing the vector shapes? graph paper and data or using some other editor?

    I’m just about to start work on a vector editor and wondered what approach you took?

    #4119

    Matthew Smith
    Participant

    Adam,

    With the code I used it stored the data in a 2d array which is laid out in grid co-ordinates (x,y) with centre as 0,0.  For example the ship is initialised as follows:

    The one thing you may want to consider is the ability to have multiple start points (I guess you could also overlay multiple vectors as an alternate) which would allow you to construct more detailed vectors – for example with the UFO I did have to draw over the some areas twice to get to the next area I needed to draw:

    The vector code I used is available here if you wanted to take a look:

    https://github.com/chunkypixel/monkey2/blob/master/Asteroids/src/entity/vector.monkey2

    What the code does is initially store the vector in one array and then as scaling or rotation is applied it updates the object into a drawing vector.  Then when drawn a virtual scale is also applied (Asteroids runs under a base 640,480 but a virtual scale is applied when drawn to match the actual screen size ie. 1024,768).

    Hope that gives you a starting point!

    #4120

    AdamStrange
    Participant

    I’ve had a brief look over the code – thanks for that by the way

    I particularly liked the general concept of the points being stored then rotated, scaled as needed into a new entity – this is exactly the same concept I’m using, so I must be on to something.

    Here’s a very early dev shot of the 2d vector editor. I decided to make it look a but different from the usual dark ui so you have no doubt what section you are dealing with. Also the points snap to the lines so no floating points. Again I think this is the best way to do this as it allows very tightly aligned objects

    UI elements will be added above the magnify icons (like pen, move, select, etc). The ui is in keeping with the ui I created for viewing images, so there is a consistency across everything

    #4122

    Matthew Smith
    Participant

    nice! you don’t need anything too fancy but looks like it will do a great job! Certainly easier than a manual plot!

    #4123

    AdamStrange
    Participant

    yep, that’s what I thought. I’m working on the selection stuff at the moment.

    It looks to me that a vector is a single line, so to construct something move complex would require multiple lines, which requires some form of grouping system.

    What I thought with that is: each vector appears to the left in a sort of directory. Just select multiple entries to make an object with many lines. it would also mean you can have layers and onion skinning, etc

    #4124

    wiebow
    Participant

    Looks like my vector editor from years back! They’re fun!

    http://members.home.nl/wdw/images/wip/objecteditor.PNG

    I did use unique lines, each with an end and start point. It allowed me to apply color and attributes to each line. Scaling, rotation, etc was only done when an object got changed.  It was a good system, might port it to M2!  I could use more vector games anyway!

    #4125

    gcmartijn
    Participant

    I Made a png to polygon module, maybe you can use that. Its inside the Ted module manager.

    #4129

    AdamStrange
    Participant

    Wiebow definitely a good idea. I’d love to get something that is open and what people want 😉

     

    All basics now complete:

    drawing, moving, selecting, moving and zooming the page

    #4135

    dmaz
    Participant

    or mine… 🙂 ditto everything wiebow said though I did write an save optimizer that removed all duplicate points out. so multiple segments would turn into a polygon if colors and position are the same. the layering idea you mentioned is actually important as you usually want at least 2 polys per object… the visible and the collision which is generally much less complex.

    my library had lighting as well… I would calculate the segment’s distance and angle from each light source and apply color changes as needed. that worked pretty nice… I even started to add keyframe animation moving each point through easing. though I never put that in a game.

    building stuff like this is fun! I miss it 🙁

    http://ooeyug.com/images/vecedit3.png

    #4147

    AdamStrange
    Participant

    the collision is an interesting point. I was thinking of having bounds, box, circle, triangle and poly as collision.

    I’ll get the basic system operational first 😉

    quick shot of progress so far with placeholder buttons and left view (the browser will live on the left)

Viewing 15 posts - 16 through 30 (of 42 total)

You must be logged in to reply to this topic.