Jump to content

Drawing a square realtime on a image


Recommended Posts

Before I start, searching online and the forum thiis has been asked before by people hacking games, this does involve games but its for a bunch of developers tools for a game engine I'm making (the tools not the engine), I have two other tools written with AutoIt this one has just become my Nemisis, so if you want to see them first I'll gladly share, one converts 6 images to a format the game engine uses, the other is a cfg file parser and rewriter

What I'm trying to do is plot a square on a image and get the coords, I made a basic one last night which just went by mouse clicks at 4 points and returned the value, the issue really is I need to be able to shrink a 2048 x2048 image and get the right values also how to isolate it just to the image, currently I'm getting the whole gui, ultimately draw lines to the points

I don't want or expect anyone to do it for me, were's the fun in that! but some pointers would be great, search I've missed or an example, I found some last night but earlier versions of AutoIt

The square is the hotspot were an event will happen, currently its trial and error or using a image editor kinda thing, the game engine has no GUI, in the engine it'll look like:

alarmButton1 = cafeteria3:addSpot( Spot(WEST, {1536, 1164, 1625, 1164, 1625, 1290, 1536, 1290}) )

the goal is a room editor that will write a basic script and add these spots, I want to be able to swap images so you do all six cube faces and plot the spots easily its very time consuming otherwise,

Edited by Arfur9
Link to comment
Share on other sites

I'm just on building the gui and image loader, I've hit the manual a bit more and I think I see what I need to do, whether I understand it is a different matter lol

one part of my tool set is this, the idea is it save manually writing a bat file, basically the user sets the path to their image set (the image set is 6 cube face images). it'll queue multiple conversions. The idea of the tex file is it loads faster and better compression, but is also only readable by the engine, typically while developing a game you'd leave the imagesets as regular images the convert them on release.

Anyway I'll post what I have in regards to this thread ASAP

Link to comment
Share on other sites

  • Moderators

Hi,

I was asked to look at this thread. I am perfectly happy to let it run as the OP is using AutoIt to make the tools to create the game, not interact with it during play. :)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Thanks Melba23 :)

Game engines with no editors are really hard work so the tool set is just to make life easier, I'm cursed with a slow computer right now so can't render 2048x2048 images in a realistic time so developing these tools is my way of keeping involved and learning something new :)

I can fully understand the twitchyness about such threads, I'm a beta tester for a renderer that has been hacked and then they have the b*lls to ask for support.

Link to comment
Share on other sites

Hi Zedna thanks for that, there seems to be a problem with the radar script, incorrect parameters in about 6 places? I'm using the current build not the beta, I'll try the built version and see what it looks like :)

Syntax of sources is for old AutoIt 3.2.12.1 as I said in that topic!

EDIT:

Just look at Func MalujKriz() ; called after change of picture

MalujKriz means in English PaintCrossHair

Edited by Zedna
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...