Author Topic: RingDesigner - Map Editor  (Read 38535 times)

0 Members and 1 Guest are viewing this topic.

Orion63

  • Sapling
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 73
  • We are the Knights who say... NI!
Re: RingDesigner - Map Editor
« Reply #30 on: August 18, 2011, 01:01:57 AM »
IDK, how do you bend a straight line?

It would be super ambitious and super cool indeed, but it's impossible to do in Eufloria D:

And I don't think I'll make it before 19:00 PM today(local time, +1) or 18:00 London Time :)

Eufloria normally uses straight lines, which change direction occasionally(If you zoom in the planet SendRadius circle, you can see that it is far from a circle), to produce the effect of curve lines.

For annikk.exe idea, here some python code that does that:

Code: [Select]
#! /usr/bin/env python

import pygame
from sys import argv

#width, height = int(argv[1]), int(argv[2])

width, height = 1024, 768

screen = pygame.display.set_mode((width, height))

white = (255, 255, 255)
green = (0, 255, 0)
red = (255, 0, 0)
blue = (0, 0, 255)

def draw_lines(num, width, height, color):
     for line in range(num+1):
          pygame.draw.aaline(screen, color, (0, line*(height/num)), (width-line*(width/num), 0))
          pygame.draw.aaline(screen, color, (0, height-line*(height/num)), (width-line*(width/num), height))
          pygame.draw.aaline(screen, color, (width-line*(width/num), 0), (width, height-line*(height/num)))
          pygame.draw.aaline(screen, color, (width, line*(height/num)), (width-line*(width/num), height))

while True:
     event = pygame.event.poll()
     if event.type == pygame.QUIT:
          break 
     screen.fill((28, 28, 28))
     draw_lines(50, width, height, white)
     pygame.display.flip()

Aino

  • Ent
  • ******
  • Thank You
  • -Given: 4
  • -Receive: 27
  • Posts: 1,523
  • They'll eat you next!
  • Eufloria: Yes
Re: RingDesigner - Map Editor
« Reply #31 on: August 18, 2011, 01:05:21 AM »
Heh... But as mentioned, I won't do this before two requirements:

1 - I'm done with the newest update
2 - I feel for doing it :P

Pilchard123

  • Tester
  • Old Oak
  • ****
  • Thank You
  • -Given: 4
  • -Receive: 21
  • Posts: 929
  • Eufloria: Yes
Re: RingDesigner - Map Editor
« Reply #32 on: August 18, 2011, 01:28:10 AM »
the missing map of Pilchard, where is it?

It failed, didn't I tell you? I'm no good at making plain maps, only ones that show off a new thing that I made. Sorry.

Aino

  • Ent
  • ******
  • Thank You
  • -Given: 4
  • -Receive: 27
  • Posts: 1,523
  • They'll eat you next!
  • Eufloria: Yes
Re: RingDesigner - Map Editor
« Reply #33 on: August 18, 2011, 01:31:09 AM »
It failed? o.O

Well, thats sad, but ok... gotta finish it myself then I guess :P

Fergy1337

  • Da Boss
  • Shoot
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 10
    • Damaged Calm
Re: RingDesigner - Map Editor
« Reply #34 on: August 21, 2011, 09:44:44 AM »
Full respect to all (the other guy needs some respect hehehe) involved in this , really should bust a hole in new map feaver !!!!

Pilchard123

  • Tester
  • Old Oak
  • ****
  • Thank You
  • -Given: 4
  • -Receive: 21
  • Posts: 929
  • Eufloria: Yes
Re: RingDesigner - Map Editor
« Reply #35 on: August 21, 2011, 05:31:11 PM »
However, working on a tool that (may) allow procedural circles.

Hokay... done, I think.

It works much the same as DrawPoly(), but requires a little more work to use. Whereas DrawPoly() required the points to be setup before running the level, this can calculate them at runtime, though it can only produce regular polygons.

To use it, call RegPolyTemplate(). The paramenters are fairly self-explanatory, but...

name  --> The name of the template.
numsides --> The number of sides
radius --> The distance from the center of the shape to the top corner. This should be the same for every corner, but rounding errors may creep in.

To draw a shape, call DrawRegPolyTemplate().

name  --> The name of the template.
r,g,b,a --> Colour and alpha values of the shape.
thick --> line thickness
centerX, centerY  --> The coordinates of the shape's center.

