In response to Bravo1
Bravo1 wrote:
Kozuma3 wrote:
Bravo1 wrote:
Ghost of ET wrote:
Make it ripple.

Sorry, didn't see your comment, not sure what you mean by ripple


-_-

Perhaps I shouldn't try thinking too hard immediately after waking up.

"Ripple" seems like one of those words that sound really weird if you keep saying it.
Incoming block of code! You were warned!

var
chunkHandler
chunkHandler = new()

chunkHandler
var
list
chunkMap = new/list()
chunkMapHeight = 11
chunkMapLength = 11

proc
buildLocations()
var/list/unassigned = new/list()
chunkMap.len = chunkMapLength*chunkMapHeight

for(var/n in 1 to chunkMap.len)
unassigned += n

newChunk(/chunk/military,1,1)
unassigned -= locateChunkIndex(1,1)
newChunk(/chunk/military,1,chunkMapHeight)
unassigned -= locateChunkIndex(1,chunkMapHeight)
newChunk(/chunk/military,chunkMapLength,chunkMapHeight)
unassigned -= locateChunkIndex(chunkMapLength,chunkMapHeight)
newChunk(/chunk/military,chunkMapLength,1)
unassigned -= locateChunkIndex(chunkMapLength,1)

newChunk(/chunk/base,(chunkMapLength/2)+0.5,(chunkMapHeight/2)+0.5)
unassigned -= locateChunkIndex((chunkMapLength/2)+0.5,(chunkMapHeight/2)+0.5)

newRandomChunk(/chunk/hospital,unassigned)

var/stores = round(chunkMap.len/10)
while(stores--)
newRandomChunk(pick(typesof(/chunk/store)-/chunk/store),unassigned)

var/hospitals = round(chunkMap.len/20)
while(hospitals--)
newRandomChunk(/chunk/hospital,unassigned)

for(var/n in unassigned)
var/cx = index2x(n)
var/cy = index2y(n)
newChunk(pick(typesof(/chunk/house)-/chunk/house),cx,cy)

newRandomChunk(var/type,var/list/unassigned)
var/index = pick(unassigned)
var/hx = index2x(index)
var/hy = index2y(index)
newChunk(type,hx,hy)
unassigned -= index

newChunk(var/type,var/x,var/y)
var/chunk/chunk = new type
chunk.x = x
chunk.y = y
chunkMap[locateChunkIndex(x,y)] = chunk

locateChunk(var/x, var/y)
return chunkMap[locateChunkIndex(x,y)]
locateChunkIndex(var/x, var/y)
return x+(y-1)*chunkMapLength
index2x(var/index)
return (index-1)%chunkMapLength+1
index2y(var/index)
return -round(-index/chunkMapLength)

atom
proc
initialize()

chunk
var
name = ""
x = 0 //Location in grid
y = 0
xSpawn = 0 //Spawn Location for player
ySpawn = 0
xLocat = 0 //Bottom left tile
yLocat = 0
height = 0
length = 0
proc
initialize()
for(var/atom/A in block(locate(xLocat,yLocat,1),locate(xLocat+length-1,yLocat+height-1,1)))
A.initialize()//5 difficulties

hospital
military
base

house
house1
house2
house3
store
store1
store2
store3



What this does is let me randomly build a list of elements, whilst specifying certain aspects of it. It's a one dimensional list of "chunks", with functionality to check where they are in a two dimensional state. Yay math, or more specifically, yay Kaiochao!

This lets me build a city with something like this:
mob
verb
dothing()
rand_seed(input(src,"seed")as text)
chunkHandler.chunkMapHeight = min(11,max(3,round(input(src,"height")as num,2)+1))
chunkHandler.chunkMapLength = min(11,max(3,round(input(src,"length")as num,2)+1))
chunkHandler.buildLocations()
for(var/v in chunkHandler.chunkMap)
world<<v:type



It's going to be probably not used for a game about post-apocalyptic survival. You're the center tile and must spread out and attack other areas of the city to get resources. You win when you overtake the entire city.

Really easy = 3x3
Easy = 3x5
Hard = 5x5
Very Hard = 5x7
Suicidal = 7x7
Pls no = 7x9
PLS NO = 9x9
Oh god wat r u doin = 9x11
The "I don't know what sunlight is, but I don't need it, I am a level 89 wizard" difficulty = 11x11

In response to Mr_Goober
Mr_Goober wrote:
"Ripple" seems like one of those words that sound really weird if you keep saying it.

That's all words, really. It's a phenomena called semantic satiation/saturation.



