Genus Prime - 8-BIT WARS competition entry

Started by Derron, April 01, 2019, 08:51:53

Previous topic - Next topic

Xerra

Quote from: Derron on April 06, 2019, 16:15:35
Are you on macos 10.14 too?
Wonder why they both crash at Adams but not on yours. There's a difference between your systems.

My Mac is prehistoric but that shouldn't really cause an issue. I've been too busy using the machine to let the latest OS update install and restart it, however.

M2 Pro Mac mini - 16GB 512 SSD
ACER Nitro 5 15.6" Gaming Laptop - Intel® Core™ i7, RTX 3050, 1 TB SSD
Vic 20 - 3.5k 1mhz 6502

Latest game - https://xerra.itch.io/Gridrunner
Blog: http://xerra.co.uk
Itch.IO: https://xerra.itch.io/

Steve Elliott

Win11 64Gb 12th Gen Intel i9 12900K 3.2Ghz Nvidia RTX 3070Ti 8Gb
Win11 16Gb 12th Gen Intel i5 12450H 2Ghz Nvidia RTX 2050 8Gb
Win11  Pro 8Gb Celeron Intel UHD Graphics 600
Win10/Linux Mint 16Gb 4th Gen Intel i5 4570 3.2GHz, Nvidia GeForce GTX 1050 2Gb
macOS 32Gb Apple M2Max
pi5 8Gb
Spectrum Next 2Mb

Derron

@ Xerra
Eaaasy fix:
Replace in GenusPrime.bmx:
Code (BlitzMax) Select

Field alive:int
'with
Field alive:int = True

If a ship was not alive it never decreased the count when getting destroyed ;-)

Updated my repo accordingly (just fetch a new GenusPrime.bmx if you want).



@ Steve




@ others
Uploaded v1.0.2 with fixes. Adams version for Mac should still work - as it did the "performance hungry" fix (creating a copy of a map containing all currently existing ships/missiles each time).


https://www.gamezworld.de/files/GenusPrime_v1.0.2_LinuxMacWindows.zip


Thanks for Xerra pointing me to the bug regarding the level end check/playerstates.


bye
Ron

iWasAdam

#63
Hi Derron.
I really like the concept for this and I'm going to use it as a test bed for my next project.
I like the concept of clicking/selection and sending things that you have no real control over

I'm working on the base core of clicking and selecting atm

Steve Elliott

Win11 64Gb 12th Gen Intel i9 12900K 3.2Ghz Nvidia RTX 3070Ti 8Gb
Win11 16Gb 12th Gen Intel i5 12450H 2Ghz Nvidia RTX 2050 8Gb
Win11  Pro 8Gb Celeron Intel UHD Graphics 600
Win10/Linux Mint 16Gb 4th Gen Intel i5 4570 3.2GHz, Nvidia GeForce GTX 1050 2Gb
macOS 32Gb Apple M2Max
pi5 8Gb
Spectrum Next 2Mb

Derron

Quote from: iWasAdam on April 07, 2019, 08:30:21
Hi Derron.
I really like the concept for this and I'm going to use it as a test bed for my next project.
I like the concept of clicking/selection and sending things that you have no real control over

I'm working on the base core of clicking and selecting atm


Feel free to use some of the code / logic (it is Open Source you can have more than a peek).

Think one could do this in a Fantasy/Monsters world too ... so different castles (puddy-slime-pond-castle vs anthill-castle...)  and different troops. Would even allow for different TechTrees ...
Drop me a line if you want to tinker in a collaborative way.


bye
Ron

iWasAdam

currently I am at the 'putting things on screen (squares, so no designation). I've added sizes and kinds, but neither have any function yet
and then sorting out the selecting - done

I'm not going to use any of the code or look at it. as I want to get a feel for how things fit together in my head (completely blank at the moment)

Derron

For selection and so on: all the entities on screen have an "area" which reflects their map position and dimension. This area-rectangle can either get converted to screenspace - or you just convert your input into map-space. Then a simple "entity.area.contains(mousePos) then SelectEntity(entity)" is enough to that.
Using group select - dunno if this is the best approach - I just used a check whether a groupSelectionRect is created (done on "button down" with x,y at mouse pos and w,h = 0,0) and if then button is no longer down you use the new mouse position for rectangle's width/height.

But I think you know all of this already as your other games hat similar interaction mechanics.


@ sizes
I had sizes for planets in too (for now they are fixed). Sizes would have then allowed for more population, more missiles, ...
but thought "feature creep"...so kept it out - same for stealth, anti-stealth, ...


What might be of interest for (...to think about - not to look at) is to make sure that cities/planets/castles/... "bases" are having a minimum distance to their neighbours - and to avoid clamping too much (or... to allow/enforce clamping/grouping). I prefer dynamically created worlds over hand crafted ones - as this allows for endless games (I use defined seeds - maybe it would have been a good idea to add a "seed input widget" for the random/skirmish games to more easily replay stuff).


First game idea was btw without the complexity of upgrades - just "grow and send" but then I saw that other games used a similar approach which is why I wanted to be at least a bit different. A pity that this means to increase gameplay complexity (which isn't what all players like).


PS: I protoyped with DrawOval too. Some stuff like mouse cursor and the animated selection rectangle are even still created using DrawRect chains. Sooner or later the "graphician" in me wanted to tinker a bit so you will do for sure too.


bye
Ron

iWasAdam

Here's a base build showing a single selection and range. the yellow/grey things are the available units. they are yellow when they are available

Derron

Does size of the objects influence "refill speed" (try to describe it in neutral words)?

The range indicator seems to say: you can only target stuff in range - so you need to "chain" your movements (had this in mind too but ended up with a simple planetary defense).

If so: think about what happens if eg "20 units" reach one of the same owners other circle which already has 20 of 30 "unit slots" filled. Cap increased or something send back or ... ?


bye
Ron

iWasAdam


Derron

Xerra suggested to add some features - so I added some of them:

- "Ctrl + A" to select all your planets
- Middle-Mouse-Button "click" to center the click position on screen (mouse "drag" is TODO)
-> [Interface] added CTRL+A (select all) middle-mouse-button (map move). Idea: Xerra


Next to the suggestions I now also deselect a planet if you loose owner ship but only íf you selected multiple planets as a single planet selection might be intentional.


Will try the map drag later on and update binaries to test the new sound engine too (no more rtAudio for streamed ogg - if it works at least ;-)).
Now kindergarten asked me to help building up a skid/slide so real life "world building" is asking for my attention.

bye
Ron

iWasAdam

hint - middle mouse is not a brilliant support choice as many people don't have mice with 3 buttons or even 2 buttons.

if you were looking at (purely from a usability point). track the mouse. over a planet = select not over a planet = drag about - or consider not needing to drag the screen about (some form of auto scaling perhaps?)

Derron

#73
@ auto scaling
Nope - we already have the ability to position via minimap clicks, moving mouse to the sides of the space-viewport


@ 3 buttons
Yes, these people with 1button mices would not be able to use the middle mouse buttons nor would they be able to use right click. For them you need to provide eg. "D" and "F" keys to emulate the buttons (D and F because of their positions for a resting-hand-on-keyboard - and F having the "marker" on it for 10 finger typing).


@ mouse over planet or not
If you have your mouse not over a single planet you most probably want to mouse-area-select. Also it might look a bit odd if you did not hit the targeted planet perfectly and now the scrolling starts (for the moment you "hit" the mouse - aka "mouse down" until you "clicked" which means you released the mouse button).

I could add the option (for 1-button-mouse-users) to handle double click: double click then "scrolls to".

Aside of that I could also just add a simple cursor-key-movement to get rid of all that extra handling for 1-button-mouse-users (except for "right click").


As said above one should not forget: map dragging, mouse map scrolling, ... this is a convenience-extra-feature which is reachable with mouse-movement (sides) and LMB-click (minimap) already.


@ new release
Will have to fight a little bug in my freeaudio-soundmanager as it bugs refilling stream buffers on the second crossfade to a track (a-b-a) think the TChannels behave not exactly as they should with static buffers or an even simpler but yet hidden bug.

bye
Ron

Derron

Took a bit longer to do that little bugfix ;-)

I rewrote the crossfader in my SoundManager class. The problem was or is, that there was no easy way to chain a streamed audio to a FreeAudio-channel object and to synchronize played time (to refill buffers accordingly etc.). Once I seem to have it working I found crackling sounds on my Windows 10 notebook - seems the FreeAudio module has some quirks for the Windows part if it is running Windows 98 :) - and these settings are required here too (and they are even used in an exaggerated way when utilizing the Direct Sound backend ...). Once that was fixed I now have had at least flawless playback on:
- notebook with Windows 10 64Bit and a Linux Mint 18 64bit
- my desktop with Linux Mint 18 64Bit
- 32bit Mini-XP-VM on my desktop

Was not able to check the audio output of the Mac but ...heyya.


So for all 3 OS this means the download here (v1.0.4) now does not use "maxmod2/rtAudio" for playback of the music but the BlitzMax-provided FreeAudio and a little custom audiostream solution by me. It might work - or might fail, dunno.
Maybe that even makes it work on Adam's Mac OS but I heavily doubt it.


Next to the audio backend I added:
- map dragging (middle mouse button)
- map clicking (middle mouse button)
- ctrl+a to select all planets


Download: https://github.com/GWRon/GenusPrime/releases/download/v1.0.4/GenusPrime_v104_LinuxMacWindows.zip


Would be nice if some of you (Xerra?) could give it a little test (sound playback and new control support). If your feedback is positive I would upload it to itch.io (maybe it finds some new players then).


bye
Ron