Arcade Tool for people who want to mess with it


#42

Not sure if it’s because I’m using it wrong or if it’s intentional, but using _r.push() and _r.pop() on _r.rect() allows you to draw outside of the screen area.

Using _r.translate() or _r.rotate() causes certain rectangles to continue drawing beyond the limits of the screen. This behaviour seems to be exclusive to _r.rect(). It also only happens to rectangles that wouldn’t be cut by the screen if they were drawn at their actual location, not the new translated one.

Sprites and Quads seem to work fine.

GitHub link to tester code: https://github.com/dantheradarman/tu_arcade-001

WebM

[Made to offend the eyes]
http://botdan.com/towerunite/uploads/arcade/screenshots/renderbug.webm

EDIT
It also seems to happen when the rectangle thinks it can’t be seen behind another rectangle. Some of the water squares and waves continue rendering upon going behind the island rectangle. (I turned the waves into rects rather than quads for demonstration purposes). I couldn’t recreate this one outside of this game, suggesting this may be an error with something I’m doing.

(WebM)

http://botdan.com/towerunite/uploads/arcade/screenshots/rednerbug2.webm


#43

Good catch again sir.

I took a quick look at the code for drawing rectangles and sure enough in my haste to add a drawing optimization, I test the visibility of the rectangle before it’s transformed. If the pre-transformed rectangle is completely inside the view-clip, it draws without clipping to save time. This should be pretty easy to solve, I’ll patch it tonight.


#44

so i just found in the original project two little snippets of code put inside of a multiline comment.
The first one being this

		if e.altshoot then
			x = x - width
			e.altshoot = false
		else
			x = x + width
			e.altshoot = true
		end

which by removing the --[[ from the start of it and the ]] you unlock a different stream of bullets for you main ship with it alternating from a left and right stream.

and the second code snippet is a neato explosion for the enemy ships (and yourself!)

	_r.color(b,.7*b,.3*b,1,1)
	local sqrtfrac = math.sqrt(e.frac)
	for i=36, 360, 36 do
		local lr = i * (math.pi / 180)
		local r = 10 + sqrtfrac * 100
		local c = math.cos(lr) * r
		local s = math.sin(lr) * r
		_r.sprite(x+c,y-s,2,4 + b * 20,lr - math.pi * .5)
	end

which again by removing the code block ends you unlock the cool animation for deaths!


these are just little things i found when exploring the code trying to figure out how to make a cool thing, so i thought i’d share them since i hadn’t seen them mentioned anywhere.


#45

Sorry to resurrect this topic after its slumber, but I had a few questions regarding the Arcade tool after messing around with it more recently.

  1. Will text be supported?
  • In my mind this was a big issue but now after playing with the tool I can see most intended uses won’t require text. Even numeric scores can be done pretty easily.
  1. Will there be any methods for clipping pixels?
  • Yet again, not really a big issue for the intended use of the Arcade, just something I ran into with creating scroll panels. This could be worked around though.
  1. Custom Resolutions?
  • I’m aware this is planned. My question revolved around 2 sub-questions:
    • What is the maximum resolution we will be able to use?
    • How will this display in-game? (fill or stretch etc)

These questions all also slightly revolve around a bigger question:
Will the Arcade tool be able to be hooked into the CondI/O system?
I know this was suggested by someone before, but it wasn’t further discussed. I’d love to be able to hook up the potentially crazy contraptions the CondI/O system may allow for to a nice control panel using the Arcade API.


Also, some content as to actually add to the thread:
Basics of a UI system V2:


#46

##WOAH
This is amazing stuff man, great work!

Let me answer some of your questions:

  1. Will text be supported?
    Definitely, I have big plans for built-in texture atlas generators for text stuff.

  2. Will there be any methods for clipping pixels?
    Yes, there is a built-in clipping system, it’s just not exposed to lua yet.

  3. Custom Resolutions?
    Yes, each arcade game class will be able to specify it’s own resolution.
    If you set your resolution to 800x600, your in-game coordinates will be uniform-scaled back to fit the “device” it’s displayed on.
    The aspect ratio will be matched by adding vertical / horizontal spacers around the view area.

  4. Will the Arcade tool be able to be hooked into the CondI/O system?
    Absolutely, this is something I definitely want to do.


#47

Awesome! Thanks.
I really look forward to the Arcade in the future as it has so much potential.


#48

the 4rth one…god diggity dang, i can wait i can wait i can wait i can wait…I CANT WAIT


#49

anybody like super mario kart (very WIP)
https://www.dropbox.com/s/ltlu5dtllnt2utz/Arcade%201_17_2018%203_53_24%20PM%20(2).mp4?raw=1


#50

Oh, fuck. That’s awesome, dude.


#51

I LOVED Super Mario Kart! That’s so cool.


#52

This gameplay reminds me of games like Ground Effects or Rad Rally
https://youtu.be/2m_wc6cHuRc?t=1m38s

I’d love to see games like this in the arcade!


#53

Rad Rally is the best.

Could even try to make something like


#54

Yessssss outrun is the best, just reached stage 4 yesterday and I feel g r e a t

Honestly would love to play Outrun in the arcade. Maybe there should be a racer cabinet? or maybe even just a different control panel for upright machines?


#55

Hell yeah…


#56

I plan on making a racing cabinet akin to the last picture you posted. It won’t be that exact model but the idea is that it’s one of those sit-down-in-a-car arcade cabinets. So that will be an option for racing themed games.


#57

Complete with hydraulic movements for that super immersion??


#58

I’ve found the thread I was looking for. Now to start trying to remember how to code badly! =D