Mr.Roboto can now move backwards, and the plasma gun/cannon/blaster/thing makes a return, yaaay!
In response to Bravo1
Bravo1 wrote:



Mr.Roboto can now move backwards, and the plasma gun/cannon/blaster/thing makes a return, yaaay!

Yay add a plasma nuke next :D???


Obviously not my work, but I'm wondering if it's possible to get this kind of effect working in BYOND? The background is all wavy because it's supposed to be really hot, also happens in underwater areas in the game.
Not unless you're using the webclient, methinks. I think this would be a neat filter when/if Lummy actually does decide to try adding filters.
Unfortunately, that's not a linear transformation so there's not a simple matrix you can apply to get the result. It looks like they look horizontal lines of pixels and shifted them according to sine or something similar.

Also, more math regarding your game! This is all following from this picture and what you've said.

So, assuming the rover is about 5ft long and we have a field-of-view of about 45°, the closest of those giant towers in the back, assuming they are three miles across, are about 87 miles away. Furthermore, you said gravity is about ⅓ of Earth's. Assuming the planet has about the same density of Earth that means its radius is about 3950 miles, and so the little rover must be about a mile up.

Also, consequently the towers should be almost fixed in the background. I'd actually suggest this, as it would give a slightly better sense of scale, and perhaps make the moving layer supports for the tower the little rover is in.
In response to Bravo1
Bravo1 wrote:


looks like good art to me....
In response to Southend_boi
It's from a metroid game I believe.


Some more variability/detail added with the turfs. Added some stuff to the background to give it a bit more life.

Also changed the resolution to 480x320 (15x10 tiles) internally rather than 480x288. This is scaled up 2x to 960x640 like the pic here.
Well, I got division implemented, but I'm not too satisfied with it. Dividing two BigInt objects (even if both are large) isn't too bad.
/*

0xf3a7ab023ae1323c0fe5dcce909cd93d9e1111fc34214e76160cf7b3c2a4b0f0b8405fb44b13509454183d54ef965dd458c9 / 0xf2c549b3485a10eed34b36b174c867faf754be75989a8852477caf690654bed0d9e9f417fc3fa65b = 0x000100eeb75e454e8704fc5c Remainder 0x0000ce0ac96e6a74341dcc78f91b7d52e07f81fb7c60b544f58e24ef7ad71c61c4f704eee23678c6fc15.

*/


Profile results (total time)
Proc Name Self CPU Total CPU Real Time Calls
--------------------------------------- --------- --------- --------- ---------
/mob/verb/BigIntLargeDivision_SpeedTest 0.001 0.054 0.054 1
/pif_BigInt/New 0.000 0.001 0.000 4
/pif_BigInt/proc/_GetBlock 0.012 0.013 0.015 7950
/pif_BigInt/proc/_PushBit 0.017 0.035 0.036 400
/pif_BigInt/proc/_SetBlock 0.010 0.010 0.011 5962
/pif_BigInt/proc/Bit 0.001 0.001 0.001 400
/pif_BigInt/proc/BitLength 0.000 0.000 0.000 773
/pif_BigInt/proc/Bits 0.000 0.001 0.001 288
/pif_BigInt/proc/Compare 0.003 0.005 0.005 400
/pif_BigInt/proc/Divide 0.001 0.050 0.051 1
/pif_BigInt/proc/Expand 0.000 0.001 0.000 67
/pif_BigInt/proc/ExpandTo 0.000 0.000 0.000 1
/pif_BigInt/proc/GEQ 0.000 0.006 0.006 400
/pif_BigInt/proc/GetSign 0.001 0.001 0.001 1035
/pif_BigInt/proc/GreaterThanOrEqualTo 0.001 0.006 0.006 400
/pif_BigInt/proc/IsExpandable 0.000 0.000 0.000 5
/pif_BigInt/proc/IsModifiable 0.000 0.000 0.000 41
/pif_BigInt/proc/IsNegative 0.000 0.000 0.000 4
/pif_BigInt/proc/Length 0.002 0.002 0.005 16117
/pif_BigInt/proc/Mode 0.000 0.000 0.000 8
/pif_BigInt/proc/PrintHex 0.000 0.002 0.002 4
/pif_BigInt/proc/PrintHexadecimal 0.001 0.002 0.002 4
/pif_BigInt/proc/Set 0.000 0.001 0.000 4
/pif_BigInt/proc/SetBit 0.000 0.000 0.000 40
/pif_BigInt/proc/SetMode 0.000 0.000 0.000 2
/pif_BigInt/proc/SetSign 0.000 0.001 0.001 275
/pif_BigInt/proc/Subtract 0.004 0.007 0.007 40

Unfortunately, it doesn't scale well in the sense of repeated operations in a short interval.
/*

0x29a857090114875ba4db6cd48eb197ffcaf0730bc388499a8c0e87e9854c253eeb306ef59e33ecc0f352847eaae8691e58a9beb434e84a9d68fbab85e3270936f66cd32b2009b4948a51c096c970fd7f3e208773a39a9bd13a95ca25ce6edf52f45a0a019b4431524593e57012c03ad01e8372c59e8a8adf4c076d40b09cb04c48aec2a0000000000000000000000000000000000000000000000000 / 200! = 0x0001

*/

Profile results (total time)
Proc Name Self CPU Total CPU Real Time Calls
------------------------------------- --------- --------- --------- ---------
/mob/verb/Division_IntegerStressTest 0.000 7.379 7.381 1
/pif_BigInt/New 0.001 0.006 0.006 401
/pif_BigInt/proc/_GetBlock 0.895 1.149 1.256 803001
/pif_BigInt/proc/_PushBit 0.972 1.855 1.874 249600
/pif_BigInt/proc/_SetBlock 0.548 0.677 0.721 392977
/pif_BigInt/proc/Bit 0.667 1.270 1.291 249600
/pif_BigInt/proc/BitLength 0.256 0.378 0.403 368896
/pif_BigInt/proc/Bits 0.000 0.001 0.001 316
/pif_BigInt/proc/Compare 0.984 1.291 1.311 249600
/pif_BigInt/proc/Contract 0.000 0.000 0.001 77
/pif_BigInt/proc/Divide 0.742 7.375 7.376 200
/pif_BigInt/proc/Expand 0.001 0.003 0.003 478
/pif_BigInt/proc/ExpandTo 0.016 0.030 0.030 197
/pif_BigInt/proc/GEQ 0.179 1.726 1.753 249600
/pif_BigInt/proc/GetSign 0.070 0.073 0.102 369281
/pif_BigInt/proc/GreaterThanOrEqualTo 0.257 1.546 1.567 249600
/pif_BigInt/proc/IsExpandable 0.000 0.000 0.000 598
/pif_BigInt/proc/IsModifiable 0.022 0.022 0.025 59589
/pif_BigInt/proc/IsNegative 0.000 0.000 0.000 202
/pif_BigInt/proc/Length 0.656 0.704 0.928 2243873
/pif_BigInt/proc/Mode 0.001 0.002 0.002 998
/pif_BigInt/proc/PrintHex 0.000 0.003 0.003 2
/pif_BigInt/proc/PrintHexadecimal 0.002 0.003 0.003 2
/pif_BigInt/proc/Set 0.037 0.087 0.087 601
/pif_BigInt/proc/SetBit 0.271 0.567 0.564 59389
/pif_BigInt/proc/SetMode 0.001 0.002 0.003 400
/pif_BigInt/proc/SetSign 0.326 0.542 0.570 179070
/pif_BigInt/proc/Subtract 0.474 1.086 1.096 59389
/pif_BigInt/proc/Trim 0.001 0.001 0.001 1


I've ordered a copy of Knuth's The Art of Computer Programming, vol. 2 from my campus' library for an algorithm in there that I'll hopefully be able to implement to speed of up division. It should be coming in next week, but until then I'll have to go with this.
I really want to play Blaster Master now...


Hive Cannon...
Release Severed World please.
In response to Pixel Realms
Pixel Realms wrote:


Hive Cannon...

BEEEEEEEEEEEEEES!!
Done lots and lots of framework and engine building for Skeleath, really proud of how well all of what I've written works and how modular it all is. One thing handles all the text, one thing handles all the hud elements, and another handles storing and managing the text. And the best bit is how flexible it all is. I can change the font, have multiple fonts, scroll up through the chat and down through it. Change the colour of the font and the size of the font, all at runtime!

Not very pretty to look at yet, my artist is hard at work though!

Most of the development of this game is done whilst talking in the BYOND Skype group, you should drop in an have a chat, or look for help.



Also here's a screenshot of the profiler used to create the above screenshot. I feel like there's work to be done here, 35k calls to something is going to be creating overhead, especially once more players start playing together.


WEEEEE
In response to Ishuri
This looks awesome! How are you doing the trail?? It looks phenomenal.
Page: 1 2 3 ... 74 75 76 77 78 ... 349 350 351