To change a template, simply call RegPolyTemplate() and supply the name of the template to edit and what you want to change it to. To delete a template run polyplates[name] = nil

I think that's it. More sides to a shape will make it seem rounder, and should only be processor-heavy when running RegPolyTemplate(), and even then if you want a massively high-sided shape.
« Last Edit: August 21, 2011, 07:40:21 PM by Pilchard123 »

Lost Seedling

  • Shrub
  • ***
  • Thank You
  • -Given: 22
  • -Receive: 25
  • Posts: 195
Re: RingDesigner - Map Editor
« Reply #36 on: August 22, 2011, 02:37:17 AM »
Something isn't right, and unfortunately I think the problem is between my ears. Can you attach a working example file?

Pilchard123

  • Tester
  • Old Oak
  • ****
  • Thank You
  • -Given: 4
  • -Receive: 21
  • Posts: 929
  • Eufloria: Yes
Re: RingDesigner - Map Editor
« Reply #37 on: August 22, 2011, 03:18:55 AM »
I wouldn't be too sure about the location of the problem. I only put this together quickly and barely tested it. I'll have look at it tomorrow and tell you the results.

Aino

  • Ent
  • ******
  • Thank You
  • -Given: 4
  • -Receive: 27
  • Posts: 1,523
  • They'll eat you next!
  • Eufloria: Yes
Re: RingDesigner - Map Editor
« Reply #38 on: August 22, 2011, 03:23:46 AM »
Pilchard, whats between the ears?

Pilchard123

  • Tester
  • Old Oak
  • ****
  • Thank You
  • -Given: 4
  • -Receive: 21
  • Posts: 929
  • Eufloria: Yes
Re: RingDesigner - Map Editor
« Reply #39 on: August 22, 2011, 06:05:34 AM »
If a problem is "between someone's ears", it means that the problem is caused by the person, rather than the object/program. They may be being stupid (eg expecting a black-and-white printer to print colours) or they may really not have understood (I think this may happened here, if at all).

It is sometimes known as a PEBKAC error or an ID-10-T error, sometimes nastily, sometimes not.
« Last Edit: August 22, 2011, 06:09:50 AM by Pilchard123 »

Lost Seedling

  • Shrub
  • ***
  • Thank You
  • -Given: 22
  • -Receive: 25
  • Posts: 195
Re: RingDesigner - Map Editor
« Reply #40 on: August 28, 2011, 04:05:35 PM »
Can anyone upload a simple, working example of Polyplates? I'm having trouble with it.

Aino

  • Ent
  • ******
  • Thank You
  • -Given: 4
  • -Receive: 27
  • Posts: 1,523
  • They'll eat you next!
  • Eufloria: Yes
Re: RingDesigner - Map Editor
« Reply #41 on: August 28, 2011, 08:42:22 PM »
Add "function LevelLogic()" to it, as you can clearly see it's not there :P

Edit: But it isn't working very well, I get the error: "table index is nil" and it comes from line 12..
« Last Edit: August 28, 2011, 08:46:54 PM by Aino »

Lost Seedling

  • Shrub
  • ***
  • Thank You
  • -Given: 22
  • -Receive: 25
  • Posts: 195
Re: RingDesigner - Map Editor
« Reply #42 on: August 29, 2011, 02:38:48 AM »
That's what I'm talking about and I can't seem to figure out how to correct it, or at least don't have the patience to figure it out on my own.

Pilchard123

  • Tester
  • Old Oak
  • ****
  • Thank You
  • -Given: 4
  • -Receive: 21
  • Posts: 929
  • Eufloria: Yes
Re: RingDesigner - Map Editor
« Reply #43 on: August 31, 2011, 02:16:27 AM »
Nor can I seem to get it to work. Sorry for the long wait and useless reply - RL conspired against me for the week, and I was in Cornwall for the weekend.

Lost Seedling

  • Shrub
  • ***
  • Thank You
  • -Given: 22
  • -Receive: 25
  • Posts: 195
Re: RingDesigner - Map Editor
« Reply #44 on: October 02, 2018, 08:34:27 AM »
I finally got around to fixing Polyplates.
Attached is a corrected demo including both DrawPoly and PolyPlates functions.
Thanks Pilchard123, wherever you are!

Thanks: